view Makefile @ 5385:5be8fb87ef28

makefile: remove different version tests, currently it's done via CI These targets were useful at some point. But currently we have too many tests that would fail on older hg versions when not using the appropriate compatibility branch, so the targets have limited usefulness. Right now the task of testing evolve and topic on every supported hg version is offloaded to the CI, where every compatibility branch gets its own separate pipeline, and that works and looks well. It would be nice to have a script (not necessary a make target) to automate the juggling of various compatibility branches and corresponding hg versions locally, but right now it's too much work for not much profit and so is not a priority. For now it makes more sense to remove these make targets than to fix and maintain them.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 07 Jul 2020 20:10:00 +0800
parents 18a6f5ffab1b
children 77729ad7cb0c
line wrap: on
line source

PYTHON ?= python
VERSION = $(shell python setup.py --version)
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
HGTESTS = $(HGROOT)/tests

help:
	@echo 'Commonly used make targets:'
	@echo '  deb-prepare        - prepare the build of a debian package'
	@echo '  install-home       - install with setup.py install --home=$$HOME ($(HOME))'
	@echo '  tests              - run all tests in the automatic test suite'

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`

install-home:
	$(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force

doc:
	$(MAKE) -C docs

_check_hgroot:
ifeq ($(HGROOT),)
	$(error HGROOT is not set to the root of the hg source tree)
endif

tests: _check_hgroot
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)

test-%: _check_hgroot
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@

.PHONY: tests all-version-tests