summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-01-22 22:02:48 +0000
committerRoland McGrath <roland@redhat.com>1993-01-22 22:02:48 +0000
commitc50958dd46f4e7d1bd37628ce257bca2101d1b99 (patch)
tree68badc2f72f53c39a70b723185367a61dfc55834 /remake.c
parentd56535498b4b4b301e3ff2ed97bfe2b0f9967f91 (diff)
downloadgunmake-c50958dd46f4e7d1bd37628ce257bca2101d1b99.tar.gz
Formerly remake.c.~43~
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/remake.c b/remake.c
index 20d1eea..db81919 100644
--- a/remake.c
+++ b/remake.c
@@ -192,12 +192,9 @@ update_file (file, depth)
register int status = 0;
register struct file *f;
unsigned int ofiles_remade = files_remade;
- int commands_finished = 0;
for (f = file; f != 0; f = f->prev)
{
- int not_started = f->command_state == cs_not_started;
-
status |= update_file_1 (f, depth);
check_renamed (f);
@@ -207,7 +204,7 @@ update_file (file, depth)
switch (f->command_state)
{
case cs_finished:
- commands_finished |= not_started;
+ /* The file is done being remade. */
break;
case cs_running:
@@ -227,8 +224,15 @@ update_file (file, depth)
/* For a top level target, if we have found nothing whatever to do for it,
print a message saying nothing needs doing. */
- if (status == 0 && files_remade == ofiles_remade
- && commands_finished && depth == 0 && !silent_flag && !question_flag)
+ /* Give a message iff updated successfully, and never under -s or -q. */
+ if (status == 0 && !silent_flag && !question_flag
+ /* files_remade will have been incremented iff we actually
+ ran any commands (under -n, if we would have). */
+ && files_remade == ofiles_remade
+ /* Only give the diagnostic for top-level targets.
+ The makefile chain run is done with DEPTH==1 precisely
+ to avoid this message. */
+ && depth == 0)
{
if (file->phony || file->cmds == 0)
message ("Nothing to be done for `%s'.", file->name);