Save strings we're expanding in case an embedded eval causes them
[make.git] / tests / scripts / features / varnesting
blobd8f3ffbb12b1907711b77c6a005e81cd34064b90
1 #                                                                    -*-perl-*-
2 $description = "Test recursive variables";
4 $details = "";
6 run_make_test('
7 x = variable1
8 variable2 := Hello
9 y = $(subst 1,2,$(x))
10 z = y
11 a := $($($(z)))
12 all: 
13         @echo $(a)
15               '', "Hello\n");
17 # This tests resetting the value of a variable while expanding it.
18 # You may only see problems with this if you're using valgrind or
19 # some other memory checker that poisons freed memory.
20 # See Savannah patch #7534
22 run_make_test('
23 VARIABLE = $(eval VARIABLE := echo hi)$(VARIABLE)
24 wololo:
25         @$(VARIABLE)
27               '', "hi\n");