mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-29 00:05:58 +00:00
23c2b99e9d
Fixes Savannah bug #34530.
25 lines
685 B
Perl
25 lines
685 B
Perl
# -*-perl-*-
|
|
|
|
$description = "Test the --warn-undefined-variables option.";
|
|
|
|
$details = "Verify that warnings are printed for referencing undefined variables.";
|
|
|
|
# Without --warn-undefined-variables, nothing should happen
|
|
run_make_test('
|
|
EMPTY =
|
|
EREF = $(EMPTY)
|
|
UREF = $(UNDEFINED)
|
|
|
|
SEREF := $(EREF)
|
|
SUREF := $(UREF)
|
|
|
|
all: ; @echo ref $(EREF) $(UREF)',
|
|
'', 'ref');
|
|
|
|
# With --warn-undefined-variables, it should warn me
|
|
run_make_test(undef, '--warn-undefined-variables',
|
|
"#MAKEFILE#:7: warning: undefined variable 'UNDEFINED'
|
|
#MAKEFILE#:9: warning: undefined variable 'UNDEFINED'
|
|
ref");
|
|
|
|
1;
|