Show More
@@ -1,42 +1,61 | |||
|
1 | 1 | PREFIX=/usr/local |
|
2 | 2 | export PREFIX |
|
3 | 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 | 25 | local: |
|
8 | 26 | $(PYTHON) setup.py build_ext -i |
|
9 | 27 | |
|
10 | 28 | build: |
|
11 | 29 | $(PYTHON) setup.py build |
|
12 | 30 | |
|
13 | 31 | doc: |
|
14 | 32 | $(MAKE) -C doc |
|
15 | 33 | |
|
16 | 34 | clean: |
|
17 | 35 | -$(PYTHON) setup.py clean --all # ignore errors of this command |
|
18 | 36 | find . -name '*.py[co]' -exec rm -f '{}' ';' |
|
37 | rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err | |
|
19 | 38 | $(MAKE) -C doc clean |
|
20 | 39 | |
|
21 | 40 | install: all |
|
22 | 41 | $(PYTHON) setup.py install --prefix="$(PREFIX)" --force |
|
23 | 42 | cd doc && $(MAKE) $(MFLAGS) install |
|
24 | 43 | |
|
25 | 44 | install-home: all |
|
26 | 45 | $(PYTHON) setup.py install --home="$(HOME)" --force |
|
27 | 46 | cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install |
|
28 | 47 | |
|
29 | 48 | dist: tests dist-notests |
|
30 | 49 | |
|
31 | 50 | dist-notests: doc |
|
32 | 51 | TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest |
|
33 | 52 | |
|
34 | 53 | tests: |
|
35 | 54 | cd tests && $(PYTHON) run-tests.py |
|
36 | 55 | |
|
37 | 56 | test-%: |
|
38 | 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