Show More
@@ -1,77 +1,77 | |||||
1 | PREFIX=/usr/local |
|
1 | PREFIX=/usr/local | |
2 | export PREFIX |
|
2 | export PREFIX | |
3 | PYTHON=python |
|
3 | PYTHON=python | |
4 |
|
4 | |||
5 | help: |
|
5 | help: | |
6 | @echo 'Commonly used make targets:' |
|
6 | @echo 'Commonly used make targets:' | |
7 | @echo ' all - build program and documentation' |
|
7 | @echo ' all - build program and documentation' | |
8 | @echo ' install - install program and man pages to PREFIX ($(PREFIX))' |
|
8 | @echo ' install - install program and man pages to PREFIX ($(PREFIX))' | |
9 | @echo ' install-home - install with setup.py install --home=HOME ($(HOME))' |
|
9 | @echo ' install-home - install with setup.py install --home=HOME ($(HOME))' | |
10 | @echo ' local - build C extensions for inplace usage' |
|
10 | @echo ' local - build C extensions for inplace usage' | |
11 | @echo ' tests - run all tests in the automatic test suite' |
|
11 | @echo ' tests - run all tests in the automatic test suite' | |
12 | @echo ' test-foo - run only specified tests (e.g. test-merge1)' |
|
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/' |
|
13 | @echo ' dist - run all tests and create a source tarball in dist/' | |
14 | @echo ' clean - remove files created by other targets' |
|
14 | @echo ' clean - remove files created by other targets' | |
15 | @echo ' (except installed files or dist source tarball)' |
|
15 | @echo ' (except installed files or dist source tarball)' | |
16 | @echo |
|
16 | @echo | |
17 | @echo 'Example for a system-wide installation under /usr/local:' |
|
17 | @echo 'Example for a system-wide installation under /usr/local:' | |
18 | @echo ' make all && su -c "make install" && hg version' |
|
18 | @echo ' make all && su -c "make install" && hg version' | |
19 | @echo |
|
19 | @echo | |
20 | @echo 'Example for a local installation (usable in this directory):' |
|
20 | @echo 'Example for a local installation (usable in this directory):' | |
21 | @echo ' make local && ./hg version' |
|
21 | @echo ' make local && ./hg version' | |
22 |
|
22 | |||
23 | all: build doc |
|
23 | all: build doc | |
24 |
|
24 | |||
25 | local: |
|
25 | local: | |
26 | $(PYTHON) setup.py build_ext -i |
|
26 | $(PYTHON) setup.py build_ext -i | |
27 |
|
27 | |||
28 | build: |
|
28 | build: | |
29 | $(PYTHON) setup.py build |
|
29 | $(PYTHON) setup.py build | |
30 |
|
30 | |||
31 | doc: |
|
31 | doc: | |
32 | $(MAKE) -C doc |
|
32 | $(MAKE) -C doc | |
33 |
|
33 | |||
34 | clean: |
|
34 | clean: | |
35 | -$(PYTHON) setup.py clean --all # ignore errors of this command |
|
35 | -$(PYTHON) setup.py clean --all # ignore errors of this command | |
36 | 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 |
|
37 | rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err | |
38 | $(MAKE) -C doc clean |
|
38 | $(MAKE) -C doc clean | |
39 |
|
39 | |||
40 | install: install-bin install-doc |
|
40 | install: install-bin install-doc | |
41 |
|
41 | |||
42 | install-bin: build |
|
42 | install-bin: build | |
43 | $(PYTHON) setup.py install --prefix="$(PREFIX)" --force |
|
43 | $(PYTHON) setup.py install --prefix="$(PREFIX)" --force | |
44 |
|
44 | |||
45 | install-doc: doc |
|
45 | install-doc: doc | |
46 | cd doc && $(MAKE) $(MFLAGS) install |
|
46 | cd doc && $(MAKE) $(MFLAGS) install | |
47 |
|
47 | |||
48 | install-home: install-home-bin install-home-doc |
|
48 | install-home: install-home-bin install-home-doc | |
49 |
|
49 | |||
50 | install-home-bin: build |
|
50 | install-home-bin: build | |
51 | $(PYTHON) setup.py install --home="$(HOME)" --force |
|
51 | $(PYTHON) setup.py install --home="$(HOME)" --force | |
52 |
|
52 | |||
53 | install-home-doc: doc |
|
53 | install-home-doc: doc | |
54 | cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install |
|
54 | cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install | |
55 |
|
55 | |||
56 | MANIFEST-doc: |
|
56 | MANIFEST-doc: | |
57 | $(MAKE) -C doc MANIFEST |
|
57 | $(MAKE) -C doc MANIFEST | |
58 |
|
58 | |||
59 | MANIFEST: MANIFEST-doc |
|
59 | MANIFEST: MANIFEST-doc | |
60 | hg manifest > MANIFEST |
|
60 | hg manifest > MANIFEST | |
61 | echo mercurial/__version__.py >> MANIFEST |
|
61 | echo mercurial/__version__.py >> MANIFEST | |
62 | cat doc/MANIFEST >> MANIFEST |
|
62 | cat doc/MANIFEST >> MANIFEST | |
63 |
|
63 | |||
64 | dist: tests dist-notests |
|
64 | dist: tests dist-notests | |
65 |
|
65 | |||
66 | dist-notests: doc MANIFEST |
|
66 | dist-notests: doc MANIFEST | |
67 | TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist |
|
67 | TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist | |
68 |
|
68 | |||
69 | tests: |
|
69 | tests: | |
70 | cd tests && $(PYTHON) run-tests.py |
|
70 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) | |
71 |
|
71 | |||
72 | test-%: |
|
72 | test-%: | |
73 | cd tests && $(PYTHON) run-tests.py $@ |
|
73 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | .PHONY: help all local build doc clean install install-bin install-doc \ |
|
76 | .PHONY: help all local build doc clean install install-bin install-doc \ | |
77 | install-home install-home-bin install-home-doc dist dist-notests tests |
|
77 | 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