make/tests/scripts/variables
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
..
automatic Apply spelling corrections from Fossies spellcheck 2020-01-20 19:25:54 -05:00
CURDIR Refresh the test suite framework implementation. 2019-09-16 08:25:33 -04:00
DEFAULT_GOAL Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines. 2012-03-04 00:24:20 +00:00
define [SV 59870] define/undefine prerequisites are not target-specific vars 2021-03-14 16:35:38 -04:00
EXTRA_PREREQS Support the .EXTRA_PREREQS special variable 2020-01-03 02:08:59 -05:00
flavors * doc/make.texi: [SV 54116] Document whitespace removal trick. 2019-05-19 19:25:50 -04:00
GNUMAKEFLAGS [SV 59169] Add --debug=why and --debug=print options 2020-12-05 16:25:12 -05:00
INCLUDE_DIRS [SV 45211] Parse MAKEFLAGS immediately when it's reset 2021-09-05 21:08:59 -04:00
LIBPATTERNS Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines. 2012-03-04 00:24:20 +00:00
MAKE Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines. 2012-03-04 00:24:20 +00:00
MAKE_RESTARTS [SV 102] Don't show unnecessary include file errors. 2016-04-09 20:06:46 -04:00
MAKECMDGOALS * A few script fixes and updates for 3.78. 1999-09-17 03:15:37 +00:00
MAKEFILES Add test suite support to Windows 2017-06-04 18:37:20 -04:00
MAKEFLAGS [SV 45211] Parse MAKEFLAGS immediately when it's reset 2021-09-05 21:08:59 -04:00
MAKELEVEL Fix for bug #1276: Handle SHELL according to POSIX requirements. 2004-11-28 23:11:23 +00:00
MFILE_LIST [SV 50823] Support filenames containing '$' in MAKEFILE_LIST 2017-06-04 18:37:21 -04:00
negative Add test suite support to Windows 2017-06-04 18:37:20 -04:00
private cosmetics: fix few innocuous typos 2013-05-05 20:50:37 -04:00
SHELL Support "unexport" in target-specific variables. 2020-11-29 17:57:33 -05:00
special * job.c (child_error): Combine file info with error message. 2016-03-20 14:23:22 -04:00
undefine [SV 59870] define/undefine prerequisites are not target-specific vars 2021-03-14 16:35:38 -04:00