summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2004-05-16 19:16:52 +0000
committerPaul Smith <psmith@gnu.org>2004-05-16 19:16:52 +0000
commit0d72d89646eda38293759b957eecf18fde8676c6 (patch)
tree51954f0469a6d70c1b58fd30a5955aa5e4b65c86 /commands.c
parentcdfbd2f371f2d9bfb17164d5d3ecaee4651f33a8 (diff)
downloadmake-0d72d89646eda38293759b957eecf18fde8676c6.tar.gz
Various enhancements
- OS/2 Patches - OpenVMS updates - Sanitize the handling of -include/sinclude with and without -k - Fix the setting of $< for order-only rules.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/commands.c b/commands.c
index a1766b46..b202f6cd 100644
--- a/commands.c
+++ b/commands.c
@@ -41,6 +41,7 @@ extern int getpid ();
static void
set_file_variables (struct file *file)
{
+ struct dep *d;
char *at, *percent, *star, *less;
#ifndef NO_ARCHIVES
@@ -105,8 +106,14 @@ set_file_variables (struct file *file)
}
star = file->stem;
- /* $< is the first dependency. */
- less = file->deps != 0 ? dep_name (file->deps) : "";
+ /* $< is the first not order-only dependency. */
+ less = "";
+ for (d = file->deps; d != 0; d = d->next)
+ if (!d->ignore_mtime)
+ {
+ less = dep_name (d);
+ break;
+ }
if (file->cmds == default_file->cmds)
/* This file got its commands from .DEFAULT.
@@ -134,7 +141,6 @@ set_file_variables (struct file *file)
char *caret_value;
char *qp;
char *bp;
- struct dep *d;
unsigned int len;
/* Compute first the value for $+, which is supposed to contain