From 1e04f898e5576d2459a269ffd78ecbb4830a5d55 Mon Sep 17 00:00:00 2001 From: Philipp Matthias Hahn Date: Wed, 11 Jan 2012 23:14:22 +0100 Subject: [PATCH] Make several targets .PHONY If a file with the name of the target would exist, re-building would fail. Signed-off-by: Andrew McMillan --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ba4292a6..ad4259bb 100755 --- a/Makefile +++ b/Makefile @@ -10,8 +10,10 @@ snapshot : gitrev = $(shell git rev-parse --short HEAD) snapshot : version = $(majorversion)-git$(gitrev) snapshot : issnapshot = 1 +.PHONY: nodocs nodocs: htdocs/always.php built-po +.PHONY: all all: htdocs/always.php built-docs built-po built-docs: docs/api/phpdoc.ini htdocs/*.php inc/*.php docs/translation.rst @@ -32,6 +34,7 @@ htdocs/always.php: scripts/build-always.sh VERSION dba/davical.sql inc/always.ph # # Build a release .tar.gz file in the directory above us # +.PHONY: release release: built-docs VERSION -ln -s . $(package)-$(version) sed 's:@@VERSION@@:$(majorversion):' davical.spec.in | \ @@ -45,15 +48,16 @@ release: built-docs VERSION davical.spec rm $(package)-$(version) +.PHONY: snapshot snapshot: release +.PHONY: clean clean: rm -f built-docs built-po -find . -name "*~" -delete -rm docs/translation.pdf -rm davical.spec +.PHONY: clean-all clean-all: clean -find docs/api/* ! -name "phpdoc.ini" ! -name ".gitignore" -delete - -.PHONY: all clean release