##// END OF EJS Templates
use PURE option in Makefile
Martin Geisler -
r7706:0ae7f0b3 default
parent child Browse files
Show More
@@ -1,35 +1,43
1 1 syntax: glob
2 2
3 3 *.elc
4 4 *.orig
5 5 *.rej
6 6 *~
7 7 *.mergebackup
8 8 *.o
9 9 *.so
10 10 *.pyd
11 11 *.pyc
12 12 *.swp
13 13 *.prof
14 14 tests/.coverage*
15 15 tests/annotated
16 16 tests/*.err
17 17 build
18 18 contrib/hgsh/hgsh
19 19 dist
20 20 doc/*.[0-9]
21 21 doc/*.[0-9].gendoc.txt
22 22 doc/*.[0-9].{x,ht}ml
23 23 MANIFEST
24 24 patches
25 25 mercurial/__version__.py
26 26 Output/Mercurial-*.exe
27 27 .DS_Store
28 28 tags
29 29 cscope.*
30 30 i18n/hg.pot
31 31 locale/*/LC_MESSAGES/hg.mo
32 32
33 # files installed with a local --pure build
34 mercurial/base85.py
35 mercurial/bdiff.py
36 mercurial/diffhelpers.py
37 mercurial/mpatch.py
38 mercurial/osutil.py
39 mercurial/parsers.py
40
33 41 syntax: regexp
34 42 ^\.pc/
35 43 ^\.(pydev)?project
@@ -1,89 +1,88
1 1 PREFIX=/usr/local
2 2 export PREFIX
3 3 PYTHON=python
4 PURE=
4 5
5 6 help:
6 7 @echo 'Commonly used make targets:'
7 8 @echo ' all - build program and documentation'
8 9 @echo ' install - install program and man pages to PREFIX ($(PREFIX))'
9 10 @echo ' install-home - install with setup.py install --home=HOME ($(HOME))'
10 11 @echo ' local - build for inplace usage'
11 12 @echo ' tests - run all tests in the automatic test suite'
12 13 @echo ' test-foo - run only specified tests (e.g. test-merge1)'
13 14 @echo ' dist - run all tests and create a source tarball in dist/'
14 15 @echo ' clean - remove files created by other targets'
15 16 @echo ' (except installed files or dist source tarball)'
16 17 @echo ' update-pot - update i18n/hg.pot'
17 18 @echo
18 19 @echo 'Example for a system-wide installation under /usr/local:'
19 20 @echo ' make all && su -c "make install" && hg version'
20 21 @echo
21 22 @echo 'Example for a local installation (usable in this directory):'
22 23 @echo ' make local && ./hg version'
23 24
24 25 all: build doc
25 26
26 27 local:
27 $(PYTHON) setup.py build_ext -i
28 $(PYTHON) setup.py build_py -c -d .
29 $(PYTHON) setup.py build_mo
28 $(PYTHON) setup.py $(PURE) build_py -c -d . build_ext -i build_mo
30 29 $(PYTHON) hg version
31 30
32 31 build:
33 $(PYTHON) setup.py build
32 $(PYTHON) setup.py $(PURE) build
34 33
35 34 doc:
36 35 $(MAKE) -C doc
37 36
38 37 clean:
39 38 -$(PYTHON) setup.py clean --all # ignore errors of this command
40 39 find . -name '*.py[cdo]' -exec rm -f '{}' ';'
41 40 rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err
42 41 $(MAKE) -C doc clean
43 42
44 43 install: install-bin install-doc
45 44
46 45 install-bin: build
47 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force
46 $(PYTHON) setup.py $(PURE) install --prefix="$(PREFIX)" --force
48 47
49 48 install-doc: doc
50 49 cd doc && $(MAKE) $(MFLAGS) install
51 50
52 51 install-home: install-home-bin install-home-doc
53 52
54 53 install-home-bin: build
55 $(PYTHON) setup.py install --home="$(HOME)" --force
54 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --force
56 55
57 56 install-home-doc: doc
58 57 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
59 58
60 59 MANIFEST-doc:
61 60 $(MAKE) -C doc MANIFEST
62 61
63 62 MANIFEST: MANIFEST-doc
64 63 hg manifest > MANIFEST
65 64 echo mercurial/__version__.py >> MANIFEST
66 65 cat doc/MANIFEST >> MANIFEST
67 66
68 67 dist: tests dist-notests
69 68
70 69 dist-notests: doc MANIFEST
71 70 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
72 71
73 72 tests:
74 73 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
75 74
76 75 test-%:
77 76 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
78 77
79 78 update-pot:
80 79 mkdir -p i18n
81 80 pygettext -d doc -p i18n --docstrings \
82 81 mercurial/commands.py hgext/*.py hgext/*/__init__.py
83 82 pygettext -d all -p i18n mercurial hgext doc
84 83 msgcat --sort-by-file i18n/doc.pot i18n/all.pot > i18n/hg.pot
85 84 rm i18n/doc.pot i18n/all.pot
86 85
87 86 .PHONY: help all local build doc clean install install-bin install-doc \
88 87 install-home install-home-bin install-home-doc dist dist-notests tests \
89 88 update-pot
General Comments 0
You need to be logged in to leave comments. Login now