summaryrefslogtreecommitdiffstats
path: root/i18npool/CustomTarget_collator.mk
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-22 23:09:40 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-22 23:13:07 +0300
commit8774a2b1279fcb43eb3cf821cadd3b969078cbcd (patch)
tree7a0289eddeddea55a57ffb46dfb8eef97426ba62 /i18npool/CustomTarget_collator.mk
parentcoverity#704968 Unchecked dynamic_cast (diff)
downloadcore-8774a2b1279fcb43eb3cf821cadd3b969078cbcd.tar.gz
core-8774a2b1279fcb43eb3cf821cadd3b969078cbcd.zip
Let --with-locales prune also built-in collator data
Effective in the DISABLE_DYNLOADING case. Introduce a new gbuild macro gb_Helper_optional_locale. Change-Id: I43eb39fa810f71cadb6bc6d5c117ae145629ecb9
Diffstat (limited to 'i18npool/CustomTarget_collator.mk')
-rw-r--r--i18npool/CustomTarget_collator.mk61
1 files changed, 41 insertions, 20 deletions
diff --git a/i18npool/CustomTarget_collator.mk b/i18npool/CustomTarget_collator.mk
index 04527bb613d7..9fea159df2fc 100644
--- a/i18npool/CustomTarget_collator.mk
+++ b/i18npool/CustomTarget_collator.mk
@@ -11,26 +11,37 @@ $(eval $(call gb_CustomTarget_CustomTarget,i18npool/collator))
i18npool_CODIR := $(call gb_CustomTarget_get_workdir,i18npool/collator)
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 \
- sid_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_Helper_optional_locale,ca, \
+ ca_charset.txt) \
+ $(call gb_Helper_optional_locale,dz, \
+ dz_charset.txt) \
+ $(call gb_Helper_optional_locale,hu, \
+ hu_charset.txt) \
+ $(call gb_Helper_optional_locale,ja, \
+ ja_charset.txt \
+ ja_phonetic_alphanumeric_first.txt \
+ ja_phonetic_alphanumeric_last.txt) \
+ $(call gb_Helper_optional_locale,ko, \
+ ko_charset.txt) \
+ $(call gb_Helper_optional_locale,ku, \
+ ku_alphanumeric.txt) \
+ $(call gb_Helper_optional_locale,ln, \
+ ln_charset.txt) \
+ $(call gb_Helper_optional_locale,my, \
+ my_dictionary.txt) \
+ $(call gb_Helper_optional_locale,ne, \
+ ne_charset.txt) \
+ $(call gb_Helper_optional_locale,sid, \
+ sid_charset.txt) \
+ $(call gb_Helper_optional_locale,zh, \
+ 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) : $(SRCDIR)/i18npool/CustomTarget_collator.mk \
$(i18npool_CODIR)/lrl_include.hxx $(foreach txt,$(i18npool_COTXTS), \
@@ -44,10 +55,20 @@ $(i18npool_CODIR)/collator_%.cxx : \
$(call gb_Helper_abbreviate_dirs, \
$(call gb_Helper_execute,gencoll_rule) $< $@ $*)
+define i18npool_echo_one_lang
+ echo '#define LOCAL_RULE_$(1)' >>$@
+
+endef
+
$(i18npool_CODIR)/lrl_include.hxx : \
$(SRCDIR)/i18npool/source/collator/data | $(i18npool_CODIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
echo '#define LOCAL_RULE_LANGS "$(sort $(foreach txt,$(i18npool_COTXTS), \
$(firstword $(subst _, ,$(txt)))))"' > $@
+ifeq ($(WITH_LOCALES),)
+ echo '#define LOCAL_RULE_ALL' >>$@
+else
+ $(foreach txt,$(i18npool_COTXTS),$(call i18npool_echo_one_lang,$(subst .txt,,$(txt))))
+endif
# vim: set noet sw=4 ts=4: