All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/canfestival: don't build in parallel
@ 2015-08-22 21:34 Yann E. MORIN
  2015-08-25 10:17 ` Thomas Petazzoni
  2015-08-25 18:53 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2015-08-22 21:34 UTC (permalink / raw)
  To: buildroot

The Makefiles for canfestival are not correctly written, which leads to
multiple warnings such as:

    make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.

Since canfestival is relatively small, it builds in less than 6s here
when not in parallell, while a parallel build takes 5s.

Just disable parallel build to avoid future surprises.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/canfestival/canfestival.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/canfestival/canfestival.mk b/package/canfestival/canfestival.mk
index e929c5e..61578d3 100644
--- a/package/canfestival/canfestival.mk
+++ b/package/canfestival/canfestival.mk
@@ -36,13 +36,13 @@ define CANFESTIVAL_CONFIGURE_CMDS
 endef
 
 define CANFESTIVAL_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all \
+	$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) all \
 		PYTHON=$(HOST_DIR)/usr/bin/python2
 endef
 
 define CANFESTIVAL_INSTALL_TARGET_CMDS
 	for d in $(CANFESTIVAL_INSTALLED-y) ; do \
-		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d install \
+		$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/$$d install \
 			PYTHON=$(HOST_DIR)/usr/bin/python2 \
 			DESTDIR=$(TARGET_DIR) || exit 1 ; \
 	done
@@ -50,7 +50,7 @@ endef
 
 define CANFESTIVAL_INSTALL_STAGING_CMDS
 	for d in $(CANFESTIVAL_INSTALLED-y) ; do \
-		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d install \
+		$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/$$d install \
 			PYTHON=$(HOST_DIR)/usr/bin/python2 \
 			DESTDIR=$(STAGING_DIR) || exit 1 ; \
 	done
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/canfestival: don't build in parallel
  2015-08-22 21:34 [Buildroot] [PATCH] package/canfestival: don't build in parallel Yann E. MORIN
@ 2015-08-25 10:17 ` Thomas Petazzoni
  2015-08-25 11:55   ` Yann E. MORIN
  2015-08-25 18:53 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-08-25 10:17 UTC (permalink / raw)
  To: buildroot

Yann,

On Sat, 22 Aug 2015 23:34:50 +0200, Yann E. MORIN wrote:
> The Makefiles for canfestival are not correctly written, which leads to
> multiple warnings such as:
> 
>     make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
> 
> Since canfestival is relatively small, it builds in less than 6s here
> when not in parallell, while a parallel build takes 5s.
> 
> Just disable parallel build to avoid future surprises.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Do you actually understand why make is displaying those warning
messages in the first place? From what I understood from the make
manual, it typically happens when you call "make" directly for a
subdirectory instead of using $(MAKE). A quick test on a simple example
seems to confirm that.

However, I see that canfestival seems to be using $(MAKE) everywhere,
so I don't see why make decides that the jobserver is not available.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/canfestival: don't build in parallel
  2015-08-25 10:17 ` Thomas Petazzoni
@ 2015-08-25 11:55   ` Yann E. MORIN
  2015-08-25 13:12     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2015-08-25 11:55 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-08-25 12:17 +0200, Thomas Petazzoni spake thusly:
> On Sat, 22 Aug 2015 23:34:50 +0200, Yann E. MORIN wrote:
> > The Makefiles for canfestival are not correctly written, which leads to
> > multiple warnings such as:
> > 
> >     make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
> > 
> > Since canfestival is relatively small, it builds in less than 6s here
> > when not in parallell, while a parallel build takes 5s.
> > 
> > Just disable parallel build to avoid future surprises.
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Do you actually understand why make is displaying those warning
> messages in the first place?

Yes, and it's a bit tricky.

canfestival indeed uses $(MAKE) everywhere. However, it is using it in a
variable, like so:

    define build_cmds
        $(MAKE) foo
        $(MAKE) bar
    endef

    all:
        $(build_cmds)

Since $(MAKE) is not directly in the rule body, it looses its magic
behaviour. This is explicited said so in the make manual:

    This special feature is only enabled if the MAKE variable appears
    directly in the recipe: it does not apply if the MAKE variable is
    referenced through expansion of another variable.

Ergo.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/canfestival: don't build in parallel
  2015-08-25 11:55   ` Yann E. MORIN
@ 2015-08-25 13:12     ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2015-08-25 13:12 UTC (permalink / raw)
  To: buildroot

Yann,

On Tue, 25 Aug 2015 13:55:50 +0200, Yann E. MORIN wrote:

> > Do you actually understand why make is displaying those warning
> > messages in the first place?
> 
> Yes, and it's a bit tricky.
> 
> canfestival indeed uses $(MAKE) everywhere. However, it is using it in a
> variable, like so:
> 
>     define build_cmds
>         $(MAKE) foo
>         $(MAKE) bar
>     endef
> 
>     all:
>         $(build_cmds)
>
> Since $(MAKE) is not directly in the rule body, it looses its magic
> behaviour. This is explicited said so in the make manual:
> 
>     This special feature is only enabled if the MAKE variable appears
>     directly in the recipe: it does not apply if the MAKE variable is
>     referenced through expansion of another variable.
> 
> Ergo.

I have to say I really like working on Buildroot with smart people,
because I learn things every day. Thanks for pointing me to this part
of the documentation I overlooked! I will apply your patch.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/canfestival: don't build in parallel
  2015-08-22 21:34 [Buildroot] [PATCH] package/canfestival: don't build in parallel Yann E. MORIN
  2015-08-25 10:17 ` Thomas Petazzoni
@ 2015-08-25 18:53 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2015-08-25 18:53 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Sat, 22 Aug 2015 23:34:50 +0200, Yann E. MORIN wrote:
> The Makefiles for canfestival are not correctly written, which leads to
> multiple warnings such as:
> 
>     make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
> 
> Since canfestival is relatively small, it builds in less than 6s here
> when not in parallell, while a parallel build takes 5s.
> 
> Just disable parallel build to avoid future surprises.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
>  package/canfestival/canfestival.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-25 18:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-22 21:34 [Buildroot] [PATCH] package/canfestival: don't build in parallel Yann E. MORIN
2015-08-25 10:17 ` Thomas Petazzoni
2015-08-25 11:55   ` Yann E. MORIN
2015-08-25 13:12     ` Thomas Petazzoni
2015-08-25 18:53 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.