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