pkg: abstract version in makefile stable 1.0.1
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 31 Aug 2012 11:30:30 +0200
branchstable
changeset 542 ca5bb72d14ae
parent 541 3859f8e7d0d1
child 543 108f4ed36215
pkg: abstract version in makefile
Makefile
--- a/Makefile	Fri Aug 31 11:18:39 2012 +0200
+++ b/Makefile	Fri Aug 31 11:30:30 2012 +0200
@@ -1,5 +1,7 @@
 PYTHON=python
 HG=`which hg`
+VERSION=$(shell python setup.py --version)
+
 
 help:
 	@echo 'Commonly used make targets:'
@@ -26,11 +28,11 @@
 
 deb-prepare:
 	python setup.py sdist --dist-dir ..
-	mv -f ../hg-evolve-1.0.0.tar.gz ../mercurial-evolve_1.0.0.orig.tar.gz
-	tar xf ../mercurial-evolve_1.0.0.orig.tar.gz
-	rm -rf ../mercurial-evolve_1.0.0.orig
-	mv hg-evolve-1.0.0 ../mercurial-evolve_1.0.0.orig
-	cp -r debian/ ../mercurial-evolve_1.0.0.orig/
-	@cd ../mercurial-evolve_1.0.0.orig && echo 'debian build directory ready at' `pwd`
+	mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz
+	tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz
+	rm -rf ../mercurial-evolve_$(VERSION).orig
+	mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig
+	cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
+	@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`
 
 .PHONY: tests all-version-tests