summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-06-14 06:08:11 +0000
committerPaul Smith <psmith@gnu.org>2009-06-14 06:08:11 +0000
commitbe6b22a2837a7a5b12e4d3c0b845266247cfd3ad (patch)
tree84b80ce3e626d1b42bba8ec493653ca18f7d10c3 /remake.c
parentdceb954f9c0a948b8d53796fd78b7cfae9148b1b (diff)
downloadgunmake-be6b22a2837a7a5b12e4d3c0b845266247cfd3ad.tar.gz
- Fix Savannah bug #13529
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/remake.c b/remake.c
index 513cb56..4a4fb73 100644
--- a/remake.c
+++ b/remake.c
@@ -373,6 +373,7 @@ update_file_1 (struct file *file, unsigned int depth)
FILE_TIMESTAMP this_mtime;
int noexist, must_make, deps_changed;
int dep_status = 0;
+ struct file *ofile;
struct dep *d, *ad;
struct dep amake;
int running = 0;
@@ -423,6 +424,10 @@ update_file_1 (struct file *file, unsigned int depth)
/* Notice recursive update of the same file. */
start_updating (file);
+ /* We might change file if we find a different one via vpath;
+ remember this one to turn off updating. */
+ ofile = file;
+
/* Looking at the file's modtime beforehand allows the possibility
that its name may be changed by a VPATH search, and thus it may
not need an implicit rule. If this were not done, the file
@@ -608,6 +613,7 @@ update_file_1 (struct file *file, unsigned int depth)
}
finish_updating (file);
+ finish_updating (ofile);
DBF (DB_VERBOSE, _("Finished prerequisites of target file `%s'.\n"));
@@ -943,12 +949,17 @@ static int
check_dep (struct file *file, unsigned int depth,
FILE_TIMESTAMP this_mtime, int *must_make_ptr)
{
+ struct file *ofile;
struct dep *d;
int dep_status = 0;
++depth;
start_updating (file);
+ /* We might change file if we find a different one via vpath;
+ remember this one to turn off updating. */
+ ofile = file;
+
if (file->phony || !file->intermediate)
{
/* If this is a non-intermediate file, update it and record whether it
@@ -1054,6 +1065,8 @@ check_dep (struct file *file, unsigned int depth,
}
finish_updating (file);
+ finish_updating (ofile);
+
return dep_status;
}