summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-07-15 07:36:44 +0000
committerPaul Smith <psmith@gnu.org>1999-07-15 07:36:44 +0000
commit9d89ad56bf74b22471617ed99f9e6e6272efba22 (patch)
treeaf9d3782c9aaeb9b7f806157a48f987f2590c637 /remake.c
parentadb1632033d58f3570bacaf6d717e8b04199c979 (diff)
downloadgunmake-9d89ad56bf74b22471617ed99f9e6e6272efba22.tar.gz
* Fix up and document $(apply ...) function.
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/remake.c b/remake.c
index 94b70e1..75af658 100644
--- a/remake.c
+++ b/remake.c
@@ -94,7 +94,7 @@ update_goal_chain (goals, makefiles)
struct dep *g;
for (g = goals; g != 0; g = g->next)
- g->changed = g->deferred = 0;
+ g->changed = 0;
}
#if 0
@@ -134,7 +134,6 @@ update_goal_chain (goals, makefiles)
{
unsigned int ocommands_started;
int x;
- FILE_TIMESTAMP mtime = MTIME (file);
check_renamed (file);
if (makefiles)
{
@@ -161,16 +160,6 @@ update_goal_chain (goals, makefiles)
decide when to give an "up to date" diagnostic. */
g->changed += commands_started - ocommands_started;
- /* Set the goal's `deferred' flag if we started a command but
- it didn't finish (parallel builds). We need to remember
- this, because the next time through the goal chain the call
- to reap_children() will set the mtime, not the call to
- update_file() above. So, the saved mtime from before
- update_file() will be the same as the mtime after it, and
- we'll think nothing changed when it did (see below). */
- if (file->command_state == cs_running)
- g->deferred = 1;
-
stop = 0;
if (x != 0 || file->updated)
{
@@ -191,7 +180,8 @@ update_goal_chain (goals, makefiles)
stop = (!keep_going_flag && !question_flag
&& !makefiles);
}
- else if (MTIME (file) != mtime || g->deferred)
+ else if (file->updated && g->changed &&
+ file->last_mtime != file->mtime_before_update)
{
/* Updating was done. If this is a makefile and
just_print_flag or question_flag is set
@@ -199,7 +189,6 @@ update_goal_chain (goals, makefiles)
specified as a command-line target), don't
change STATUS. If STATUS is changed, we will
get re-exec'd, and fall into an infinite loop. */
- g->deferred = 0;
if (!makefiles
|| (!just_print_flag && !question_flag))
status = 0;
@@ -736,6 +725,9 @@ notice_finished_file (file)
{
struct file *f;
+ assert(file->mtime_before_update == 0);
+ file->mtime_before_update = file->last_mtime;
+
if (just_print_flag || question_flag
|| (file->is_target && file->cmds == 0))
file->last_mtime = NEW_MTIME;