> You do have to keep filtering that out for sub-makes, though.
>
> Another idea is: instead of filtering MAKEFLAGS, save it
> and restore it:
>
> SAVED_MAKEFLAGS := $(MAKEFLAGS)
>
> Then in recursive recipes do MAKEFLAGS=$(SAVED_MAKEFLAGS) or whatever.
I tried to implement your suggestion, but I ran into the following problem.
The value of MAKEFLAGS at the beginning of my makefile is:
rRw --warn-undefined-variables
However, the value of MAKEFLAGS at the beginning of a recipe is:
rRw -j5 -Orecurse --jobserver-auth=3,4 --warn-undefined-variables
So I guess that GNU Make is injecting the jobserver flags into MAKEFLAGS before
running each rule.
If I save the value of MAKEFLAGS at the beginning, like you suggested, and then
use it in the recipe, I will lose the jobserver flags, right?
Thanks in advance,
rdiez