bug-make
[Top][All Lists]
Advanced

[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
behavior.

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
pipe.

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:

  <https://savannah.gnu.org/bugs/?57178>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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