summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-22 19:35:11 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-22 19:38:25 +0300
commit0c0fbc3f8b09017c490ae77794aad3e7417b9c23 (patch)
tree3aa11e3c55152a098fe0f43642fbeb73c4053cb8 /i18npool
parent26c10caf5c0a1f6f4e90465d71a5d90352630263 (diff)
Add a new configure switch --with-locales for restricting the included locales
For now only effective in the DISABLE_DYNLOADING case, where it limits the locales compiled in to the i18npool library. Maybe should use this same option to also limit what collation tables etc are compiled in? Not expected to be used for desktop OSes, but can be useful for mobile platforms where every megabyte counts. Change-Id: If672b4cd19f44f8c7e119378faf40930a51969b7
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/Library_i18npool.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index c095fa8cf3ed..b66a2987e642 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -120,8 +120,14 @@ $(eval $(call gb_Library_add_exception_objects,i18npool,\
ifeq ($(DISABLE_DYNLOADING),TRUE)
$(call gb_CxxObject_get_target,i18npool/source/localedata/localedata): $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx
+ifeq ($(WITH_LOCALES),)
+i18npool_locale_pattern=%
+else
+i18npool_locale_pattern=$(WITH_LOCALES) $(addsuffix _%,$(WITH_LOCALES))
+endif
+
$(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx : $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl
- $(PERL) $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl $(patsubst $(SRCDIR)/i18npool/source/localedata/data/%.xml,%,$(shell echo $(SRCDIR)/i18npool/source/localedata/data/*.xml)) >$@
+ $(PERL) $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl $(filter $(i18npool_locale_pattern),$(patsubst $(SRCDIR)/i18npool/source/localedata/data/%.xml,%,$(shell echo $(SRCDIR)/i18npool/source/localedata/data/*.xml))) >$@
$(call gb_CxxObject_get_target,i18npool/source/localedata/localedata) : \
INCLUDE += -I$(call gb_CustomTarget_get_workdir,i18npool/localedata)