make: introduce a target to clean everything but packages stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 29 Jul 2016 00:39:59 +0200
branchstable
changeset 29640 17b3309bfdff
parent 29639 6fd751fa58d3
child 29641 13f90dde8f8c
make: introduce a target to clean everything but packages Removing the 'packages' directory makes nightly builder life much harder.
Makefile
--- a/Makefile	Fri Jul 29 12:46:07 2016 +0100
+++ b/Makefile	Fri Jul 29 00:39:59 2016 +0200
@@ -60,7 +60,7 @@
 doc:
 	$(MAKE) -C doc
 
-clean:
+cleanbutpackages:
 	-$(PYTHON) setup.py clean --all # ignore errors from this command
 	find contrib doc hgext hgext3rd i18n mercurial tests \
 		\( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
@@ -68,10 +68,13 @@
 	rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
 	rm -f mercurial/__modulepolicy__.py
 	if test -d .hg; then rm -f mercurial/__version__.py; fi
-	rm -rf build packages mercurial/locale
+	rm -rf build mercurial/locale
 	$(MAKE) -C doc clean
 	$(MAKE) -C contrib/chg distclean
 
+clean: cleanbutpackages
+	rm -rf packages
+
 install: install-bin install-doc
 
 install-bin: build
@@ -254,8 +257,8 @@
 	mkdir -p packages/centos7
 	contrib/dockerrpm centos7
 
-.PHONY: help all local build doc clean install install-bin install-doc \
-	install-home install-home-bin install-home-doc \
+.PHONY: help all local build doc cleanbutpackages clean install install-bin \
+	install-doc install-home install-home-bin install-home-doc \
 	dist dist-notests check tests check-code update-pot \
 	osx fedora20 docker-fedora20 fedora21 docker-fedora21 \
 	centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7