mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-29 08:09:02 +00:00
0a81d50d66
We are restarting with the original command line flags, so if we set MAKEFLAGS as well that will cause double flags.
29 lines
817 B
Perl
29 lines
817 B
Perl
# -*-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");
|
|
|
|
# Make sure that --eval is handled correctly during restarting
|
|
run_make_test(q!
|
|
all: ; @echo $@
|
|
-include gen.mk
|
|
gen.mk: ; @echo > $@
|
|
!,
|
|
'--eval=\$\(info\ eval\)', "eval\neval\nall");
|
|
|
|
unlink('gen.mk');
|
|
|
|
1;
|