diff options
author | Peng Huang <shawn.p.huang@gmail.com> | 2009-10-05 14:38:24 +0800 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2009-10-05 14:38:24 +0800 |
commit | 1ab8d3eaf4230c61ea4a78752334f99bac904621 (patch) | |
tree | ffac282c01b12eaa680d70d446802db1c6c78979 | |
parent | 746b31da492ab63120655f287fc56b8fb26584eb (diff) | |
download | ibus-libpinyin-1ab8d3eaf4230c61ea4a78752334f99bac904621.tar.gz ibus-libpinyin-1ab8d3eaf4230c61ea4a78752334f99bac904621.tar.xz ibus-libpinyin-1ab8d3eaf4230c61ea4a78752334f99bac904621.zip |
Fix problem in install-data-hook
-rw-r--r-- | data/db/Makefile.am | 25 | ||||
-rw-r--r-- | data/db/open-phrase/Makefile.am | 8 |
2 files changed, 16 insertions, 17 deletions
diff --git a/data/db/Makefile.am b/data/db/Makefile.am index d7340b4..329af2d 100644 --- a/data/db/Makefile.am +++ b/data/db/Makefile.am @@ -18,26 +18,33 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +main_db_DATA = \ + create_index.sql \ + $(NULL) +main_dbdir = $(pkgdatadir)/db + +EXTRA_DIST = \ + create_index.sql \ + $(NULL) SUBDIRS = \ google \ open-phrase \ $(NULL) -main_db_DATA = \ - create_index.sql \ - $(NULL) -main_dbdir = $(pkgdatadir)/db install-data-hook: @( \ if test "$(NO_INDEX)" = ""; then \ cd $(DESTDIR)$(main_dbdir); \ - echo "Create INDEX"; \ - sqlite3 main.db ".read create_index.sql"; \ + if test -f google.db; then \ + echo "Create INDEX for google.db"; \ + sqlite3 google.db ".read create_index.sql"; \ + fi; \ + if test -f open-phrase.db; then \ + echo "Create INDEX for open-phrase.db"; \ + sqlite3 open-phrase.db ".read create_index.sql"; \ + fi; \ fi) -EXTRA_DIST = \ - create_index.sql \ - $(NULL) diff --git a/data/db/open-phrase/Makefile.am b/data/db/open-phrase/Makefile.am index 67f6863..5947abb 100644 --- a/data/db/open-phrase/Makefile.am +++ b/data/db/open-phrase/Makefile.am @@ -27,14 +27,6 @@ main_db_DATA = \ $(NULL) main_dbdir = $(pkgdatadir)/db -install-data-hook: - @( \ -if test "$(NO_INDEX)" = ""; then \ - cd $(DESTDIR)$(main_dbdir); \ - echo "Create INDEX"; \ - sqlite3 $(db_file) ".read create_index.sql"; \ -fi) - DBVER = 1.2.99 DBTAR = pinyin-database-$(DBVER).tar.bz2 |