Message ID | 1365439816-6935-2-git-send-email-luca@lucaceresoli.net |
---|---|
State | Accepted |
Headers | show |
Luca, All, On Mon, Apr 08, 2013 at 06:50:14PM +0200, Luca Ceresoli wrote: > This also simplifies code by removing the ifneq/endif clauses. > > Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Very usefull, indeed. Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN
On 08/04/13 18:50, Luca Ceresoli wrote: > This also simplifies code by removing the ifneq/endif clauses. > > Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> > --- > Makefile | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index c95bb1e..75f0f0c 100644 > --- a/Makefile > +++ b/Makefile > @@ -509,11 +509,9 @@ endif > $${dir}/ $(TARGET_DIR); \ > done > > -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"") > - @$(call MESSAGE,"Executing post-build script\(s\)") > @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ > + $(call MESSAGE,"Executing post-build script $(s)"); \ > $(s) $(TARGET_DIR)$(sep)) > -endif I wonder, if there are multiple scripts, won't the second MESSAGE be echoed by make? I had expected that the @ would only apply to the first line when they are separated with $(sep), and that each invocation would run in a separate shell. By the way, a very simple alternative would be to remove the @ in front of the foreach, then each script invocation will be echoed by make. Regards, Arnout > > ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) > LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge >
Arnout, Luca, All, On Wednesday 17 April 2013 18:13:33 Arnout Vandecappelle wrote: > On 08/04/13 18:50, Luca Ceresoli wrote: > > This also simplifies code by removing the ifneq/endif clauses. > > > > Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> > > --- > > Makefile | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index c95bb1e..75f0f0c 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -509,11 +509,9 @@ endif > > $${dir}/ $(TARGET_DIR); \ > > done > > > > -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"") > > - @$(call MESSAGE,"Executing post-build script\(s\)") > > @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ > > + $(call MESSAGE,"Executing post-build script $(s)"); \ > > $(s) $(TARGET_DIR)$(sep)) > > -endif > > I wonder, if there are multiple scripts, won't the second MESSAGE be > echoed by make? I had expected that the @ would only apply to the first > line when they are separated with $(sep), and that each invocation would > run in a separate shell. Well, it does work as expected: the two scripts I have are properly echoed with: >>> Executing post-build script /blabla/script-1 [traces for script-1] >>> Executing post-build script /blabla/script-2 [traces for script-2] > By the way, a very simple alternative would be to remove the @ in front > of the foreach, then each script invocation will be echoed by make. Indeed, but I also like the highlighted trace. It makes it easier to spot the scripts traces. Regards, Yann E. MORIN.
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
Luca> This also simplifies code by removing the ifneq/endif clauses.
Luca> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Luca> ---
Luca> Makefile | 4 +---
Luca> 1 file changed, 1 insertion(+), 3 deletions(-)
Luca> diff --git a/Makefile b/Makefile
Luca> index c95bb1e..75f0f0c 100644
Luca> --- a/Makefile
Luca> +++ b/Makefile
Luca> @@ -509,11 +509,9 @@ endif
Luca> $${dir}/ $(TARGET_DIR); \
Luca> done
Luca> -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
Luca> - @$(call MESSAGE,"Executing post-build script\(s\)")
Luca> @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
Luca> + $(call MESSAGE,"Executing post-build script $(s)"); \
Luca> $(s) $(TARGET_DIR)$(sep))
Double space after 'executing'. Committed with that fixed, thanks.
Peter Korsgaard wrote: >>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes: > Luca> This also simplifies code by removing the ifneq/endif clauses. > Luca> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> > Luca> --- > Luca> Makefile | 4 +--- > Luca> 1 file changed, 1 insertion(+), 3 deletions(-) > > Luca> diff --git a/Makefile b/Makefile > Luca> index c95bb1e..75f0f0c 100644 > Luca> --- a/Makefile > Luca> +++ b/Makefile > Luca> @@ -509,11 +509,9 @@ endif > Luca> $${dir}/ $(TARGET_DIR); \ > Luca> done > > Luca> -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"") > Luca> - @$(call MESSAGE,"Executing post-build script\(s\)") > Luca> @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ > Luca> + $(call MESSAGE,"Executing post-build script $(s)"); \ > Luca> $(s) $(TARGET_DIR)$(sep)) > > Double space after 'executing'. Committed with that fixed, thanks. Ouch, thanks. Luca
On 08/04/13 18:50, Luca Ceresoli wrote: > This also simplifies code by removing the ifneq/endif clauses. > > Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > --- > Makefile | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index c95bb1e..75f0f0c 100644 > --- a/Makefile > +++ b/Makefile > @@ -509,11 +509,9 @@ endif > $${dir}/ $(TARGET_DIR); \ > done > > -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"") > - @$(call MESSAGE,"Executing post-build script\(s\)") > @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ > + $(call MESSAGE,"Executing post-build script $(s)"); \ > $(s) $(TARGET_DIR)$(sep)) > -endif > > ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) > LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge >
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: Arnout> On 08/04/13 18:50, Luca Ceresoli wrote: >> This also simplifies code by removing the ifneq/endif clauses. >> >> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Arnout> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> FYI, I applied this and the post-image patch on the 24th.
diff --git a/Makefile b/Makefile index c95bb1e..75f0f0c 100644 --- a/Makefile +++ b/Makefile @@ -509,11 +509,9 @@ endif $${dir}/ $(TARGET_DIR); \ done -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"") - @$(call MESSAGE,"Executing post-build script\(s\)") @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ + $(call MESSAGE,"Executing post-build script $(s)"); \ $(s) $(TARGET_DIR)$(sep)) -endif ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
This also simplifies code by removing the ifneq/endif clauses. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)