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