Makefile: Remove output files before replacing them

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@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
This commit is contained in:
Lukas Fleischer 2011-12-02 10:07:57 +01:00 committed by Pierre Schmitz
parent 56d4dec19f
commit bfd2862bc4
1 changed files with 1 additions and 0 deletions

View File

@ -62,6 +62,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 "$@"