Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v10 7/8] package: enable jobserver for recursive make
Date: Fri, 20 Dec 2013 16:47:44 +0100	[thread overview]
Message-ID: <52B466A0.8000105@mind.be> (raw)
In-Reply-To: <CAHkwnC80BXHiGW5ywYpBHFON_7yK0x3Oyve_ymzoWh8bb1oiUw@mail.gmail.com>

On 20/12/13 14:24, Fabio Porcedda wrote:
> On Thu, Dec 19, 2013 at 6:27 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>> On 18/12/13 11:36, Fabio Porcedda wrote:
>>>
>>> Add '+' prefix to the $($(PKG)_BUILD_CMDS) and $($(PKG)_INSTALL*_CMDS)
>>> commands to enable jobserver for the sub-make.
>>>
>>> Without the '+' prefix GNU make does not detect the sub-make so it
>>> disable the jobserver for the sub-make.
>>
>>
>>   $(PKG)_BUILD_CMDS is a multiline define, and the recursive make call may
>> not be the first command. Can you check if this still works if the build
>> commands are something like:
>>
>> define FOO_BUILD_CMDS
>>          echo "Hello world!"
>>          $(MAKE) -C $(@D)
>> endef
>
> The following test seems to work fine:

  OK, good!

  Regards,
  Arnout

>
> define test
>      echo test
>      $($(PKG)_BUILD_CMDS)
> endef
>
> # Build
> $(BUILD_DIR)/%/.stamp_built::
>      @$(call step_start,build)
>      @$(call MESSAGE,"Building")
>      +$(test)
>      ...
>
> Test output:
> -----
> $ make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1)) -s wget-build
>>>> wget 1.14 Building
> test
> Making all in lib
> Making all in src
> Making all in doc
> Making all in po
> Making all in tests
> Making all in util
> ----
>
> If i remove the '+' charter:
> ----
> $ make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1)) -s wget-build
>>>> wget 1.14 Building
> test
> make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent
> make rule.
> Making all in lib
> Making all in src
> Making all in doc
> Making all in po
> Making all in tests
> Making all in util
> ----
>
> Best regards
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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

  reply	other threads:[~2013-12-20 15:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 10:36 [Buildroot] [PATCH v10 0/8] Add support for top-level parallel make Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 1/8] package: add base dependency to every package Fabio Porcedda
2014-01-09 17:30   ` Arnout Vandecappelle
2014-01-10 10:28     ` Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 2/8] package: add toolchain dependency to every target package Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 3/8] package: add support for top-level parallel make Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 4/8] uclibc: " Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 5/8] glibc: " Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 6/8] Makefile: " Fabio Porcedda
2013-12-18 10:36 ` [Buildroot] [PATCH v10 7/8] package: enable jobserver for recursive make Fabio Porcedda
2013-12-19 17:27   ` Arnout Vandecappelle
2013-12-20 13:24     ` Fabio Porcedda
2013-12-20 15:47       ` Arnout Vandecappelle [this message]
2013-12-19 20:32   ` Peter Korsgaard
2013-12-20 13:05     ` Fabio Porcedda
2013-12-20 14:54       ` Peter Korsgaard
2013-12-18 10:36 ` [Buildroot] [PATCH v10 8/8] Makefile: update comment about top-level parallel Makefile Fabio Porcedda
2013-12-19 17:37   ` Arnout Vandecappelle
2013-12-20 13:56     ` Fabio Porcedda
2013-12-20 15:48       ` Arnout Vandecappelle
2014-01-07 10:05         ` Fabio Porcedda
2014-01-07 13:17           ` Mike Zick
2014-01-09  8:10             ` Fabio Porcedda
2013-12-19 17:33 ` [Buildroot] [PATCH v10 0/8] Add support for top-level parallel make Arnout Vandecappelle
2013-12-20 14:36   ` Fabio Porcedda
2013-12-20 15:34     ` Thomas Petazzoni
2013-12-20 15:46       ` Arnout Vandecappelle
2013-12-20 16:01         ` Fabio Porcedda
2014-01-08  9:56   ` Fabio Porcedda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B466A0.8000105@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox