blob: 34bfaea4e260f1800f3842d45185e664761b8aa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# -*-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;
|