]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 64185] Clarify handling of directive lines starting with TAB
authorPaul Smith <psmith@gnu.org>
Tue, 26 Aug 2025 03:20:16 +0000 (23:20 -0400)
committerPaul Smith <psmith@gnu.org>
Tue, 26 Aug 2025 12:13:55 +0000 (08:13 -0400)
commitc59cc4f932ede1c42923cfcb357d949e0941ebd8
tree37937d63fb02e1076b5642b2befc8338cf9bf454
parentfdcaaed8d7c1a2c749d3bdb96689e3d4c904049a
[SV 64185] Clarify handling of directive lines starting with TAB

It's clear that this change causes too many problems to be made
without warning.  Revert the change disallowing conditional lines to
start with TAB.

Instead, generate warnings whenever a directive line begins with a
TAB character.  Make this change for all directives, not just
conditional directives: define, undefine, export, unexport, vpath,
load, include, etc.

* NEWS: Update the backward-compatibility warning.
* src/read.c (eval): Track whether the line starts with a TAB.
If so then whenever we recognize a directive, emit a warning.
Revert the previous change for this bug.
(parse_var_assignment): Accept a file location if the line begins
with TAB; show a warning if we discover a directive.
(conditional_line): Warn about lines starting with TAB.
* tests/scripts/...: Add tests to verify warnings for initial TAB.
NEWS
doc/make.texi
src/read.c
tests/scripts/features/conditionals
tests/scripts/features/include
tests/scripts/features/load
tests/scripts/features/override
tests/scripts/features/vpath
tests/scripts/variables/define
tests/scripts/variables/private
tests/scripts/variables/undefine