summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-10-12 15:31:26 +0800
committerPeng Wu <alexepico@gmail.com>2015-10-12 15:31:26 +0800
commit3d9e1ee4d4de86b722d07a822ebb5521acd33f03 (patch)
tree4316663dbe4b8ddcc749b6fbfe495fde6bef0004
parentfbc36eb1382314da72beab865e7c815846f93d05 (diff)
downloadlibpinyin-3d9e1ee4d4de86b722d07a822ebb5521acd33f03.tar.gz
libpinyin-3d9e1ee4d4de86b722d07a822ebb5521acd33f03.tar.xz
libpinyin-3d9e1ee4d4de86b722d07a822ebb5521acd33f03.zip
update Makefile.data
-rw-r--r--scripts2/Makefile.data15
-rw-r--r--scripts2/tools/distill.py4
2 files changed, 17 insertions, 2 deletions
diff --git a/scripts2/Makefile.data b/scripts2/Makefile.data
new file mode 100644
index 0000000..40eac38
--- /dev/null
+++ b/scripts2/Makefile.data
@@ -0,0 +1,15 @@
+all: pinyins.txt
+
+
+pinyins.txt:
+ python3 tools/distill.py
+
+
+update-header: pinyins.txt
+ python3 generateheader.py templates/pinyin_parser_table.h.in > ../src/storage/pinyin_parser_table.h
+ python3 generateheader.py templates/double_pinyin_table.h.in > ../src/storage/double_pinyin_table.h
+ python3 generateheader.py templates/zhuyin_table.h.in > ../src/storage/chewing_table.h
+ python3 generateheader.py templates/chewing_enum.h.in > ../src/storage/chewing_enum.h
+
+
+.PHONY: pinyins.txt
diff --git a/scripts2/tools/distill.py b/scripts2/tools/distill.py
index 8502605..fef40cd 100644
--- a/scripts2/tools/distill.py
+++ b/scripts2/tools/distill.py
@@ -40,8 +40,8 @@ def load_phrase(filename):
phrasefile.close()
-load_phrase("../../data/gb_char.table")
-load_phrase("../../data/gbk_char.table")
+load_phrase("../data/gb_char.table")
+load_phrase("../data/gbk_char.table")
def save_pinyin(filename):