Home | History | Annotate | Download | only in options
      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
      8 run_make_test('
      9 EMPTY =
     10 EREF = $(EMPTY)
     11 UREF = $(UNDEFINED)
     12 
     13 SEREF := $(EREF)
     14 SUREF := $(UREF)
     15 
     16 all: ; @echo ref $(EREF) $(UREF)',
     17               '', 'ref');
     18 
     19 # With --warn-undefined-variables, it should warn me
     20 run_make_test(undef, '--warn-undefined-variables',
     21               "#MAKEFILE#:7: warning: undefined variable `UNDEFINED'
     22 #MAKEFILE#:9: warning: undefined variable `UNDEFINED'
     23 ref");
     24 
     25 1;
     26