$(DL_DIR)/$(UCLIBC_SOURCE):
mkdir -p $(DL_DIR)
$(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE)
-
+ifneq ($(UCLIBC_HAS_LOCALE),)
$(DL_DIR)/$(UCLIBC_SOURCE_LOCALE):
mkdir -p $(DL_DIR)
$(WGET) -P $(DL_DIR) $(UCLIBC_SITE_LOCALE)/$(UCLIBC_SOURCE_LOCALE)
+UCLIBC_LOCALE_DATA:=$(DL_DIR)/$(UCLIBC_SOURCE_LOCALE)
+else
+UCLIBC_LOCALE_DATA=
+endif
+
uclibc-unpacked: $(UCLIBC_DIR)/.unpacked
-$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) $(DL_DIR)/$(UCLIBC_SOURCE_LOCALE)
+$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) $(UCLIBC_LOCALE_DATA)
mkdir -p $(TOOL_BUILD_DIR)
$(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ uClibc-$(UCLIBC_VER)\*.patch
+ifneq ($(UCLIBC_HAS_LOCALE),)
cp -p $(DL_DIR)/$(UCLIBC_SOURCE_LOCALE) $(UCLIBC_DIR)/extra/locale/
+endif
touch $(UCLIBC_DIR)/.unpacked
# Some targets may wish to provide their own UCLIBC_CONFIG_FILE...