author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
Thu, 02 Mar 2017 18:07:46 +0100 | |
changeset 2020 | 143c8e4dc22d |
parent 1769 | 38d1463f3e0f |
parent 1893 | 9d1157fcdc6c |
child 2039 | 103da16f3be2 |
permissions | -rw-r--r-- |
542
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
1 |
VERSION=$(shell python setup.py --version) |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
2 |
|
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
3 |
|
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
4 |
help: |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
5 |
@echo 'Commonly used make targets:' |
1769
38d1463f3e0f
makefile: fix documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1524
diff
changeset
|
6 |
@echo ' deb-prepare - prepare the build of a debian package' |
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
7 |
|
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
8 |
all: help |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
9 |
|
531
b18b00036355
pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
0
diff
changeset
|
10 |
deb-prepare: |
b18b00036355
pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
0
diff
changeset
|
11 |
python setup.py sdist --dist-dir .. |
542
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
12 |
mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
13 |
tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
14 |
rm -rf ../mercurial-evolve_$(VERSION).orig |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
15 |
mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
16 |
cp -r debian/ ../mercurial-evolve_$(VERSION).orig/ |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
17 |
@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd` |
2020
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
18 |
|
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
19 |
# test targets |
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
20 |
|
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
21 |
PYTHON=python |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
22 |
ifeq ($(HGROOT),) |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
23 |
$(error HGROOT is not set to the root of the hg source tree) |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
24 |
endif |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
25 |
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
26 |
|
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
27 |
HGTESTS=$(HGROOT)/tests |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 |
help: |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
30 |
@echo 'Commonly used make targets:' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
31 |
@echo ' tests - run all tests in the automatic test suite' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
32 |
@echo ' all-version-tests - run all tests against many hg versions' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
33 |
@echo ' tests-%s - run all tests in the specified hg version' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
34 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
35 |
all: help |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
36 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
37 |
tests: |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
38 |
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
39 |
|
2020
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
40 |
# /!\ run outside of the compatibility branch output test will likely fails |
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
41 |
|
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
42 |
test-%: |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
43 |
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
44 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
45 |
tests-%: |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
46 |
hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \ |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
47 |
(cd $(HGROOT) ; $(MAKE) clean ) && \ |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
48 |
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
49 |
|
2020
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
50 |
# build a script to extract declared version |
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
51 |
all-version-tests: tests-@ |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
52 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
53 |
.PHONY: tests all-version-tests |