diff options
author | Fabio Porcedda <fabio.porcedda@gmail.com> | 2014-06-27 14:15:55 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-06-29 16:41:06 +0200 |
commit | 8d384fa849e9a285bc5b70e392bd898f8eb073bd (patch) | |
tree | b4f6e93c6644646a9ee2da92da807ccaa8d5da62 | |
parent | 01012167dffccc8a82f3a0f712a842e217f7b466 (diff) | |
download | buildroot-8d384fa849e9a285bc5b70e392bd898f8eb073bd.tar.gz buildroot-8d384fa849e9a285bc5b70e392bd898f8eb073bd.zip |
Makefile: target-finalize: add TARGET_FINALIZE_HOOKS
Add TARGET_FINALIZE_HOOKS to the "target-finalize" rule to be able to
add to it commands as needed.
This is useful for having a nicer output because commands are executed
after the "target-finalize" initial message, also it is useful to ensure
an executing order even when top-level parallel makefile is being used.
Also convert "TARGET_PURGE_LOCALES" to a hook that uses
"TARGET_FINALIZE_HOOKS".
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |