about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-09-04 21:29:02 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-09-04 21:29:02 +0200
commit398f950ab21f1d34a674dba4f2bf80a003bc4237 (patch)
treef29b6a739b127b54f8496dc664dd1dba9735c340
parent3697457c77dbe602050a642602b8dde4416f5e3d (diff)
downloadredo-c-398f950ab21f1d34a674dba4f2bf80a003bc4237.tar.gz
redo-c-398f950ab21f1d34a674dba4f2bf80a003bc4237.tar.xz
redo-c-398f950ab21f1d34a674dba4f2bf80a003bc4237.zip
redo-hash, just for debugging
-rw-r--r--links.do1
-rw-r--r--redo.c6
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);