annotate Makefile @ 3865:36a957364b1b 0.9.2

Make make dist a bit quieter
author Matt Mackall <mpm@selenic.com>
date Sun, 10 Dec 2006 19:20:35 -0600
parents 1a7794525c2b
children 9d7ac8613340
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2233
3840cefa5222 Added install target.
wilde@trapperkeeper.sha-bang.de
parents: 2207
diff changeset
1 PREFIX=/usr/local
3840cefa5222 Added install target.
wilde@trapperkeeper.sha-bang.de
parents: 2207
diff changeset
2 export PREFIX
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
3 PYTHON=python
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
4
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
5 help:
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
6 @echo 'Commonly used make targets:'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
7 @echo ' all - build program and documentation'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
8 @echo ' install - install program and man pages to PREFIX ($(PREFIX))'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
9 @echo ' install-home - install with setup.py install --home=HOME ($(HOME))'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
10 @echo ' local - build C extensions for inplace usage'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
11 @echo ' tests - run all tests in the automatic test suite'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
12 @echo ' test-foo - run only specified tests (e.g. test-merge1)'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
13 @echo ' dist - run all tests and create a source tarball in dist/'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
14 @echo ' clean - remove files created by other targets'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
15 @echo ' (except installed files or dist source tarball)'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
16 @echo
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
17 @echo 'Example for a system-wide installation under /usr/local:'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
18 @echo ' make all && su -c "make install" && hg version'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
19 @echo
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
20 @echo 'Example for a local installation (usable in this directory):'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
21 @echo ' make local && ./hg version'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
22
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
23 all: build doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
24
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
25 local:
1020
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
26 $(PYTHON) setup.py build_ext -i
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
27
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
28 build:
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
29 $(PYTHON) setup.py build
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
30
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
31 doc:
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
32 $(MAKE) -C doc
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
33
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
34 clean:
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
35 -$(PYTHON) setup.py clean --all # ignore errors of this command
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
36 find . -name '*.py[co]' -exec rm -f '{}' ';'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
37 rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err
1423
76239f0cb0dc Use $(MAKE) not make
levon@movementarian.org
parents: 1020
diff changeset
38 $(MAKE) -C doc clean
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
39
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
40 install: install-bin install-doc
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
41
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
42 install-bin: build
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
43 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
44
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
45 install-doc: doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
46 cd doc && $(MAKE) $(MFLAGS) install
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
47
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
48 install-home: install-home-bin install-home-doc
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
49
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
50 install-home-bin: build
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
51 $(PYTHON) setup.py install --home="$(HOME)" --force
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
52
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
53 install-home-doc: doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
54 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
55
2234
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
56 dist: tests dist-notests
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
57
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
58 dist-notests: doc
3864
1a7794525c2b Automatically build MANIFEST for make dist
Matt Mackall <mpm@selenic.com>
parents: 2527
diff changeset
59 hg manifest > MANIFEST
3865
36a957364b1b Make make dist a bit quieter
Matt Mackall <mpm@selenic.com>
parents: 3864
diff changeset
60 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
3864
1a7794525c2b Automatically build MANIFEST for make dist
Matt Mackall <mpm@selenic.com>
parents: 2527
diff changeset
61 rm MANIFEST
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
62
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
63 tests:
2207
8a2a7f7d9df6 Delete the shell version of run-tests
Stephen Darnell <stephen@darnell.plus.com>
parents: 1426
diff changeset
64 cd tests && $(PYTHON) run-tests.py
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
65
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
66 test-%:
2207
8a2a7f7d9df6 Delete the shell version of run-tests
Stephen Darnell <stephen@darnell.plus.com>
parents: 1426
diff changeset
67 cd tests && $(PYTHON) run-tests.py $@
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
68
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
69
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
70 .PHONY: help all local build doc clean install install-bin install-doc \
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
71 install-home install-home-bin install-home-doc dist dist-notests tests