From 9fa32ba0b76d0790f67e0cc655c56484e44397bc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 7 Feb 2013 11:58:43 +0000 Subject: Add a post-image script mechanism Just like we have a post-build script mechanism that gets executed after the build of all packages but before the creation of the filesystem images, let's introduce a post-image script mechanism, that gets executed once all filesystem images have been generated. This can for example be used to call a tool building a firmware image from different images generated by Buildroot, or automatically extract the tarball root filesystem image into some location exported by NFS, or any other custom action. [Peter: fix image script check] Signed-off-by: Thomas Petazzoni Tested-by: "Yann E. MORIN" Acked-by: "Yann E. MORIN" Acked-by: Luca Ceresoli Acked-by: Samuel Martin Signed-off-by: Peter Korsgaard --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d9e5f2408..395d270c9 100644 --- a/Makefile +++ b/Makefile @@ -353,6 +353,8 @@ endif include fs/common.mk +TARGETS+=target-post-image + TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) @@ -555,6 +557,13 @@ target-generatelocales: host-localedef done endif +target-post-image: +ifneq ($(BR2_ROOTFS_POST_IMAGE_SCRIPT),"") + @$(call MESSAGE,"Executing post-image script\(s\)") + @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \ + $(s) $(BINARIES_DIR)$(sep)) +endif + toolchain-eclipse-register: ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH) -- cgit v1.2.3