diff Makefile @ 2020:143c8e4dc22d

topic: merge the topic extension in the evolve repository There is a lot of synergy between the two concepts. Topic is expected to be able to smooth multiple of evolution sharp edge. Having them both in the same repository will make this collaboration easier.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 02 Mar 2017 18:07:46 +0100
parents 38d1463f3e0f 9d1157fcdc6c
children 103da16f3be2
line wrap: on
line diff
--- a/Makefile	Thu Feb 23 15:19:31 2017 +0100
+++ b/Makefile	Thu Mar 02 18:07:46 2017 +0100
@@ -1,3 +1,23 @@
+VERSION=$(shell python setup.py --version)
+
+
+help:
+	@echo 'Commonly used make targets:'
+	@echo '  deb-prepare - prepare the build of a debian package'
+
+all: help
+
+deb-prepare:
+	python setup.py sdist --dist-dir ..
+	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`
+
+# test targets
+
 PYTHON=python
 ifeq ($(HGROOT),)
   $(error HGROOT is not set to the root of the hg source tree)
@@ -17,6 +37,8 @@
 tests:
 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
 
+# /!\ run outside of the compatibility branch output test will likely fails
+
 test-%:
 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@
 
@@ -25,6 +47,7 @@
 	(cd $(HGROOT) ; $(MAKE) clean ) && \
 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
 
-all-version-tests: tests-3.7 tests-@
+# build a script to extract declared version
+all-version-tests: tests-@
 
 .PHONY: tests all-version-tests