changeset 22375:308ab71207ff

build: don't clean __version__.py on 'make clean' in release tarballs When running 'make clean' in an extracted release tarball, file mercurial/__version__.py is removed, causing a subsequent install to indicate 'version unknown'. This problem was reported in the past [1] and a patch proposed in that mail, but was never properly sent nor applied. [1] http://selenic.com/pipermail/mercurial/2010-December/036249.html
author J. Lewis Muir <jlmuir@anl.gov>
date Tue, 02 Sep 2014 11:28:44 +0200
parents 4509a16c76c2
children c828b61e0635
files Makefile
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Aug 30 01:51:02 2014 +0200
+++ b/Makefile	Tue Sep 02 11:28:44 2014 +0200
@@ -56,7 +56,8 @@
 	find contrib doc hgext i18n mercurial tests \
 		\( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
 	rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py)))
-	rm -f MANIFEST MANIFEST.in mercurial/__version__.py hgext/__index__.py tests/*.err
+	rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
+	if test -d .hg; then rm -f mercurial/__version__.py; fi
 	rm -rf build mercurial/locale
 	$(MAKE) -C doc clean