diff options
-rw-r--r-- | config_host.mk.in | 1 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | i18npool/Library_i18npool.mk | 8 |
3 files changed, 28 insertions, 2 deletions
diff --git a/config_host.mk.in b/config_host.mk.in index 0b4595db4d66..6b68d93909ff 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -604,6 +604,7 @@ export WITH_KRB5=@WITH_KRB5@ export WITH_LANG=@WITH_LANG@ export WITH_LANG_LIST=@WITH_LANG_LIST@ export WITH_LINKER_HASH_STYLE=@WITH_LINKER_HASH_STYLE@ +export WITH_LOCALES=@WITH_LOCALES@ export WITH_MOZAB4WIN=@WITH_MOZAB4WIN@ export WITH_MYSPELL_DICTS=@WITH_MYSPELL_DICTS@ export WITH_POOR_HELP_LOCALIZATIONS=@WITH_POOR_HELP_LOCALIZATIONS@ diff --git a/configure.ac b/configure.ac index bfc00bd49ad9..07c7d13c8570 100644 --- a/configure.ac +++ b/configure.ac @@ -1948,7 +1948,7 @@ AC_ARG_WITH(windows-sdk, AC_ARG_WITH(lang, AS_HELP_STRING([--with-lang], - [Use this option to build LibreOffice with additional language support. + [Use this option to build LibreOffice with additional UI language support. English (US) is always included by default. Separate multiple languages with space. For all languages, use --with-lang=ALL.]) @@ -1957,6 +1957,20 @@ AC_ARG_WITH(lang, ], ,) +AC_ARG_WITH(locales, + AS_HELP_STRING([--with-locales], + [Use this option to limit the locale information built in. + By default all the locales available is included. + This option is completely unrelated to --with-lang. + Separate multiple locales with space. + For the default, all locales, don't use this switch at all. + Specifying just the language part of a locale means all matching + locales will be included.]) + [ + Usage: --with-locales="en es pt fr zh kr ja" + ], +,) + # Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5 AC_ARG_WITH(krb5, AS_HELP_STRING([--with-krb5], @@ -12185,6 +12199,11 @@ if test -d "$SRC_ROOT/translations/source"; then fi AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS) +if test -n "$with_locales"; then + WITH_LOCALES="$with_locales" +fi +AC_SUBST(WITH_LOCALES) + dnl git submodule update --reference dnl =================================================================== if test -n "${GIT_REFERENCE_SRC}"; then 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) |