[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57178] Allow $(shell $(MAKE) ...) to participate in jobserver

From: Paul D. Smith
Subject: [bug #57178] Allow $(shell $(MAKE) ...) to participate in jobserver
Date: Tue, 17 Dec 2019 15:48:33 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

Update of bug #57178 (project make):

              Item Group:                     Bug => Enhancement            
                 Summary: Job server not invoked in initial pass => Allow
$(shell $(MAKE) ...) to participate in jobserver


Follow-up Comment #2:

This issue isn't really about "the first pass", it's about the shell function.
 Even if you were to use the shell function (outside of a recipe) in the
second pass, for example via secondary expansion, you'd still see this same

It doesn't have anything to do with the setting of MAKEFLAGS.

Make disables the jobserver when it determines that the process it's about to
invoke is not a sub-make.  This is needed because some programs do not expect
to have extra file descriptors available and may even corrupt the jobserver

In recipes make detects this by looking for the '+' recipe prefix or else
detecting $(MAKE) or ${MAKE} in the recipe.

However, this detection is never done for the shell function: we always
disable jobserver information even if the text of the shell function contains
$(MAKE) or ${MAKE}.

This could be resolved.  However, I do urge you to consider a different method
for solving your real problem, rather than running a subshell inside a shell
function.  There are a lot of issues with this (for example, error handling
just to name one).


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]