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