]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 61218] Ensure MAKEFLAGS is expanded even with -e
authorPaul Smith <psmith@gnu.org>
Sun, 8 Jan 2023 21:40:55 +0000 (16:40 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 8 Jan 2023 21:40:55 +0000 (16:40 -0500)
commita275f4e9ab14a2ff827b67b46dd3bc746cdba328
treec3b0ad2b7de5e6548197aa3b580f94796e71871a
parent11444fb001cf57f32fb5022cd934c3cf489e66b2
[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.
src/main.c
src/variable.c
tests/scripts/options/dash-e