make/tests/scripts/options
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
..
dash-B [SV 102] Don't show unnecessary include file errors. 2016-04-09 20:06:46 -04:00
dash-C Refresh the test suite framework implementation. 2019-09-16 08:25:33 -04:00
dash-e tests: Simplify customization of %ENV 2020-04-01 02:02:57 -04:00
dash-f * Added the test suite to the main distribution. 1999-09-14 02:03:19 +00:00
dash-I [SV 60412] Allow -I- to throw out the current directory path 2021-09-03 12:08:11 -04:00
dash-k [SV 60595] Restart whenever any makefile is rebuilt 2021-09-03 12:08:11 -04:00
dash-l Add test suite support to Windows 2017-06-04 18:37:20 -04:00
dash-n * tests/run_make_test.pl: Fix support for valgrind. 2019-09-21 15:13:24 -04:00
dash-q [SV 47151] Exit with 1 when checking recursive make -q 2016-02-29 01:33:50 -05:00
dash-r [SV 45211] Parse MAKEFLAGS immediately when it's reset 2021-09-05 21:08:59 -04:00
dash-s * main.c (switches): Add --no-silent to undo -s options. 2016-12-28 09:25:34 -05:00
dash-t Commit fix for bug #1418. 2003-03-25 00:15:25 +00:00
dash-W [SV 102] Don't show unnecessary include file errors. 2016-04-09 20:06:46 -04:00
eval Add test suite support to Windows 2017-06-04 18:37:20 -04:00
general Add test suite support to Windows 2017-06-04 18:37:20 -04:00
print-directory Obey order of multiple print/no-print directory options 2020-03-31 00:17:49 -04:00
symlinks * tests: Convert from File::Spec::Functions to File::Spec. 2019-09-21 16:37:56 -04:00
warn-undefined-variables Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines. 2012-03-04 00:24:20 +00:00