[Python-apps-commits] r974 - in packages/mercurial/trunk/debian (rules)

vdanjean at users.alioth.debian.org vdanjean at users.alioth.debian.org
Wed Apr 16 08:02:57 UTC 2008


    Date: Wednesday, April 16, 2008 @ 08:02:55
  Author: vdanjean
Revision: 974

Fix build system so that "hg version" works

Modified:
  packages/mercurial/trunk/debian/rules

Modified: packages/mercurial/trunk/debian/rules
===================================================================
--- packages/mercurial/trunk/debian/rules	2008-04-16 07:55:12 UTC (rev 973)
+++ packages/mercurial/trunk/debian/rules	2008-04-16 08:02:55 UTC (rev 974)
@@ -33,6 +33,8 @@
 	echo "# See hgrc(5) for more information" \
 		>>  $(CURDIR)/debian/mercurial/etc/mercurial/hgrc
 
+build/mercurial:: mercurial/__version__.py
+
 build/mercurial-common::
 	$(MAKE) -C doc man
 	# workaround a bug in asciidoc that generates incorrect manpages
@@ -54,6 +56,15 @@
 		$(CURDIR)/debian/mercurial-common/usr/share/lintian/overrides/mercurial-common
 
 clean::
+	# Keep current mercurial version
+	cp -a mercurial/__version__.py mercurial/__version__.py.save
 	$(MAKE) clean
+	# And retore it
+	mv mercurial/__version__.py.save mercurial/__version__.py
 	$(RM) -rv tmp/
 
+mercurial/__version__.py:
+	@echo "$@ is missing (you probably call 'make clean' directly)."
+	@echo "Restore it from sources before building the package"
+	@echo "Aborting."
+	exit 1




More information about the Python-apps-commits mailing list