diff options
author | Dmitry Goncharov <dgoncharov@users.sf.net> | 2021-05-29 19:03:07 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2021-05-30 15:53:41 -0400 |
commit | b580949ae0981cc2ecd466ad1dacb42f2f4a9f7d (patch) | |
tree | 3c6f8ec61b56a12d9a45fb12c4c1df4b0e4e559b /src/commands.c | |
parent | f2771aa614d3a826b70973217c33f605fb4cd0c2 (diff) | |
download | make-git-b580949ae0981cc2ecd466ad1dacb42f2f4a9f7d.tar.gz |
[SV 60659] Set $$< properly in second expansion
Set the $$< automatic variable as best we can during secondary
expansion of prerequisites.
* src/commands.c (set_file_variables): Don't break without setting
'less' if secondary expansion is enabled.
* tests/scripts/features/se_explicit: Test secondary expansion results.
* tests/scripts/features/se_implicit: Test secondary expansion results.
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commands.c b/src/commands.c index dd179998..8a483bdd 100644 --- a/src/commands.c +++ b/src/commands.c @@ -133,10 +133,9 @@ set_file_variables (struct file *file) /* $< is the first not order-only dependency. */ less = ""; for (d = file->deps; d != 0; d = d->next) - if (!d->ignore_mtime && !d->ignore_automatic_vars) + if (!d->ignore_mtime && !d->ignore_automatic_vars && !d->need_2nd_expansion) { - if (!d->need_2nd_expansion) - less = dep_name (d); + less = dep_name (d); break; } |