|
@@ -663,32 +663,17 @@ endef
|
|
|
TARGET_FINALIZE_HOOKS += TOOLCHAIN_ECLIPSE_REGISTER
|
|
|
endif
|
|
|
|
|
|
-# Generate locale data. Basically, we call the localedef program
|
|
|
-# (built by the host-localedef package) for each locale. The input
|
|
|
-# data comes preferably from the toolchain, or if the toolchain does
|
|
|
-# not have them (Linaro toolchains), we use the ones available on the
|
|
|
-# host machine.
|
|
|
+# Generate locale data.
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
|
|
GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
|
|
|
ifneq ($(GLIBC_GENERATE_LOCALES),)
|
|
|
PACKAGES += host-localedef
|
|
|
|
|
|
define GENERATE_GLIBC_LOCALES
|
|
|
- $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
|
|
|
- $(Q)for locale in $(GLIBC_GENERATE_LOCALES) ; do \
|
|
|
- inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
|
|
|
- charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
|
|
|
- if test -z "$${charmap}" ; then \
|
|
|
- charmap="UTF-8" ; \
|
|
|
- fi ; \
|
|
|
- echo "Generating locale $${inputfile}.$${charmap}" ; \
|
|
|
- I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
|
|
|
- $(HOST_DIR)/bin/localedef \
|
|
|
- --prefix=$(TARGET_DIR) \
|
|
|
- --$(call LOWERCASE,$(BR2_ENDIAN))-endian \
|
|
|
- -i $${inputfile} -f $${charmap} \
|
|
|
- $${locale} ; \
|
|
|
- done
|
|
|
+ $(MAKE) -f support/misc/gen-glibc-locales.mk \
|
|
|
+ ENDIAN=$(call LOWERCASE,$(BR2_ENDIAN)) \
|
|
|
+ LOCALES="$(GLIBC_GENERATE_LOCALES)" \
|
|
|
+ Q=$(Q)
|
|
|
endef
|
|
|
TARGET_FINALIZE_HOOKS += GENERATE_GLIBC_LOCALES
|
|
|
endif
|