make/tests/scripts
Paul Smith 98da874c43 [SV 10593] Export variables to $(shell ...) commands
Export all variables, including exported makefile variables, when
invoking a shell for the $(shell ...) function.  If we detect a
recursive variable expansion, silently ignore that variable and do
not export it.  We do print a debug message.

* NEWS: Announce the potential backward-incompatibility.
* doc/make.texi (Shell Function): Document the export behavior.
* src/main.c (main): Add "shell-export" to .FEATURES.
* src/job.h: New function to free struct childbase.
* src/job.c (free_childbase): Implement it; call from free_child.
* src/function.c (func_shell_base): Use target_environment() to
obtain the proper environment for the shell function.
Use free_childbase() to free memory.
(windows32_openpipe): Don't reset the environment: the caller
already provided a proper PATH variable in envp.
* src/variable.c (target_environment): If we detect a recursive
expansion and we're called from func_shell, ignore the variable.
(sync_Path_environment): Simplify and reduce memory allocation.
* tests/scripts/functions/shell: Add tests for this.
2022-07-09 10:44:21 -04:00
..
features [SV 62650] Show correct warning when combining targets 2022-07-09 10:44:00 -04:00
functions [SV 10593] Export variables to $(shell ...) commands 2022-07-09 10:44:21 -04:00
misc tests: Allow run_make_test() to avoid passing -f 2022-02-27 17:47:42 -05:00
options [SV 62100] Add '--shuffle' option support 2022-06-04 19:04:37 -04:00
targets Remove extraneous characters from fatal() calls 2022-02-27 18:01:13 -05:00
variables [SV 62514] Honor command line interface flags 2022-07-09 10:43:33 -04:00
vms Refresh the test suite framework implementation. 2019-09-16 08:25:33 -04:00
test_template