summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-04-05 10:14:49 +0000
committerRoland McGrath <roland@redhat.com>1994-04-05 10:14:49 +0000
commit108cca9aa553c5d5a4d49f69f0f8970a911c81eb (patch)
tree40cdb23f951d999c08d5c7fcaa435f19479f0178
parent98104e4d2e58a4edd3544e15773fe13e42b81801 (diff)
downloadgunmake-108cca9aa553c5d5a4d49f69f0f8970a911c81eb.tar.gz
(record_files): Set double_colon pointer instead of flag.
-rw-r--r--read.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/read.c b/read.c
index 99bcbfc..b101d38 100644
--- a/read.c
+++ b/read.c
@@ -1343,11 +1343,15 @@ record_files (filenames, pattern, pattern_percent, deps, commands_started,
"target file `%s' has both : and :: entries",
f->name);
f = enter_file (name);
- /* If there was an existing entry and it was a
- double-colon entry, enter_file will have returned a
- new one, making it the prev pointer of the old one. */
+ /* If there was an existing entry and it was a double-colon
+ entry, enter_file will have returned a new one, making it the
+ prev pointer of the old one, and setting its double_colon
+ pointer to the first one. */
+ if (f->double_colon == 0)
+ /* This is the first entry for this name, so we must
+ set its double_colon pointer to itself. */
+ f->double_colon = f;
f->is_target = 1;
- f->double_colon = 1;
f->deps = this;
f->cmds = cmds;
}