Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] query about change to $(MAKE) definition
@ 2008-07-08  7:10 Hamish Moffatt
  2008-07-08  8:16 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Hamish Moffatt @ 2008-07-08  7:10 UTC (permalink / raw)
  To: buildroot

Peter,

Can you explain the rationale behind the following change to 
package/Makefile.in you made last week?

It's causing my kernel builds to be very noisy now. I have a custom
makefile for my kernel build, and I'm now getting a ton of

make[5]: warning: -jN forced in submake: disabling jobserver mode.

warnings from it, because $(MAKE) has changed from
'/usr/bin/make -j2' to: '/usr/bin/make MAKE=/usr/bin/make -j2'.

So now -j2 is passed to every submake instance, rather than letting make
itself do the right thing. I'm guessing other builds that do anything
tricky might also suffer.

Thanks
Hamish

Index: package/Makefile.in
===================================================================
--- package/Makefile.in	(revision 22589)
+++ package/Makefile.in	(revision 22590)
@@ -6,15 +6,14 @@
 endif
 HOSTMAKE :=$(shell $(CONFIG_SHELL) -c "which $(HOSTMAKE)" || type -p $(HOSTMAKE) || echo make)
 
-MAKE1:=$(HOSTMAKE) MAKE="$(firstword $(HOSTMAKE)) -j1"
-MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL)
-
 # honor silent mode
 ifeq (s,$(findstring s,$(MAKEFLAGS)))
-MAKE1+= -s
-MAKE+= -s
+MAKESILENT:=-s
 endif
 
+MAKE1:=$(HOSTMAKE) MAKE='$(firstword $(HOSTMAKE)) -j1 $(MAKESILENT)'
+MAKE:=$(HOSTMAKE) MAKE='$(firstword $(HOSTMAKE)) -j$(BR2_JLEVEL) $(MAKESILENT)'
+
 ifeq ($(BR2_OPTIMIZE_0),y)
 TARGET_OPTIMIZATION=-O0
 endif


-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

* [Buildroot] query about change to $(MAKE) definition
  2008-07-08  7:10 [Buildroot] query about change to $(MAKE) definition Hamish Moffatt
@ 2008-07-08  8:16 ` Peter Korsgaard
  2008-07-08  8:26   ` Bernhard Fischer
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2008-07-08  8:16 UTC (permalink / raw)
  To: buildroot

>>>>> "Hamish" == Hamish Moffatt <hamish@cloud.net.au> writes:

Hi,

 Hamish> Peter,
 Hamish> Can you explain the rationale behind the following change to
 Hamish> package/Makefile.in you made last week?

Sure.

 Hamish> It's causing my kernel builds to be very noisy now. I have a
 Hamish> custom makefile for my kernel build, and I'm now getting a
 Hamish> ton of

 Hamish> make[5]: warning: -jN forced in submake: disabling jobserver mode.

Strange, I haven't seen that before.

 Hamish> warnings from it, because $(MAKE) has changed from
 Hamish> '/usr/bin/make -j2' to: '/usr/bin/make MAKE=/usr/bin/make -j2'.
 Hamish> So now -j2 is passed to every submake instance, rather than
 Hamish> letting make itself do the right thing. I'm guessing other
 Hamish> builds that do anything tricky might also suffer.

Yeah, I wanted to propagate the HOSTMAKE setting to the sub makes and
get -j and -s correct.

But now reading the make manual in details
(http://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html#Options_002fRecursion)
it seems like -s and -j are handled automatically, and from a quick
test it indeed seems to be the case for -s. Strange, that's afaik no
what I was seing before, hence the extra code.

The easiest would actually be if would get rid of the BR2_JLEVEL stuff
completely and just let people use -j<whatever> on the top level make
instead, then make should handle it all automatically. Why don't we do
it like that? Is something in the toplevel makefile broken for
parallel builds? (I know lots of other buildroot stuff is broken for
parallel). Then we could also get rid of the HOSTMAKE thing and it
would all boil down to:

MAKE1=$(MAKE) -j1

What do you say?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] query about change to $(MAKE) definition
  2008-07-08  8:16 ` Peter Korsgaard
@ 2008-07-08  8:26   ` Bernhard Fischer
  2008-07-08  9:02     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Bernhard Fischer @ 2008-07-08  8:26 UTC (permalink / raw)
  To: buildroot

On Tue, Jul 08, 2008 at 10:16:58AM +0200, Peter Korsgaard wrote:
>>>>>> "Hamish" == Hamish Moffatt <hamish@cloud.net.au> writes:

>The easiest would actually be if would get rid of the BR2_JLEVEL stuff
>completely and just let people use -j<whatever> on the top level make
>instead, then make should handle it all automatically. Why don't we do
>it like that? Is something in the toplevel makefile broken for
>parallel builds? (I know lots of other buildroot stuff is broken for
>parallel). Then we could also get rid of the HOSTMAKE thing and it
>would all boil down to:
>
>MAKE1=$(MAKE) -j1
>
>What do you say?

See ML archives where i talked about parallel builds and toplevel
parallel builds.

HTH,

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

* [Buildroot] query about change to $(MAKE) definition
  2008-07-08  8:26   ` Bernhard Fischer
@ 2008-07-08  9:02     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2008-07-08  9:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Bernhard" == Bernhard Fischer <rep.dot.nop@gmail.com> writes:

Hi,

 >> What do you say?

 Bernhard> See ML archives where i talked about parallel builds and toplevel
 Bernhard> parallel builds.

Can you be more specific, I don't find anything right away on gmane.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2008-07-08  9:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08  7:10 [Buildroot] query about change to $(MAKE) definition Hamish Moffatt
2008-07-08  8:16 ` Peter Korsgaard
2008-07-08  8:26   ` Bernhard Fischer
2008-07-08  9:02     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox