##// END OF EJS Templates
Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein -
r2244:76be4e66 default
parent child Browse files
Show More
@@ -1,42 +1,61
1 PREFIX=/usr/local
1 PREFIX=/usr/local
2 export PREFIX
2 export PREFIX
3 PYTHON=python
3 PYTHON=python
4
4
5 all: local build doc
5 help:
6 @echo 'Commonly used make targets:'
7 @echo ' all - build program and documentation'
8 @echo ' install - install program and man pages to PREFIX ($(PREFIX))'
9 @echo ' install-home - install with setup.py install --home=HOME ($(HOME))'
10 @echo ' local - build C extensions for inplace usage'
11 @echo ' tests - run all tests in the automatic test suite'
12 @echo ' test-foo - run only specified tests (e.g. test-merge1)'
13 @echo ' dist - run all tests and create a source tarball in dist/'
14 @echo ' clean - remove files created by other targets'
15 @echo ' (except installed files or dist source tarball)'
16 @echo
17 @echo 'Example for a system-wide installation under /usr/local:'
18 @echo ' make all && su -c "make install" && hg version'
19 @echo
20 @echo 'Example for a local installation (usable in this directory):'
21 @echo ' make local && ./hg version'
22
23 all: build doc
6
24
7 local:
25 local:
8 $(PYTHON) setup.py build_ext -i
26 $(PYTHON) setup.py build_ext -i
9
27
10 build:
28 build:
11 $(PYTHON) setup.py build
29 $(PYTHON) setup.py build
12
30
13 doc:
31 doc:
14 $(MAKE) -C doc
32 $(MAKE) -C doc
15
33
16 clean:
34 clean:
17 -$(PYTHON) setup.py clean --all # ignore errors of this command
35 -$(PYTHON) setup.py clean --all # ignore errors of this command
18 find . -name '*.py[co]' -exec rm -f '{}' ';'
36 find . -name '*.py[co]' -exec rm -f '{}' ';'
37 rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err
19 $(MAKE) -C doc clean
38 $(MAKE) -C doc clean
20
39
21 install: all
40 install: all
22 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force
41 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force
23 cd doc && $(MAKE) $(MFLAGS) install
42 cd doc && $(MAKE) $(MFLAGS) install
24
43
25 install-home: all
44 install-home: all
26 $(PYTHON) setup.py install --home="$(HOME)" --force
45 $(PYTHON) setup.py install --home="$(HOME)" --force
27 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
46 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
28
47
29 dist: tests dist-notests
48 dist: tests dist-notests
30
49
31 dist-notests: doc
50 dist-notests: doc
32 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest
51 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest
33
52
34 tests:
53 tests:
35 cd tests && $(PYTHON) run-tests.py
54 cd tests && $(PYTHON) run-tests.py
36
55
37 test-%:
56 test-%:
38 cd tests && $(PYTHON) run-tests.py $@
57 cd tests && $(PYTHON) run-tests.py $@
39
58
40
59
41 .PHONY: all local build doc clean install install-home dist dist-notests tests
60 .PHONY: help all local build doc clean install install-home dist dist-notests tests
42
61
General Comments 0
You need to be logged in to leave comments. Login now