[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Flag --no-builtin-rules etc. just for this makefile (no flag inherit
From: |
R. Diez |
Subject: |
Re: Flag --no-builtin-rules etc. just for this makefile (no flag inheritance) |
Date: |
Sun, 19 Apr 2020 12:55:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
> 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