diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-09-01 16:21:42 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-09-01 16:21:42 +0200 |
commit | 821e67289342f295d4dcc6dbb52b895dfc282a88 (patch) | |
tree | 4a373ab81cba7e467c51db9584d95299d60d8ce2 | |
parent | 0c203b8300880d398e5df79d86b38bfba1b99329 (diff) | |
download | redo-c-821e67289342f295d4dcc6dbb52b895dfc282a88.tar.gz redo-c-821e67289342f295d4dcc6dbb52b895dfc282a88.tar.xz redo-c-821e67289342f295d4dcc6dbb52b895dfc282a88.zip |
Skip source files, duh
-rw-r--r-- | redo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/redo.c b/redo.c index 18c89dd..2b6a406 100644 --- a/redo.c +++ b/redo.c @@ -604,6 +604,13 @@ create_pool() } } +static int +sourcefile(char *target) +{ + char *depfile = targetdep(target); + return access(target, F_OK) == 0 && access(depfile, F_OK) != 0; +} + static void redo_ifchange(int targetc, char *targetv[]) { @@ -628,7 +635,7 @@ redo_ifchange(int targetc, char *targetv[]) if (targeti < targetc) { char *target = targetv[targeti]; - if (skip[targeti]) { + if (skip[targeti] || sourcefile(target)) { targeti++; continue; } |