Makefile
branchstable
changeset 29640 17b3309bfdff
parent 29535 da1848f07c6a
child 29777 afa74947a414
--- 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