# HG changeset patch # User Pierre-Yves David # Date 1488535110 -3600 # Node ID 103da16f3be22b16c2ef0074f8d9adeea439cb77 # Parent a4b09789117a64e4672ba6a2626bbaf965476e91 makefile: only check for HGROOT when running tests Otherwise we breaks other target that do not needs HGROOT. diff -r a4b09789117a -r 103da16f3be2 Makefile --- a/Makefile Thu Mar 02 20:13:47 2017 +0100 +++ b/Makefile Fri Mar 03 10:58:30 2017 +0100 @@ -1,5 +1,6 @@ VERSION=$(shell python setup.py --version) +PYTHON=python help: @echo 'Commonly used make targets:' @@ -18,10 +19,6 @@ # test targets -PYTHON=python -ifeq ($(HGROOT),) - $(error HGROOT is not set to the root of the hg source tree) -endif TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) HGTESTS=$(HGROOT)/tests @@ -34,15 +31,20 @@ all: help -tests: +_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) # /!\ run outside of the compatibility branch output test will likely fails -test-%: +test-%: _check_hgroot cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ -tests-%: +tests-%: _check_hgroot hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \ (cd $(HGROOT) ; $(MAKE) clean ) && \ cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)