mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-13 01:07:36 +00:00
a275f4e9ab
If -e was given we weren't expanding MAKEFLAGS before passing it through the environment to jobs: we don't expand variables we receive from the environment and when -e is given we set the origin of MAKEFLAGS to "environment override". Check for MAKEFLAGS specifically, which seems like a hack but I don't have a better idea offhand. * src/main.c (main): Drive-by: use o_default for MAKEOVERRIDES. * src/variable.c (target_environment): Always expand MAKEFLAGS regardless of the origin type. * tests/scripts/options/dash-e: Create a test.
24 lines
604 B
Perl
24 lines
604 B
Perl
# -*-perl-*-
|
|
|
|
$description = "Test the -e (environment overrides) option";
|
|
|
|
$ENV{GOOGLE} = 'boggle';
|
|
|
|
run_make_test(q!
|
|
GOOGLE = bazzle
|
|
all:; @echo "$(GOOGLE)"
|
|
!,
|
|
'-e', "boggle\n");
|
|
|
|
# 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.");
|
|
|
|
1;
|