|
From: | Kaz Kylheku (gmake) |
Subject: | Re: Flag --no-builtin-rules etc. just for this makefile (no flag inheritance) |
Date: | Sat, 18 Apr 2020 06:59:58 -0700 |
User-agent: | Roundcube Webmail/0.9.2 |
On 2020-04-18 06:27, R. Diez wrote:
There is a catch, though: those flags are inherited over environment variable MAKEFLAGS. So I have to manually filter them out when calling submakefiles.
MAKEFLAGS is actually the solution. You can *add* to it and the flags take effect.
Therefore, it would be nice if you could specify those flags as file-level directives, like this: .NO_BUILT_IN_RULES: .NO_BUILT_IN_VARIABLES: .WARN_UNDEFINED_VARIABLES:
Thus: MAKEFLAGS += --no-builtin-rules ... 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.
[Prev in Thread] | Current Thread | [Next in Thread] |