make-dfsg/tests/scripts/functions/value
Manoj Srivastava dd2321f4b2 Initial upstream version
Initial upstream version


git-archimport-id: srivasta@debian.org--2003-primary/make--upstream--3.0--base-0
2004-02-10 17:14:09 +00:00

31 lines
732 B
Perl

# -*-perl-*-
$description = "Test the value function.";
$details = "This is a test of the value function in GNU make.
This function will evaluate to the value of the named variable with no
further expansion performed on it.\n";
open(MAKEFILE,"> $makefile");
print MAKEFILE <<'EOF';
export FOO = foo
recurse = FOO = $FOO
static := FOO = $(value FOO)
all: ; @echo $(recurse) $(value recurse) $(static) $(value static)
EOF
close(MAKEFILE);
&run_make_with_options($makefile, "", &get_logfile);
# Create the answer to what should be produced by this Makefile
$answer = "FOO = OO FOO = foo FOO = foo FOO = foo\n";
&compare_output($answer,&get_logfile(1));
1;