From 58c2bd8df65d3704b2a6cdde0bf347d58036685f Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 1 Sep 2015 16:39:06 +0200 Subject: Revert "Check for dofile earlier" Then the ifcreate end up in the wrong dep file. This reverts commit 0c203b8300880d398e5df79d86b38bfba1b99329. --- redo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/redo.c b/redo.c index 781c828..08dbbb4 100644 --- a/redo.c +++ b/redo.c @@ -468,12 +468,6 @@ run_script(char *target, int implicit) target = targetchdir(target); - dofile = find_dofile(target); - if (!dofile) { - fprintf(stderr, "no dofile for %s.\n", target); - exit(1); - } - dep_fd = mkstemp(temp_depfile); fd = mkstemp(temp_target); @@ -481,6 +475,12 @@ run_script(char *target, int implicit) // TODO locking to detect parallel jobs building same target? + dofile = find_dofile(target); + if (!dofile) { + fprintf(stderr, "no dofile for %s.\n", target); + exit(1); + } + fd = open(dofile, O_RDONLY); dprintf(dep_fd, "=%s %s\n", hashfile(fd), dofile); close(fd); -- cgit 1.4.1