From 6377b302af8aa66eaead9b8e4d13ad5e3f8faad3 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 14 Oct 2013 13:44:25 +0800 Subject: clean up Makefile.am --- tests/Makefile.am | 8 ++------ tests/include/Makefile.am | 9 ++++----- tests/lookup/Makefile.am | 10 ++++------ tests/storage/Makefile.am | 42 +++++++++++++----------------------------- utils/segment/Makefile.am | 8 ++------ utils/storage/Makefile.am | 18 ++++++------------ utils/training/Makefile.am | 31 ++----------------------------- 7 files changed, 33 insertions(+), 93 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8208214..93df7d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -30,6 +30,8 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/src/lookup \ @GLIB2_CFLAGS@ +LDADD = ../src/libpinyin.la @GLIB2_LIBS@ + noinst_HEADERS = timer.h \ tests_helper.h @@ -39,12 +41,6 @@ noinst_PROGRAMS = test_pinyin \ test_pinyin_SOURCES = test_pinyin.cpp -test_pinyin_LDADD = ../src/libpinyin.la @GLIB2_LIBS@ - test_phrase_SOURCES = test_phrase.cpp -test_phrase_LDADD = ../src/libpinyin.la @GLIB2_LIBS@ - test_chewing_SOURCES = test_chewing.cpp - -test_chewing_LDADD = ../src/libpinyin.la @GLIB2_LIBS@ diff --git a/tests/include/Makefile.am b/tests/include/Makefile.am index 7174bec..f52c5ac 100644 --- a/tests/include/Makefile.am +++ b/tests/include/Makefile.am @@ -21,11 +21,10 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/src/lookup \ @GLIB2_CFLAGS@ -TESTS = test_memory_chunk +LDADD = @GLIB2_LIBS@ -noinst_PROGRAMS = test_memory_chunk +TESTS = test_memory_chunk -test_memory_chunk_SOURCES = test_memory_chunk.cpp - -test_memory_chunk_LDADD = @GLIB2_LIBS@ +noinst_PROGRAMS = test_memory_chunk +test_memory_chunk_SOURCES = test_memory_chunk.cpp diff --git a/tests/lookup/Makefile.am b/tests/lookup/Makefile.am index 4bcc176..804d037 100644 --- a/tests/lookup/Makefile.am +++ b/tests/lookup/Makefile.am @@ -22,13 +22,11 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/tests \ @GLIB2_CFLAGS@ -noinst_PROGRAMS = test_pinyin_lookup \ - test_phrase_lookup +LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ -test_pinyin_lookup_SOURCES = test_pinyin_lookup.cpp +noinst_PROGRAMS = test_pinyin_lookup \ + test_phrase_lookup -test_pinyin_lookup_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ +test_pinyin_lookup_SOURCES = test_pinyin_lookup.cpp test_phrase_lookup_SOURCES = test_phrase_lookup.cpp - -test_phrase_lookup_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ \ No newline at end of file diff --git a/tests/storage/Makefile.am b/tests/storage/Makefile.am index b7ed8b6..7675d11 100644 --- a/tests/storage/Makefile.am +++ b/tests/storage/Makefile.am @@ -22,50 +22,34 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/tests \ @GLIB2_CFLAGS@ -TESTS = test_phrase_index_logger \ - test_ngram \ - test_flexible_ngram +LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ -noinst_PROGRAMS = test_phrase_index \ - test_phrase_index_logger \ - test_phrase_table \ - test_ngram \ - test_flexible_ngram \ - test_parser2 \ - test_chewing_table \ - test_table_info +TESTS = test_phrase_index_logger \ + test_ngram \ + test_flexible_ngram +noinst_PROGRAMS = test_phrase_index \ + test_phrase_index_logger \ + test_phrase_table \ + test_ngram \ + test_flexible_ngram \ + test_parser2 \ + test_chewing_table \ + test_table_info -test_phrase_index_SOURCES = test_phrase_index.cpp -test_phrase_index_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ +test_phrase_index_SOURCES = test_phrase_index.cpp test_phrase_index_logger_SOURCES = test_phrase_index_logger.cpp -test_phrase_index_logger_LDADD = ../../src/libpinyin_internal.la \ - @GLIB2_LIBS@ - test_phrase_table_SOURCES = test_phrase_table.cpp -test_phrase_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - test_ngram_SOURCES = test_ngram.cpp -test_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - test_flexible_ngram_SOURCES = test_flexible_ngram.cpp -test_flexible_ngram_LDADD = ../../src/libpinyin_internal.la \ - @GLIB2_LIBS@ - test_parser2_SOURCES = test_parser2.cpp -test_parser2_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - test_chewing_table_SOURCES = test_chewing_table.cpp -test_chewing_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - test_table_info_SOURCES = test_table_info.cpp - -test_table_info_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ diff --git a/utils/segment/Makefile.am b/utils/segment/Makefile.am index 579d6e4..8c081d1 100644 --- a/utils/segment/Makefile.am +++ b/utils/segment/Makefile.am @@ -24,16 +24,12 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/utils \ @GLIB2_CFLAGS@ +LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ + noinst_PROGRAMS = spseg ngseg mergeseq spseg_SOURCES = spseg.cpp -spseg_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - ngseg_SOURCES = ngseg.cpp -ngseg_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - mergeseq_SOURCES = mergeseq.cpp - -mergeseq_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ diff --git a/utils/storage/Makefile.am b/utils/storage/Makefile.am index db63488..376c0e7 100644 --- a/utils/storage/Makefile.am +++ b/utils/storage/Makefile.am @@ -22,24 +22,18 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/utils \ @GLIB2_CFLAGS@ -bin_PROGRAMS = gen_binary_files \ - import_interpolation +LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ -noinst_PROGRAMS = export_interpolation \ - gen_pinyin_table +bin_PROGRAMS = gen_binary_files \ + import_interpolation -gen_binary_files_SOURCES = gen_binary_files.cpp +noinst_PROGRAMS = export_interpolation \ + gen_pinyin_table -gen_binary_files_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ +gen_binary_files_SOURCES = gen_binary_files.cpp import_interpolation_SOURCES = import_interpolation.cpp -import_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - export_interpolation_SOURCES = export_interpolation.cpp -export_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - gen_pinyin_table_SOURCES = gen_pinyin_table.cpp - -gen_pinyin_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ diff --git a/utils/training/Makefile.am b/utils/training/Makefile.am index dc834ec..8ed4806 100644 --- a/utils/training/Makefile.am +++ b/utils/training/Makefile.am @@ -24,6 +24,8 @@ INCLUDES = -I$(top_srcdir)/src \ -I$(top_srcdir)/utils \ @GLIB2_CFLAGS@ +LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ + noinst_HEADERS = k_mixture_model.h bin_PROGRAMS = gen_unigram @@ -43,55 +45,26 @@ noinst_PROGRAMS = gen_ngram \ gen_ngram_SOURCES = gen_ngram.cpp -gen_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - gen_deleted_ngram_SOURCES = gen_deleted_ngram.cpp -gen_deleted_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - gen_unigram_SOURCES = gen_unigram.cpp -gen_unigram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - gen_k_mixture_model_SOURCES = gen_k_mixture_model.cpp -gen_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - estimate_interpolation_SOURCES = estimate_interpolation.cpp -estimate_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - estimate_k_mixture_model_SOURCES = estimate_k_mixture_model.cpp -estimate_k_mixture_model_LDADD = ../../src/libpinyin_internal.la \ - @GLIB2_LIBS@ - merge_k_mixture_model_SOURCES = merge_k_mixture_model.cpp -merge_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - prune_k_mixture_model_SOURCES = prune_k_mixture_model.cpp -prune_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - import_k_mixture_model_SOURCES = import_k_mixture_model.cpp -import_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - export_k_mixture_model_SOURCES = export_k_mixture_model.cpp -export_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ - k_mixture_model_to_interpolation_SOURCES = k_mixture_model_to_interpolation.cpp -k_mixture_model_to_interpolation_LDADD = ../../src/libpinyin_internal.la \ - @GLIB2_LIBS@ - validate_k_mixture_model_SOURCES = validate_k_mixture_model.cpp -validate_k_mixture_model_LDADD = ../../src/libpinyin_internal.la \ - @GLIB2_LIBS@ - eval_correction_rate_SOURCES = eval_correction_rate.cpp - -eval_correction_rate_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ -- cgit