Skip to contentSkip to conversation

Allow to run severals post build scripts instead of only one

PATCH Superseded Philippe Reynes 4 participants 6 messages Oct 29, 2012 – Nov 6, 2012 Kbuild

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Allow to run severals post build scripts instead of only one

Using severals post build scripts is usefull to share script between severals boards/projects.

---
 Makefile                 |    5 +++--
 target/generic/Config.in |   11 ++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)
Makefile +3 -2
index 0128839..f25141f 100644
@@ -464,8 +464,9 @@ endif
 	) >  $(TARGET_DIR)/etc/os-release
 
 ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
-	@$(call MESSAGE,"Executing post-build script")
-	$(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
+	@$(call MESSAGE,"Executing post-build script\(s\)")
+	@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
+		$(s) $(TARGET_DIR)$(sep))
 endif
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
target/generic/Config.in +6 -5
index b8472f4..298377c 100644
@@ -170,15 +170,16 @@ config BR2_ROOTFS_POST_BUILD_SCRIPT
 	string "Custom script to run before creating filesystem images"
 	default ""
 	help
-	  Specify a script to be run after the build has finished and before
-	  Buildroot starts packing the files into selected filesystem images.
+	  Specify a space-separated list of scripts to be run after the build
+	  has finished and before Buildroot starts packing the files into 
+	  selected filesystem images.
 
 	  This gives users the oportunity to do board-specific cleanups,
 	  add-ons and the like, so the generated files can be used directly
 	  without further processing.
 
-	  The script is called with the target directory name as first and
-	  only argument. Make sure the exit code of that script is 0,
-	  otherwise make will stop after calling it.
+	  These scripts are called with the target directory name as first and
+	  only argument. Make sure the exit code of those scripts are 0,
+	  otherwise make will stop after calling them.
 
 endmenu
Signature · 23 lines
1.7.1


#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caract?re priv?. S'ils ne vous sont
pas destin?s, nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque mani?re que ce
soit le contenu. Si ce message vous a ?t? transmis par erreur, merci d'en
informer l'exp?diteur et de supprimer imm?diatement de votre syst?me
informatique ce courriel ainsi que tous les documents qui y sont attach?s."


                               ******

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."
#
#1 lore raw

PATCH v3 1/1 Allow to run severals post build scripts instead of only one

Hi Philippe,

2012/10/29 Philippe Reynes <[email protected]>:

Quoted 4 lines

Using severals post build scripts is usefull to share script between severals boards/projects.

BTW, it would be great if you could update the doc too (docs/manual/customize-rootfs.txt), here or in another patch.

Regards,

Signature · 1 line
Sam
#3 lore raw

PATCH v3 1/1 Allow to run severals post build scripts instead of only one

In reply to Philippe Reynes

Makefile endif · line 467

Quoted 1 line · Philippe Reynes
Makefile +1 -0
+	@$(call MESSAGE,"Executing post-build script\(s\)")

Aren't these backslashes redundant?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

PATCH v3 1/1 Allow to run severals post build scripts instead of only one

Hi,

I've tried to remove this backslashes, and I've got an error when building:

/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `echo ">>> "Executing post-build script(s)""'
make: *** [target-finalize] Error 1

So those backslashes are usefull.

Regards,
Philippe

Arnout
Vandecappelle
<[email protected]> A
Philippe Reynes
10/30/2012 23:50 <[email protected]>
cc
buildroot at busybox.net
Objet
Re: [Buildroot] [PATCH] [v3] Allow to run severals post build scripts instead of only one

Quoted 1 line · Philippe Reynes

+ @$(call MESSAGE,"Executing post-build script\(s\)")

Aren't these backslashes redundant?

Regards,
Arnout
--

Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR
Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

#
" Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles ou ayant un caract?re priv?. S'ils ne vous sont pas destin?s, nous vous signalons qu'il est strictement interdit de les divulguer, de les reproduire ou d'en utiliser de quelque mani?re que ce soit le contenu. Si ce message vous a ?t? transmis par erreur, merci d'en informer l'exp?diteur et de supprimer imm?diatement de votre syst?me informatique ce courriel ainsi que tous les documents qui y sont attach?s."

                               ******

" This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
#

#5 lore raw

PATCH v3 1/1 Allow to run severals post build scripts instead of only one

Quoted 8 lines · Philippe REYNES

I've tried to remove this backslashes, and I've got an error when building:

/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `echo ">>> "Executing post-build script(s)""'
make: *** [target-finalize] Error 1

So those backslashes are usefull.

Oh I see - it's because the quotes shouldn't be there... But since we have
quotes in all MESSAGE calls at the moment, leave it as it is.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F