summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-03-24 05:33:31 +0000
committerRoland McGrath <roland@redhat.com>1995-03-24 05:33:31 +0000
commitcc35ff7381795cc4c1415f62fa0a840a91c94c89 (patch)
treef4b3c5c26dd713a7196d039e7648e56bf01fe21f /remake.c
parenta14608538216aafa5933a7bbd6ab327b051d8958 (diff)
downloadmake-cc35ff7381795cc4c1415f62fa0a840a91c94c89.tar.gz
(remake_file): Set update_status to 2 instead of 1 for no rule to make.
Mention parent (dependent) in error message.
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/remake.c b/remake.c
index 2b9484b..2a882b3 100644
--- a/remake.c
+++ b/remake.c
@@ -833,15 +833,29 @@ remake_file (file)
else
{
/* This is a dependency file we cannot remake. Fail. */
- static char noway[] = "No rule to make target";
+ static const char msg_noparent[]
+ = "%sNo rule to make target `%s'%s";
+ static const char msg_parent[]
+ = "%sNo rule to make target `%s', needed by `%s'%s";
if (keep_going_flag || file->dontcare)
{
if (!file->dontcare)
- error ("*** %s `%s'.", noway, file->name);
- file->update_status = 1;
+ {
+ if (file->parent == 0)
+ error (msg_noparent, "*** ", file->name, ".");
+ else
+ error (msg_parent, "*** ",
+ file->name, file->parent->name, ".");
+ }
+ file->update_status = 2;
}
else
- fatal ("%s `%s'", noway, file->name);
+ {
+ if (file->parent == 0)
+ fatal (msg_noparent, "", file->name, "");
+ else
+ fatal (msg_parent, "", file->name, file->parent->name, "");
+ }
}
}
else