1 # -*-perl-*- 2 3 $description = "Test special GNU make variables."; 4 5 $details = ""; 6 7 &run_make_test(' 8 9 X1 := $(sort $(filter FOO BAR,$(.VARIABLES))) 10 11 FOO := foo 12 13 X2 := $(sort $(filter FOO BAR,$(.VARIABLES))) 14 15 BAR := bar 16 17 all: 18 @echo X1 = $(X1) 19 @echo X2 = $(X2) 20 @echo LAST = $(sort $(filter FOO BAR,$(.VARIABLES))) 21 ', 22 '', "X1 =\nX2 = FOO\nLAST = BAR FOO\n"); 23 24 25 26 # $makefile2 = &get_tmpfile; 27 # open(MAKEFILE, "> $makefile2"); 28 29 # print MAKEFILE <<'EOF'; 30 31 # X1 := $(sort $(.TARGETS)) 32 33 # all: foo 34 # @echo X1 = $(X1) 35 # @echo X2 = $(X2) 36 # @echo LAST = $(sort $(.TARGETS)) 37 38 # X2 := $(sort $(.TARGETS)) 39 40 # foo: 41 42 # EOF 43 44 # close(MAKEFILE); 45 46 # # TEST #2 47 # # ------- 48 49 # &run_make_with_options($makefile2, "", &get_logfile); 50 # $answer = "X1 =\nX2 = all\nLAST = all foo\n"; 51 # &compare_output($answer, &get_logfile(1)); 52 53 54 1; 55