]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 28456] Don't override $< when no default rule has been defined
authorMike Haboustak <haboustak@gmail.com>
Fri, 12 Jul 2019 01:08:38 +0000 (21:08 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 13 Jul 2019 15:47:26 +0000 (11:47 -0400)
commitee167c650e53bde545f67152092b4669c76186ef
treee8d79c9f638edff411580dcc89cebcfcc170f4e6
parent4d00ceba264a9fd04241dcd2685526ce64c1346b
[SV 28456] Don't override $< when no default rule has been defined

The check for matching a file's command to the default rule's command
does not account for null. If no .DEFAULT is defined a rule with no
recipe has it's $< variable set to the value of $@. This breaks second
expansion, particularly when used with pattern rules.

* src/commands.c [set_file_variables]: Check that cmds is set
* tests/scripts/features/se_explicit: Test case
* tests/scripts/features/se_implicit: Test case

Copyright-paperwork-exempt: yes
src/commands.c
tests/scripts/features/se_explicit
tests/scripts/features/se_implicit