-CLEANUP_FILES = bigram.db gb_char.bin gbk_char.bin \
- phrase_index.bin pinyin_index.bin
-
clean:
- cd data ; $(RM) $(CLEANUP_FILES) ; cd "$(CURDIR)"
+ make -C data clean
build:
- cd utils/storage ; ./gen_binary_files ; cd "$(CURDIR)"
- cd utils/storage ; ./import_interpolation < ../../data/interpolation.text ; cd "$(CURDIR)"
+ make -C data build-data
rebuild:
git reset --hard
--- /dev/null
+## Makefile.am -- Process this file with automake to produce Makefile.in
+## Copyright (C) 2011 Peng Wu
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+textual_model_data = interpolation.text \
+ gb_char.table gbk_char.table
+
+binary_model_data = gb_char.bin gbk_char.bin \
+ phrase_index.bin pinyin_index.bin \
+ bigram.db
+
+
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = $(textual_model_data) \
+ $(binary_model_data)
+
+libpinyin_db_DATA = $(binary_model_data)
+
+libpinyin_dbdir = $(pkgdatadir)/data
+
+CLEANFILES = $(binary_model_data)
+
+build-data: $(textual_model_data)
+ $(RM) $(binary_model_data)
+ cd ../utils/storage ; ./gen_binary_files ; cd -
+ cd ../utils/storage ; ./import_interpolation < ../../data/interpolation.text ; cd -
+
+$(binary_model_data): build-data