Closed KAction closed 3 years ago
I somewhat bothered that virtual rules create empty files that are used for nothing.
I came up with this patch which seems to implement that, at least in simple cases. What do you think? Is it going to break anything?
diff --git a/redo.c b/redo.c index 9b893ae..5a18da7 100644 --- a/redo.c +++ b/redo.c @@ -707,8 +707,10 @@ djb-style default.o.do: setenvfd("REDO_LEVEL", level + 1); if (sflag > 0) dup2(target_fd, 1); - else + else { + remove(temp_target); close(target_fd); + } if (access(dofile, X_OK) != 0) // run -x files with /bin/sh execl("/bin/sh", "/bin/sh", xflag > 0 ? "-ex" : "-e",
We had this, it was reverted in https://github.com/leahneukirchen/redo-c/pull/2
Ah, okay.
I somewhat bothered that virtual rules create empty files that are used for nothing.
I came up with this patch which seems to implement that, at least in simple cases. What do you think? Is it going to break anything?