• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#                                                                    -*-perl-*-
2
3$description = "Test the --warn-undefined-variables option.";
4
5$details = "Verify that warnings are printed for referencing undefined variables.";
6
7# Without --warn-undefined-variables, nothing should happen
8run_make_test('
9EMPTY =
10EREF = $(EMPTY)
11UREF = $(UNDEFINED)
12
13SEREF := $(EREF)
14SUREF := $(UREF)
15
16all: ; @echo ref $(EREF) $(UREF)',
17              '', 'ref');
18
19# With --warn-undefined-variables, it should warn me
20run_make_test(undef, '--warn-undefined-variables',
21              "#MAKEFILE#:7: warning: undefined variable `UNDEFINED'
22#MAKEFILE#:9: warning: undefined variable `UNDEFINED'
23ref");
24
251;
26