From 398f950ab21f1d34a674dba4f2bf80a003bc4237 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 4 Sep 2015 21:29:02 +0200 Subject: redo-hash, just for debugging --- links.do | 1 - redo.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/links.do b/links.do index 0134431..3a5bebf 100644 --- a/links.do +++ b/links.do @@ -1,4 +1,3 @@ ln -sf redo redo-ifcreate ln -sf redo redo-ifchange ln -sf redo redo-always -ln -sf redo redo-hash diff --git a/redo.c b/redo.c index 4229091..34d939c 100644 --- a/redo.c +++ b/redo.c @@ -760,7 +760,7 @@ int main(int argc, char *argv[]) { char *program; - int opt; + int opt, i; dep_fd = envfd("REDO_DEP_FD"); @@ -833,13 +833,13 @@ main(int argc, char *argv[]) record_deps(argc, argv); procure(); } else if (strcmp(program, "redo-ifcreate") == 0) { - int i; for (i = 0; i < argc; i++) redo_ifcreate(argv[i]); } else if (strcmp(program, "redo-always") == 0) { dprintf(dep_fd, "!\n"); } else if (strcmp(program, "redo-hash") == 0) { - printf("%s\n", hashfile(0)); + for (i = 0; i < argc; i++) + write_dep(1, argv[i]); } else { fprintf(stderr, "not implemented %s\n", program); exit(-1); -- cgit 1.4.1