summaryrefslogtreecommitdiff
path: root/tests/scripts/options/eval
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-08-26 19:24:46 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-08-26 19:24:46 +0400
commite46c9ea201b4bad8f4c6d19ee6dfb3537bc9facd (patch)
tree26ae9736985be2ef61032e7808b9fb0e2155c71f /tests/scripts/options/eval
downloadmake.old-upstream.tar.gz
Imported GNU Make 3.81upstream/3.82upstream
Diffstat (limited to 'tests/scripts/options/eval')
-rw-r--r--tests/scripts/options/eval19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/scripts/options/eval b/tests/scripts/options/eval
new file mode 100644
index 0000000..06a035c
--- /dev/null
+++ b/tests/scripts/options/eval
@@ -0,0 +1,19 @@
+# -*-perl-*-
+
+$description = "Test the --eval option.";
+
+$details = "Verify that --eval options take effect,
+and are passed to sub-makes.";
+
+# Verify that --eval is evaluated first
+run_make_test(q!
+BAR = bar
+all: ; @echo all
+recurse: ; @$(MAKE) -f #MAKEFILE# && echo recurse!,
+ '--eval=\$\(info\ eval\) FOO=\$\(BAR\)', "eval\nall");
+
+# Make sure that --eval is handled correctly during recursion
+run_make_test(undef, '--no-print-directory --eval=\$\(info\ eval\) recurse',
+ "eval\neval\nall\nrecurse");
+
+1;