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