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:
parent
56d4dec19f
commit
bfd2862bc4
1
Makefile
1
Makefile
|
@ -62,6 +62,7 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
|
||||||
|
|
||||||
%: %.in Makefile lib/common.sh
|
%: %.in Makefile lib/common.sh
|
||||||
@echo "GEN $@"
|
@echo "GEN $@"
|
||||||
|
@$(RM) "$@"
|
||||||
@m4 -P $@.in | $(edit) >$@
|
@m4 -P $@.in | $(edit) >$@
|
||||||
@chmod a-w "$@"
|
@chmod a-w "$@"
|
||||||
@chmod +x "$@"
|
@chmod +x "$@"
|
||||||
|
|
Loading…
Reference in New Issue