Kaydet (Commit) 82c25249 authored tarafından Caolán McNamara's avatar Caolán McNamara

list dependencies explicitly

and make the list (by its makefile proxy) a dependency of the output
so that removing an entry will trigger a rebuild of the target and
incremental builds are possible

Change-Id: I18c8d5ea2140e61b2ef78e256871402be94b79e2
üst 8eeddcdb
...@@ -65,20 +65,35 @@ i18npool_GENCMNTARGET := ...@@ -65,20 +65,35 @@ i18npool_GENCMNTARGET :=
i18npool_GENCMN := $(SYSTEM_GENCMN) i18npool_GENCMN := $(SYSTEM_GENCMN)
endif endif
i18npool_BRKFILES := $(subst .txt,.brk,$(notdir \ i18npool_BRKTXTS := \
$(wildcard $(SRCDIR)/i18npool/source/breakiterator/data/*.txt))) char_in.brk \
char.brk \
count_word_fi.brk \
count_word.brk \
dict_word_ca.brk \
dict_word_fi.brk \
dict_word_he.brk \
dict_word_hu.brk \
dict_word_nodash.brk \
dict_word_prepostdash.brk \
dict_word.brk \
edit_word_he.brk \
edit_word_hu.brk \
edit_word.brk \
line.brk \
sent.brk
# 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules. # 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules.
# The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools, # The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools,
# so the output (OpenOffice_dat.c) is changed here to include a pragma to disable the warnings. # so the output (OpenOffice_dat.c) is changed here to include a pragma to disable the warnings.
# Output of gencmn is redirected to OpenOffice_tmp.c with the -t switch. # Output of gencmn is redirected to OpenOffice_tmp.c with the -t switch.
$(i18npool_BIDIR)/OpenOffice_dat.c : \ $(i18npool_BIDIR)/OpenOffice_dat.c : $(SRCDIR)/i18npool/CustomTarget_breakiterator.mk \
$(patsubst %.brk,$(i18npool_BIDIR)/%_brk.c,$(i18npool_BRKFILES)) \ $(patsubst %.brk,$(i18npool_BIDIR)/%_brk.c,$(i18npool_BRKTXTS)) \
$(i18npool_GENCMNTARGET) $(i18npool_GENCMNTARGET)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CMN,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CMN,1)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
RESPONSEFILE=$(shell $(gb_MKTEMP)) && \ RESPONSEFILE=$(shell $(gb_MKTEMP)) && \
$(foreach brk,$(i18npool_BRKFILES),echo '$(brk)' >> $${RESPONSEFILE} && ) \ $(foreach brk,$(i18npool_BRKTXTS),echo '$(brk)' >> $${RESPONSEFILE} && ) \
$(i18npool_GENCMN) -n OpenOffice -t tmp -S -d $(i18npool_BIDIR)/ 0 $${RESPONSEFILE} && \ $(i18npool_GENCMN) -n OpenOffice -t tmp -S -d $(i18npool_BIDIR)/ 0 $${RESPONSEFILE} && \
rm -f $${RESPONSEFILE} && \ rm -f $${RESPONSEFILE} && \
echo '#ifdef _MSC_VER' > $@ && \ echo '#ifdef _MSC_VER' > $@ && \
......
...@@ -29,9 +29,28 @@ ...@@ -29,9 +29,28 @@
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/collator)) $(eval $(call gb_CustomTarget_CustomTarget,i18npool/collator))
i18npool_CODIR := $(call gb_CustomTarget_get_workdir,i18npool/collator) i18npool_CODIR := $(call gb_CustomTarget_get_workdir,i18npool/collator)
i18npool_COTXTS := $(notdir $(wildcard $(SRCDIR)/i18npool/source/collator/data/*.txt)) i18npool_COTXTS := \
ca_charset.txt \
dz_charset.txt \
hu_charset.txt \
ja_charset.txt \
ja_phonetic_alphanumeric_first.txt \
ja_phonetic_alphanumeric_last.txt \
ko_charset.txt \
ku_alphanumeric.txt \
ln_charset.txt \
my_dictionary.txt \
ne_charset.txt \
zh_charset.txt \
zh_pinyin.txt \
zh_radical.txt \
zh_stroke.txt \
zh_TW_charset.txt \
zh_TW_radical.txt \
zh_TW_stroke.txt \
zh_zhuyin.txt
$(call gb_CustomTarget_get_target,i18npool/collator) : \ $(call gb_CustomTarget_get_target,i18npool/collator) : $(SRCDIR)/i18npool/CustomTarget_collator.mk \
$(i18npool_CODIR)/lrl_include.hxx $(foreach txt,$(i18npool_COTXTS), \ $(i18npool_CODIR)/lrl_include.hxx $(foreach txt,$(i18npool_COTXTS), \
$(patsubst %.txt,$(i18npool_CODIR)/collator_%.cxx,$(txt))) $(patsubst %.txt,$(i18npool_CODIR)/collator_%.cxx,$(txt)))
......
...@@ -28,9 +28,20 @@ ...@@ -28,9 +28,20 @@
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/indexentry)) $(eval $(call gb_CustomTarget_CustomTarget,i18npool/indexentry))
$(call gb_CustomTarget_get_target,i18npool/indexentry) : \ i18npool_IDXTXTS := \
$(patsubst %.txt,$(call gb_CustomTarget_get_workdir,i18npool/indexentry)/%.cxx,$(notdir \ indexdata_ko_dict.txt \
$(wildcard $(SRCDIR)/i18npool/source/indexentry/data/*.txt))) indexdata_zh_pinyin.txt \
indexdata_zh_radical.txt \
indexdata_zh_stroke.txt \
indexdata_zh_TW_radical.txt \
indexdata_zh_TW_stroke.txt \
indexdata_zh_zhuyin.txt \
ko_phonetic.txt \
zh_pinyin.txt \
zh_zhuyin.txt
$(call gb_CustomTarget_get_target,i18npool/indexentry) : $(SRCDIR)/i18npool/CustomTarget_indexentry.mk \
$(patsubst %.txt,$(call gb_CustomTarget_get_workdir,i18npool/indexentry)/%.cxx,$(i18npool_IDXTXTS))
$(call gb_CustomTarget_get_workdir,i18npool/indexentry)/%.cxx : \ $(call gb_CustomTarget_get_workdir,i18npool/indexentry)/%.cxx : \
$(SRCDIR)/i18npool/source/indexentry/data/%.txt \ $(SRCDIR)/i18npool/source/indexentry/data/%.txt \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment