mirror of
https://github.com/mirror/make.git
synced 2024-12-26 21:00:30 +08:00
[SV 64115] Suppress warnings about undefined GNUMAKEFLAGS
* src/variable.c (defined_vars): Add GNUMAKEFLAGS to defined variables. * tests/scripts/options/warn: Add a test.
This commit is contained in:
parent
0880e5c86a
commit
ebe0a1c9f1
@ -1916,6 +1916,7 @@ static const struct defined_vars defined_vars[] = {
|
||||
{ STRING_SIZE_TUPLE ("VPATH") },
|
||||
{ STRING_SIZE_TUPLE ("GPATH") },
|
||||
{ STRING_SIZE_TUPLE (WARNINGS_NAME) },
|
||||
{ STRING_SIZE_TUPLE (GNUMAKEFLAGS_NAME) },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,17 @@ all:; @#HELPER# env MAKEFLAGS
|
||||
!,
|
||||
'--warn-undefined-variables', "MF= --warn=undefined-var\nMAKEFLAGS= --warn=undefined-var");
|
||||
|
||||
# sv 64115.
|
||||
# Verify that -R along with --warn-undefined-variables do not warn about
|
||||
# internal variables, such as GNUMAKEFLAGS.
|
||||
|
||||
run_make_test(q!
|
||||
$(info MF=$(MAKEFLAGS))
|
||||
all:; @#HELPER# env MAKEFLAGS
|
||||
!,
|
||||
'-R --warn-undefined-variables', "MF=rR --warn=undefined-var\nMAKEFLAGS=rR --warn=undefined-var");
|
||||
|
||||
|
||||
# Verify parsing of --warn in various forms.
|
||||
|
||||
while (my ($f, $r) = each %warn_test) {
|
||||
|
Loading…
Reference in New Issue
Block a user