On Mon, 2022-11-07 at 20:32 +0100, Steffen Nurpmeso wrote: > mkdir /tmp/t > cd /tmp/t > cat > makefile <<'EOT' > .NOTPARALLEL: > .WAIT: # Luckily BSD make supports specifying this as target, too > config: > @{ echo MAKE=\"$(MAKE)\";echo MAKEFLAGS=\"$(MAKEFLAGS)\"; } > > ./au;echo config > all: > . ./au;echo all;$${MAKE} internal_ > internal_: > @echo MAKE=$(MAKE), MAKEFLAGS=$(MAKEFLAGS) > EOT
I see. I don't think any of us envisioned this idea of storing the MAKEFLAGS from a previous run and using them in a subsequent run. That is an interesting use-case. > I mean, _if_ the FIFO does not exist then "the server exited > gracefully", which it would not do upon crash, no? Just ignore > ENOENT thus? What do you say? I agree that we should drop down to "jobserver unavailable" here rather than having a fatal error. > Btw if it would be me, i would pass that via environment > variables, which makes a natural connection to a server and its > child clients. I mean, Linux and GNU LibC now make (some aspects > of) environment inaccessible for root aka SUID i think (E?UID > mismatches, issetuid or what-do-i-know, but this hardly is > a problem for GNU make. I'm not sure I understand what you are saying. These values ARE passed to the child clients through the environment. That's what MAKEFLAGS _is_, it's the environment variable that's used to allow a parent make to provide information on options etc. to its sub-makes. The POSIX spec says (in the Rationale): > The environment [of the child processes] is the same as the > environment to make except that MAKEFLAGS [...] are added