diff options
author | psmith <> | 2009-10-25 00:46:52 +0000 |
---|---|---|
committer | psmith <> | 2009-10-25 00:46:52 +0000 |
commit | 2283bb3da08b72fca35b31693b2be207ab423542 (patch) | |
tree | c65eff0a3985bfdad9271540dc241f9655a32564 /tests/scripts | |
parent | f98f9c6d9c77a1292cac4eeb8f4688f5b263ca76 (diff) | |
download | make-2283bb3da08b72fca35b31693b2be207ab423542.tar.gz |
New command line option: --eval=STRING will cause STRING to be
evaluated as a makefile statement before the first makefile is
read.
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/options/eval | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/scripts/options/eval b/tests/scripts/options/eval new file mode 100644 index 00000000..06a035c3 --- /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; |