1999-09-14 02:03:19 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
|
2023-01-08 21:40:55 +00:00
|
|
|
$description = "Test the -e (environment overrides) option";
|
1999-09-14 02:03:19 +00:00
|
|
|
|
2020-04-01 05:58:33 +00:00
|
|
|
$ENV{GOOGLE} = 'boggle';
|
1999-09-14 02:03:19 +00:00
|
|
|
|
2020-04-01 05:58:33 +00:00
|
|
|
run_make_test(q!
|
1999-09-14 02:03:19 +00:00
|
|
|
GOOGLE = bazzle
|
|
|
|
all:; @echo "$(GOOGLE)"
|
2020-04-01 05:58:33 +00:00
|
|
|
!,
|
|
|
|
'-e', "boggle\n");
|
1999-09-14 02:03:19 +00:00
|
|
|
|
2023-01-08 21:40:55 +00:00
|
|
|
# Ensure variables set on the command line have the origin correct
|
|
|
|
# See SV 61218
|
|
|
|
|
|
|
|
run_make_test(q!
|
|
|
|
$(info FOO [$(origin FOO)]: $(value FOO))
|
|
|
|
all: ;
|
|
|
|
recurse: ; @$(MAKE) -f #MAKEFILE#
|
|
|
|
!,
|
|
|
|
'-e --no-print-directory FOO=1 recurse',
|
|
|
|
"FOO [command line]: 1\nFOO [command line]: 1\n#MAKE#[1]: 'all' is up to date.");
|
|
|
|
|
1999-09-14 02:03:19 +00:00
|
|
|
1;
|