From d94baaaa6b6887ea204ff394da5c68f27f5d37ef Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 12 Oct 2021 12:08:53 +0200 Subject: [PATCH] Emit a warning when chicken-do encounters a non-existent dependency Specifically: do not abort with error to make the build work in the presence of bogus source-dependencies in .egg files. --- chicken-do.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/chicken-do.c b/chicken-do.c index 9ee9a7a0..89e3365a 100644 --- a/chicken-do.c +++ b/chicken-do.c @@ -212,14 +212,14 @@ int main(int argc, char *argv[]) for(d = depends; *d != NULL; ++d) { if(stat(*d, &sd) == -1) { - fprintf(stderr, "%s: %s\n", *d, strerror(errno)); - exit(1); - } - - st = tstats; - - for(t = targets; *t != NULL; ++t) { - if(sd.st_mtime > (st++)->st_mtime) goto build; + fprintf(stderr, "Warning: %s: %s\n", *d, strerror(errno)); + } + else { + st = tstats; + + for(t = targets; *t != NULL; ++t) { + if(sd.st_mtime > (st++)->st_mtime) goto build; + } } } -- 2.28.0