[arch-projects] [devtools] [PATCH] Makefile: Remove output files before replacing them

Lukas Fleischer archlinux at cryptocrack.de
Fri Dec 2 04:07:57 EST 2011


This one fixes all the "Permission denied" errors we got when invoking
make(1) after modifying a source file and removes the need to delete the
generated scripts manually.

Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index cbc7402..d9cc82a 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,7 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
 
 %: %.in Makefile lib/common.sh
 	@echo "GEN $@"
+	@$(RM) "$@"
 	@m4 -P $@.in | $(edit) >$@
 	@chmod a-w "$@"
 	@chmod +x "$@"
-- 
1.7.7.4



More information about the arch-projects mailing list