diff options
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1182,10 +1182,15 @@ record_files (filenames, pattern, pattern_percent, deps, commands_started, moredeps = this; } - d = firstdeps; - while (d->next != 0) - d = d->next; - d->next = moredeps; + if (firstdeps == 0) + firstdeps = moredeps; + else + { + d = firstdeps; + while (d->next != 0) + d = d->next; + d->next = moredeps; + } f->deps = firstdeps; } |