make/tests/scripts
Paul Smith f4b8ddf260 [SV 45211] Parse MAKEFLAGS immediately when it's reset
When MAKEFLAGS is set in a makefile, reparse it immediately rather
than waiting until after all makefiles have been read and parsed.
This change doesn't actually fix the SV bug referenced because, even
though we do reparse MAKEFLAGS, we don't handle the -r or -R options
immediately.  Doing this will require more effort.

* NEWS: Announce the change.
* src/makeint.h: Publish reset_switches() and decode_env_switches()
from main.c
* src/main.c (main): Don't call construct_include_path(); it will be
invoked decode_switches().
Preserve the old values of builtin_rules, builtin_variables, and
job_slots before we read makefiles since they can be changed now.
(reset_switches): Publish (remove static).  Set the initial value of
the stringlist list to NULL.
(decode_switches): Call construct_include_path() after decoding.
(decode_env_switches): Publish (remove static).
(define_makeflags): Set the MAKEFLAGS variable for special handling.
* src/read.c (eval_makefile): Check for empty include_directories.
(construct_include_path): Clear any old value of .INCLUDE_DIRS before
appending new values.  Free the previous include_directories.
* src/variable.c (lookup_special_var): When MAKEFLAGS is set, first
reset the switches then re-parse the variable.
* tests/run_make_tests.pl: Memo-ize some default variable values.
* tests/scripts/options/dash-r: Create tests for setting -r and -R.
* tests/scripts/variables/MAKEFLAGS: Test that resetting -I from
within the makefile takes effect immediately.
2021-09-05 21:08:59 -04:00
..
features [SV 60595] Restart whenever any makefile is rebuilt 2021-09-03 12:08:11 -04:00
functions Fix build and test issues on Windows 2021-03-28 16:25:52 -04:00
misc [SV 35711] Check for special targets earlier 2020-11-29 17:55:02 -05:00
options [SV 45211] Parse MAKEFLAGS immediately when it's reset 2021-09-05 21:08:59 -04:00
targets [SV 60297] Add .NOTINTERMEDIATE special target 2021-07-25 17:15:38 -04:00
variables [SV 45211] Parse MAKEFLAGS immediately when it's reset 2021-09-05 21:08:59 -04:00
vms Refresh the test suite framework implementation. 2019-09-16 08:25:33 -04:00
test_template Update the test template. A few fixes in run_make_test(). 2004-09-22 04:36:17 +00:00