Mercurial > evolve
comparison Makefile @ 5386:77729ad7cb0c
makefile: make all non-file targets phony
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 07 Jul 2020 20:37:07 +0800 |
parents | 5be8fb87ef28 |
children | a86c2682f608 |
comparison
equal
deleted
inserted
replaced
5385:5be8fb87ef28 | 5386:77729ad7cb0c |
---|---|
1 PYTHON ?= python | 1 PYTHON ?= python |
2 VERSION = $(shell python setup.py --version) | 2 VERSION = $(shell python setup.py --version) |
3 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) | 3 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) |
4 HGTESTS = $(HGROOT)/tests | 4 HGTESTS = $(HGROOT)/tests |
5 | 5 |
6 .PHONY: help | |
6 help: | 7 help: |
7 @echo 'Commonly used make targets:' | 8 @echo 'Commonly used make targets:' |
8 @echo ' deb-prepare - prepare the build of a debian package' | 9 @echo ' deb-prepare - prepare the build of a debian package' |
9 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))' | 10 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))' |
10 @echo ' tests - run all tests in the automatic test suite' | 11 @echo ' tests - run all tests in the automatic test suite' |
11 | 12 |
13 .PHONY: all | |
12 all: help | 14 all: help |
13 | 15 |
16 .PHONY: deb-prepare | |
14 deb-prepare: | 17 deb-prepare: |
15 python setup.py sdist --dist-dir .. | 18 python setup.py sdist --dist-dir .. |
16 mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz | 19 mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz |
17 tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz | 20 tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz |
18 rm -rf ../mercurial-evolve_$(VERSION).orig | 21 rm -rf ../mercurial-evolve_$(VERSION).orig |
19 mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig | 22 mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig |
20 cp -r debian/ ../mercurial-evolve_$(VERSION).orig/ | 23 cp -r debian/ ../mercurial-evolve_$(VERSION).orig/ |
21 @cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd` | 24 @cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd` |
22 | 25 |
26 .PHONY: install-home | |
23 install-home: | 27 install-home: |
24 $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force | 28 $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force |
25 | 29 |
30 .PHONY: doc | |
26 doc: | 31 doc: |
27 $(MAKE) -C docs | 32 $(MAKE) -C docs |
28 | 33 |
34 .PHONY: _check_hgroot | |
29 _check_hgroot: | 35 _check_hgroot: |
30 ifeq ($(HGROOT),) | 36 ifeq ($(HGROOT),) |
31 $(error HGROOT is not set to the root of the hg source tree) | 37 $(error HGROOT is not set to the root of the hg source tree) |
32 endif | 38 endif |
33 | 39 |
40 .PHONY: tests | |
34 tests: _check_hgroot | 41 tests: _check_hgroot |
35 cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) | 42 cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) |
36 | 43 |
37 test-%: _check_hgroot | 44 test-%: _check_hgroot |
38 cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ | 45 cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ |
39 | |
40 .PHONY: tests all-version-tests |