summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1992-09-09 20:46:57 +0000
committerRoland McGrath <roland@redhat.com>1992-09-09 20:46:57 +0000
commit44251cbc0c4c9899b8eb7eaec5c179c547f4d6b9 (patch)
treef693a338ad17a6c5d7f82acbe2e200450d556321 /remake.c
parenta1849dfc5fac2a0c2106ee084ecc6a303a997416 (diff)
downloadgunmake-44251cbc0c4c9899b8eb7eaec5c179c547f4d6b9.tar.gz
Formerly remake.c.~35~
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/remake.c b/remake.c
index 355901b..7c08026 100644
--- a/remake.c
+++ b/remake.c
@@ -569,11 +569,24 @@ notice_finished_file (file)
it had some recursive commands, and they lost. */
&& file->update_status != 1)
{
- if (file->phony)
- file->update_status = 0;
+ if (file->cmds != 0 && file->cmds->any_recurse)
+ {
+ /* If all the command lines were recursive,
+ we don't want to do the touching. */
+ unsigned int i;
+ for (i = 0; i < file->cmds->ncommand_lines; ++i)
+ if (!file->cmds->lines_recurse[i])
+ goto have_nonrecursing;
+ }
else
- /* Should set file's modification date and do nothing else. */
- file->update_status = touch_file (file);
+ {
+ have_nonrecursing:
+ if (file->phony)
+ file->update_status = 0;
+ else
+ /* Should set file's modification date and do nothing else. */
+ file->update_status = touch_file (file);
+ }
}
if (!file->phony)