diff options
author | Roland McGrath <roland@redhat.com> | 1995-01-27 09:42:00 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1995-01-27 09:42:00 +0000 |
commit | 75ea6c3ce2407596e23aa6da237649869da12090 (patch) | |
tree | 934f959b45f11bfaf48e8510e8cc4e564fdd93fa /remake.c | |
parent | 3fb9ebf83fab981420d24865a4076496c2e20d7d (diff) | |
download | gunmake-75ea6c3ce2407596e23aa6da237649869da12090.tar.gz |
(update_file_1): When !MUST_MAKE, don't set FILE->update_status to zero
before calling notice_finished_file.
(notice_finished_file): Touch only when FILE->update_status is zero.
(remake_file): Set FILE->update_status to zero after not calling
execute_file_command and deciding to touch instead.
Diffstat (limited to 'remake.c')
-rw-r--r-- | remake.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,5 +1,5 @@ /* Basic dependency engine for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -556,7 +556,6 @@ update_file_1 (file, depth) if (!must_make) { DEBUGPR ("No need to remake target `%s'.\n"); - file->update_status = 0; notice_finished_file (file); return 0; } @@ -605,12 +604,12 @@ notice_finished_file (file) if (touch_flag /* The update status will be: - -1 if no commands were run; - 0 if some commands (+ or ${MAKE}) were run and won; + -1 if this target was not remade; + 0 if 0 or more commands (+ or ${MAKE}) were run and won; 1 if some commands were run and lost. - The only time we don't want to touch the target is if - it had some recursive commands, and they lost. */ - && file->update_status != 1) + We touch the target if it has commands which either were not run + or won when they ran (i.e. status is 0). */ + && file->update_status == 0) { if (file->cmds != 0 && file->cmds->any_recurse) { @@ -854,6 +853,9 @@ remake_file (file) execute_file_commands (file); return; } + else + /* This tells notice_finished_file it is ok to touch the file. */ + file->update_status = 0; } /* This does the touching under -t. */ |