summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/remake.c b/remake.c
index e6dac0f..a13a9a4 100644
--- a/remake.c
+++ b/remake.c
@@ -748,7 +748,8 @@ notice_finished_file (struct file *file)
have_nonrecursing:
if (file->phony)
file->update_status = 0;
- else
+ /* According to POSIX, -t doesn't affect targets with no cmds. */
+ else if (file->cmds != 0)
{
/* Should set file's modification date and do nothing else. */
file->update_status = touch_file (file);