| 1 |
# -*-perl-*- |
| 2 |
|
| 3 |
$description = "Test the value function."; |
| 4 |
|
| 5 |
$details = "This is a test of the value function in GNU Make. |
| 6 |
This function will evaluate to the value of the named variable with no |
| 7 |
further expansion performed on it.\n"; |
| 8 |
|
| 9 |
open(MAKEFILE,"> $makefile"); |
| 10 |
|
| 11 |
print MAKEFILE <<'EOF'; |
| 12 |
export FOO = foo |
| 13 |
|
| 14 |
recurse = FOO = $FOO |
| 15 |
static := FOO = $(value FOO) |
| 16 |
|
| 17 |
all: ; @echo $(recurse) $(value recurse) $(static) $(value static) |
| 18 |
EOF |
| 19 |
|
| 20 |
close(MAKEFILE); |
| 21 |
|
| 22 |
&run_make_with_options($makefile, "", &get_logfile); |
| 23 |
|
| 24 |
# Create the answer to what should be produced by this Makefile |
| 25 |
$answer = "FOO = OO FOO = foo FOO = foo FOO = foo\n"; |
| 26 |
|
| 27 |
|
| 28 |
&compare_output($answer,&get_logfile(1)); |
| 29 |
|
| 30 |
1; |