diff options
author | Paul Smith <psmith@gnu.org> | 2023-01-08 16:40:55 -0500 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2023-01-08 16:40:55 -0500 |
commit | a275f4e9ab14a2ff827b67b46dd3bc746cdba328 (patch) | |
tree | c3b0ad2b7de5e6548197aa3b580f94796e71871a /src/main.c | |
parent | 11444fb001cf57f32fb5022cd934c3cf489e66b2 (diff) | |
download | make-git-a275f4e9ab14a2ff827b67b46dd3bc746cdba328.tar.gz |
[SV 61218] Ensure MAKEFLAGS is expanded even with -e
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.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1920,7 +1920,7 @@ main (int argc, char **argv, char **envp) allow the user's setting of MAKEOVERRIDES to affect MAKEFLAGS, so a reference to this hidden variable is written instead. */ define_variable_cname ("MAKEOVERRIDES", "${-*-command-variables-*-}", - o_env, 1); + o_default, 1); #ifdef VMS vms_export_dcl_symbol ("MAKEOVERRIDES", "${-*-command-variables-*-}"); #endif |