bug-make
[Top][All Lists]
Advanced

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

[bug #57242] Non-recursive command passes invalid jobserver file descrip


From: Paul D. Smith
Subject: [bug #57242] Non-recursive command passes invalid jobserver file descriptors
Date: Mon, 30 Nov 2020 16:19:09 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Follow-up Comment #5, bug #57242 (project make):

It is not TOO hard to provide a custom value (that doesn't include the
jobserver options) for the MAKEFLAGS environment variable we set when
forking/execing a command that is not a recursive make.

It's much trickier to reset the MAKEFLAGS make variable to not include those
options when expanding the command lines.  For example:


foo:
        +: $(MAKEFLAGS)
        +: $$MAKEFLAGS
        : $(MAKEFLAGS)
        : $$MAKEFLAGS


Ideally when run with -j you'd see the jobserver options in the first two
lines and you would NOT see them in the last two lines but this is hard.

Much simpler would be to show the jobserver options in the first three lines
but not show them in the last line.  For most uses this is probably sufficient
since many programs will be obtaining this information from their environment
anyway, not from the command line.  Still, it's an annoying "gotcha".

Regarding named pipes: yes this would be a good option (although it comes with
its own issues such as location and permissions); I didn't use this because I
wanted the solution to be maximally portable.  But, perhaps there are no
useful systems left that both (a) provide standard pipes sufficiently well to
support the jobserver and (b) don't provide named pipes.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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