summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9c54992c8f..c106c71e1c 100644
--- a/Makefile
+++ b/Makefile
@@ -514,7 +514,7 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
-define TARGET_PURGE_LOCALES
+define PURGE_LOCALES
rm -f $(LOCALE_WHITELIST)
for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
@@ -526,13 +526,14 @@ define TARGET_PURGE_LOCALES
done; \
done
endef
+TARGET_FINALIZE_HOOKS += PURGE_LOCALES
endif
$(TARGETS_ROOTFS): target-finalize
target-finalize: $(TARGETS)
@$(call MESSAGE,"Finalizing target directory")
- $(TARGET_PURGE_LOCALES)
+ $(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
OpenPOWER on IntegriCloud