]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 63552] Change directories before constructing include paths
authorPaul Smith <psmith@gnu.org>
Sat, 24 Dec 2022 14:26:24 +0000 (09:26 -0500)
committerPaul Smith <psmith@gnu.org>
Sat, 24 Dec 2022 15:52:43 +0000 (10:52 -0500)
commit76d2e5d98dbbf655f74f6ef2f6dd3cdd45052ea0
tree3a9ed561d856a8031812f472cae408f9bc74fe8d
parenta581146562009407649b85fac48f4e7cafe5eaa0
[SV 63552] Change directories before constructing include paths

* src/makeint.h (reset_makeflags): New function to handle changing
MAKEFLAGS from within makefiles.  Remove decode_env_switches().
* src/variable.c (set_special_var): Call reset_makeflags() instead
of various internal methods.
* src/main.c (decode_env_switches): Only internal now so make static.
(decode_switches): Don't invoke construct_include_path() yet.
(reset_makeflags): Decode env switches and construct include paths.
(main): Construct include paths after we process -C options.
* tests/scripts/options/dash-C: Rewrite to use new test constructs.
Add a test using both -C and -I together.
Add a test for multiple -C options.
src/main.c
src/makeint.h
src/variable.c
tests/scripts/options/dash-C