diff options
author | Zhangyuan Nie <yuan@znie.org> | 2022-08-05 02:53:25 -0400 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2022-08-10 14:12:52 +0800 |
commit | 86316ab613e23e11334a20136985265ccd4d26d1 (patch) | |
tree | dfc640807496c2bb7a15254ceb4dbc2e456f5184 | |
parent | 44d0d909e023429c2c1367539038fe5fb6beffed (diff) | |
download | ibus-libpinyin-86316ab613e23e11334a20136985265ccd4d26d1.tar.gz |
move make targets for ZhConversion to scripts dir
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | scripts/Makefile.am | 13 | ||||
-rwxr-xr-x | scripts/update-simptrad-table.py | 4 | ||||
-rw-r--r-- | src/Makefile.am | 19 |
5 files changed, 17 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am index 8528430..8302e2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,6 +24,7 @@ endif SUBDIRS = \ data \ $(LUADIR) \ + scripts \ src \ setup \ m4 \ diff --git a/configure.ac b/configure.ac index 627b848..15f1141 100644 --- a/configure.ac +++ b/configure.ac @@ -225,6 +225,7 @@ AC_CONFIG_FILES([ po/Makefile.in Makefile ibus-libpinyin.spec lua/Makefile +scripts/Makefile src/Makefile src/libpinyin.xml.in setup/Makefile diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 0000000..e63408f --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1,13 @@ +CLEANFILES = \ + ZhConversion.* \ + $(NULL) + +ZhConversion.php: + $(AM_V_GEN) \ + curl https://raw.githubusercontent.com/wikimedia/mediawiki/master/includes/languages/data/ZhConversion.php > $@ || \ + ( $(RM) $@; exit 1 ) + +ZhConversion.py: ZhConversion.php + $(AM_V_GEN) \ + php $(srcdir)/php_2_py.php > $@ || \ + ( $(RM) $@; exit 1 ) diff --git a/scripts/update-simptrad-table.py b/scripts/update-simptrad-table.py index 5784bb7..ce31fb4 100755 --- a/scripts/update-simptrad-table.py +++ b/scripts/update-simptrad-table.py @@ -1,8 +1,4 @@ #!/usr/bin/python3 -import sys - -sys.path.append(".") - from ZhConversion import * from valid_hanzi import * diff --git a/src/Makefile.am b/src/Makefile.am index 21b3c74..8098b2a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -231,7 +231,6 @@ EXTRA_DIST = \ CLEANFILES = \ libpinyin.xml \ - ZhConversion.* \ $(NULL) PYPunctTable.h: @@ -245,9 +244,8 @@ PYSimpTradConverterTable.h: ( $(RM) $@; exit 1 ) update-simptrad-table: - $(RM) ZhConversion.php ZhConversion.py PYSimpTradConverterTable.h - $(MAKE) ZhConversion.php - $(MAKE) ZhConversion.py + $(RM) $(top_srcdir)/scripts/ZhConversion.* PYSimpTradConverterTable.h + $(MAKE) -C $(top_srcdir)/scripts ZhConversion.py $(MAKE) PYSimpTradConverterTable.h libpinyin.xml: libpinyin.xml.in @@ -263,16 +261,3 @@ test: ibus-engine-libpinyin $(ENV) \ G_DEBUG=fatal_criticals \ $(builddir)/ibus-engine-libpinyin - -# test: ibus-engine-pinyin -# $(ENV) G_DEBUG=fatal_warnings \ -# $(builddir)/ibus-engine-pinyin -ZhConversion.php: - $(AM_V_GEN) \ - curl https://raw.githubusercontent.com/wikimedia/mediawiki/master/includes/languages/data/ZhConversion.php > $@ || \ - ( $(RM) $@; exit 1 ) - -ZhConversion.py: ZhConversion.php - $(AM_V_GEN) \ - php $(top_srcdir)/scripts/php_2_py.php > $@ || \ - ( $(RM) $@; exit 1 ) |