source:
kBuild/vendor/gnumake/current/tests/scripts/features/varnesting@
3208
最後變更 在這個檔案從3208是 3138,由 提交於 7 年 前 | |
---|---|
|
|
檔案大小: 629 位元組 |
行 | |
---|---|
1 | # -*-perl-*- |
2 | $description = "Test recursive variables"; |
3 | |
4 | $details = ""; |
5 | |
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) |
14 | ', |
15 | '', "Hello\n"); |
16 | |
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 |
21 | |
22 | run_make_test(' |
23 | VARIABLE = $(eval VARIABLE := echo hi)$(VARIABLE) |
24 | wololo: |
25 | @$(VARIABLE) |
26 | ', |
27 | '', "hi\n"); |
28 | |
29 | 1; |
30 | |
31 | |
32 | |
33 | |
34 | |
35 |
注意:
瀏覽 TracBrowser
來幫助您使用儲存庫瀏覽器