Show More
@@ -1,88 +1,89 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 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 ' update-pot - update i18n/hg.pot' |
|
17 | 17 | @echo |
|
18 | 18 | @echo 'Example for a system-wide installation under /usr/local:' |
|
19 | 19 | @echo ' make all && su -c "make install" && hg version' |
|
20 | 20 | @echo |
|
21 | 21 | @echo 'Example for a local installation (usable in this directory):' |
|
22 | 22 | @echo ' make local && ./hg version' |
|
23 | 23 | |
|
24 | 24 | all: build doc |
|
25 | 25 | |
|
26 | 26 | local: |
|
27 | 27 | $(PYTHON) setup.py build_ext -i |
|
28 | 28 | $(PYTHON) setup.py build_py -c -d . |
|
29 | $(PYTHON) setup.py build_mo | |
|
29 | 30 | $(PYTHON) hg version |
|
30 | 31 | |
|
31 | 32 | build: |
|
32 | 33 | $(PYTHON) setup.py build |
|
33 | 34 | |
|
34 | 35 | doc: |
|
35 | 36 | $(MAKE) -C doc |
|
36 | 37 | |
|
37 | 38 | clean: |
|
38 | 39 | -$(PYTHON) setup.py clean --all # ignore errors of this command |
|
39 | 40 | find . -name '*.py[cdo]' -exec rm -f '{}' ';' |
|
40 | 41 | rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err |
|
41 | 42 | $(MAKE) -C doc clean |
|
42 | 43 | |
|
43 | 44 | install: install-bin install-doc |
|
44 | 45 | |
|
45 | 46 | install-bin: build |
|
46 | 47 | $(PYTHON) setup.py install --prefix="$(PREFIX)" --force |
|
47 | 48 | |
|
48 | 49 | install-doc: doc |
|
49 | 50 | cd doc && $(MAKE) $(MFLAGS) install |
|
50 | 51 | |
|
51 | 52 | install-home: install-home-bin install-home-doc |
|
52 | 53 | |
|
53 | 54 | install-home-bin: build |
|
54 | 55 | $(PYTHON) setup.py install --home="$(HOME)" --force |
|
55 | 56 | |
|
56 | 57 | install-home-doc: doc |
|
57 | 58 | cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install |
|
58 | 59 | |
|
59 | 60 | MANIFEST-doc: |
|
60 | 61 | $(MAKE) -C doc MANIFEST |
|
61 | 62 | |
|
62 | 63 | MANIFEST: MANIFEST-doc |
|
63 | 64 | hg manifest > MANIFEST |
|
64 | 65 | echo mercurial/__version__.py >> MANIFEST |
|
65 | 66 | cat doc/MANIFEST >> MANIFEST |
|
66 | 67 | |
|
67 | 68 | dist: tests dist-notests |
|
68 | 69 | |
|
69 | 70 | dist-notests: doc MANIFEST |
|
70 | 71 | TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist |
|
71 | 72 | |
|
72 | 73 | tests: |
|
73 | 74 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) |
|
74 | 75 | |
|
75 | 76 | test-%: |
|
76 | 77 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ |
|
77 | 78 | |
|
78 | 79 | update-pot: |
|
79 | 80 | mkdir -p i18n |
|
80 | 81 | pygettext -d doc -p i18n --docstrings \ |
|
81 | 82 | mercurial/commands.py hgext/*.py hgext/*/__init__.py |
|
82 | 83 | pygettext -d all -p i18n mercurial hgext doc |
|
83 | 84 | msgcat i18n/doc.pot i18n/all.pot > i18n/hg.pot |
|
84 | 85 | rm i18n/doc.pot i18n/all.pot |
|
85 | 86 | |
|
86 | 87 | .PHONY: help all local build doc clean install install-bin install-doc \ |
|
87 | 88 | install-home install-home-bin install-home-doc dist dist-notests tests \ |
|
88 | 89 | update-pot |
General Comments 0
You need to be logged in to leave comments.
Login now