##// END OF EJS Templates
i18n: make local now builds .mo files
Martin Geisler -
r7653:0641fd8a default
parent child Browse files
Show More
@@ -1,88 +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) hg version
30 $(PYTHON) hg version
30
31
31 build:
32 build:
32 $(PYTHON) setup.py build
33 $(PYTHON) setup.py build
33
34
34 doc:
35 doc:
35 $(MAKE) -C doc
36 $(MAKE) -C doc
36
37
37 clean:
38 clean:
38 -$(PYTHON) setup.py clean --all # ignore errors of this command
39 -$(PYTHON) setup.py clean --all # ignore errors of this command
39 find . -name '*.py[cdo]' -exec rm -f '{}' ';'
40 find . -name '*.py[cdo]' -exec rm -f '{}' ';'
40 rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err
41 rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err
41 $(MAKE) -C doc clean
42 $(MAKE) -C doc clean
42
43
43 install: install-bin install-doc
44 install: install-bin install-doc
44
45
45 install-bin: build
46 install-bin: build
46 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force
47 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force
47
48
48 install-doc: doc
49 install-doc: doc
49 cd doc && $(MAKE) $(MFLAGS) install
50 cd doc && $(MAKE) $(MFLAGS) install
50
51
51 install-home: install-home-bin install-home-doc
52 install-home: install-home-bin install-home-doc
52
53
53 install-home-bin: build
54 install-home-bin: build
54 $(PYTHON) setup.py install --home="$(HOME)" --force
55 $(PYTHON) setup.py install --home="$(HOME)" --force
55
56
56 install-home-doc: doc
57 install-home-doc: doc
57 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
58 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
58
59
59 MANIFEST-doc:
60 MANIFEST-doc:
60 $(MAKE) -C doc MANIFEST
61 $(MAKE) -C doc MANIFEST
61
62
62 MANIFEST: MANIFEST-doc
63 MANIFEST: MANIFEST-doc
63 hg manifest > MANIFEST
64 hg manifest > MANIFEST
64 echo mercurial/__version__.py >> MANIFEST
65 echo mercurial/__version__.py >> MANIFEST
65 cat doc/MANIFEST >> MANIFEST
66 cat doc/MANIFEST >> MANIFEST
66
67
67 dist: tests dist-notests
68 dist: tests dist-notests
68
69
69 dist-notests: doc MANIFEST
70 dist-notests: doc MANIFEST
70 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
71
72
72 tests:
73 tests:
73 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
74 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
74
75
75 test-%:
76 test-%:
76 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
77 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
77
78
78 update-pot:
79 update-pot:
79 mkdir -p i18n
80 mkdir -p i18n
80 pygettext -d doc -p i18n --docstrings \
81 pygettext -d doc -p i18n --docstrings \
81 mercurial/commands.py hgext/*.py hgext/*/__init__.py
82 mercurial/commands.py hgext/*.py hgext/*/__init__.py
82 pygettext -d all -p i18n mercurial hgext doc
83 pygettext -d all -p i18n mercurial hgext doc
83 msgcat i18n/doc.pot i18n/all.pot > i18n/hg.pot
84 msgcat i18n/doc.pot i18n/all.pot > i18n/hg.pot
84 rm i18n/doc.pot i18n/all.pot
85 rm i18n/doc.pot i18n/all.pot
85
86
86 .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 \
87 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 \
88 update-pot
89 update-pot
General Comments 0
You need to be logged in to leave comments. Login now