From 4e51b6d9a4eb7eef2272551d55d8abaadd5f01e3 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 25 Oct 2009 00:46:52 +0000 Subject: New command line option: --eval=STRING will cause STRING to be evaluated as a makefile statement before the first makefile is read. --- tests/scripts/options/eval | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/scripts/options/eval (limited to 'tests') 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; -- cgit v1.2.3