Skip to content

Commit 19bf4e8

Browse files
committed
log: create nodes if they don't exist so dyndeps can use logmtime
1 parent 8315591 commit 19bf4e8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

log.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ loginit(const char *builddir)
3838
size_t sz = 0, nline, nentry, i;
3939
struct edge *e;
4040
struct node *n;
41+
struct string *path;
4142
int64_t mtime;
4243

4344
nline = 0;
@@ -80,8 +81,12 @@ loginit(const char *builddir)
8081
if (!s)
8182
continue;
8283
n = nodeget(s, 0);
83-
if (!n || !n->gen)
84-
continue;
84+
if (!n) {
85+
path = mkstr(strlen(s));
86+
memcpy(path->s, s, path->n);
87+
path->s[path->n] = '\0';
88+
n = mknode(path);
89+
}
8590
if (n->logmtime == MTIME_MISSING)
8691
++nentry;
8792
n->logmtime = mtime;

0 commit comments

Comments
 (0)