Makefile
branchstable
changeset 2259 94432e742a02
parent 2040 934d70e3be97
child 2269 b838c069bf4e
equal deleted inserted replaced
1814:efda653c96a7 2259:94432e742a02
     1 VERSION=$(shell python setup.py --version)
     1 VERSION=$(shell python setup.py --version)
     2 
     2 
       
     3 PYTHON=python
     3 
     4 
     4 help:
     5 help:
     5 	@echo 'Commonly used make targets:'
     6 	@echo 'Commonly used make targets:'
     6 	@echo '  deb-prepare - prepare the build of a debian package'
     7 	@echo '  deb-prepare - prepare the build of a debian package'
     7 
     8 
    13 	tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz
    14 	tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz
    14 	rm -rf ../mercurial-evolve_$(VERSION).orig
    15 	rm -rf ../mercurial-evolve_$(VERSION).orig
    15 	mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig
    16 	mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig
    16 	cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
    17 	cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
    17 	@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`
    18 	@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`
       
    19 
       
    20 install-home:
       
    21 	$(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force
       
    22 
       
    23 # test targets
       
    24 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
       
    25 
       
    26 HGTESTS=$(HGROOT)/tests
       
    27 
       
    28 help:
       
    29 	@echo 'Commonly used make targets:'
       
    30 	@echo '  tests              - run all tests in the automatic test suite'
       
    31 	@echo '  all-version-tests - run all tests against many hg versions'
       
    32 	@echo '  tests-%s           - run all tests in the specified hg version'
       
    33 
       
    34 all: help
       
    35 
       
    36 _check_hgroot:
       
    37 	ifeq ($(HGROOT),)
       
    38 	  $(error HGROOT is not set to the root of the hg source tree)
       
    39 	endif
       
    40 
       
    41 tests: _check_hgroot
       
    42 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
       
    43 
       
    44 # /!\ run outside of the compatibility branch output test will likely fails
       
    45 
       
    46 test-%: _check_hgroot
       
    47 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@
       
    48 
       
    49 tests-%: _check_hgroot
       
    50 	hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \
       
    51 	(cd $(HGROOT) ; $(MAKE) clean ) && \
       
    52 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
       
    53 
       
    54 # build a script to extract declared version
       
    55 all-version-tests: tests-@
       
    56 
       
    57 .PHONY: tests all-version-tests