diff options
author | Tharre <tharre3@gmail.com> | 2014-08-13 17:30:02 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2014-08-13 17:34:08 +0200 |
commit | d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7 (patch) | |
tree | 4574d2a1fbc04671c889caf49da64a73d4d74904 /src/redo-ifchange.c | |
parent | 325c8e3992bf7b73714d10a5d2202c89ddbac189 (diff) | |
download | redo-d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7.tar.gz redo-d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7.tar.xz redo-d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7.zip |
Implement (incomplete) dependency checking.
Targets still do not depend on .do-files, and a lot of the edge cases
are still not handled correctly. Furthermore some error-checking code is
still missing, which could possibly crash the program (partially marked
with comments), as well as some free() calls.
An utitlity python script (print_dep.py) was also added to aid in
debugging matters.
Diffstat (limited to 'src/redo-ifchange.c')
-rw-r--r-- | src/redo-ifchange.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/redo-ifchange.c b/src/redo-ifchange.c index 219a0a1..1efe0a5 100644 --- a/src/redo-ifchange.c +++ b/src/redo-ifchange.c @@ -1,11 +1,19 @@ #include <stdio.h> +#include <stdbool.h> #include "build.h" +#include "dbg.h" int main(int argc, char *argv[]) { int i; for (i = 1; i < argc; ++i) { - build_target(argv[i]); + /*debug("Testing if %s is up-to-date ...\n", argv[i]);*/ + if (has_changed(argv[i], 'c', false)) { + /*printf("=> no\n");*/ + build_target(argv[i]); + } else { + /*printf("=> yes\n");*/ + } add_dep(argv[i], 'c'); } } |