summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-07-22 04:20:14 +0000
committerPaul Smith <psmith@gnu.org>1999-07-22 04:20:14 +0000
commitec50fe2a2baf518181896a0cc5f376eb4d47ff0a (patch)
tree24a371fa169122d485250f3ed33f79b733de6f95 /remake.c
parentc69d4c95bf2027252e13e4dec3fb2dcfd10fc4e7 (diff)
downloadgunmake-ec50fe2a2baf518181896a0cc5f376eb4d47ff0a.tar.gz
* Installed new versions of GLIBC glob library.
* Installed Tim Magill's "graph pruning" performance enhancement. * Update version to 3.77.90 for the release. * Require automake 1.4.
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/remake.c b/remake.c
index 75af658..90de313 100644
--- a/remake.c
+++ b/remake.c
@@ -106,6 +106,9 @@ update_goal_chain (goals, makefiles)
job_slots = 1;
#endif
+ /* All files start with the considered bit 0, so the global value is 1. */
+ considered = 1;
+
/* Update all the goals until they are all finished. */
while (goals != 0)
@@ -247,6 +250,11 @@ update_goal_chain (goals, makefiles)
g = g->next;
}
}
+
+ /* If we reached the end of the dependency graph toggle the considered
+ flag for the next pass. */
+ if (g == 0)
+ considered = !considered;
}
if (makefiles)
@@ -312,6 +320,17 @@ update_file (file, depth)
register int status = 0;
register struct file *f;
+ /* Prune the dependency graph: if we've already been here on _this_ pass
+ through the dependency graph, we don't have to go any further. We won't
+ reap_children until we start the next pass, so no state change is
+ possible below here until then. */
+ if (file->considered == considered)
+ {
+ DEBUGPR ("Pruning file `%s'.\n");
+ return 0;
+ }
+ file->considered = considered;
+
for (f = file->double_colon ? file->double_colon : file; f != 0; f = f->prev)
{
status |= update_file_1 (f, depth);