]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 63667] In .POSIX, use shell flags -c when ignoring errors
authorPaul Smith <psmith@gnu.org>
Sat, 28 Jan 2023 16:03:54 +0000 (11:03 -0500)
committerPaul Smith <psmith@gnu.org>
Sat, 28 Jan 2023 18:04:47 +0000 (13:04 -0500)
commitfaedfdb0afd0f774bd58b5a30ca8117d70fa85c7
tree654821120000d7cae7100584cfd70d85103e4a6c
parent9709d273b299b3ced3ebd3cdce2cdca907846451
[SV 63667] In .POSIX, use shell flags -c when ignoring errors

* src/variable.c (lookup_variable_for_file): New function to retrieve
a variable assignment in a file context.
* src/variable.h (lookup_variable_for_file): Declare it.
* src/job.c (construct_command_argv): Look up .SHELLFLAGS.  If .POSIX
is set and we're using the default value, choose -c if we're ignoring
errors else choose -ec.
(construct_command_argv_internal): Ditto.
* tests/scripts/targets/POSIX: Add tests.
src/job.c
src/variable.c
src/variable.h
tests/scripts/targets/POSIX