Mercurial > hg > mercurial-crew-with-dirclash
comparison Makefile @ 2235:457e4247315d
New make targets:
local: build extensions inplace (the former "all" target")
all: "local" (for people who expect this) and build everything else
install: install pre-built things (so root doesn't have to write to $HOME)
install-home: use setup.py's --home option instead of --prefix
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 09 May 2006 18:03:15 +0200 |
parents | 9ea93ff67a73 |
children | 76be4e66ddc8 |
comparison
equal
deleted
inserted
replaced
2234:9ea93ff67a73 | 2235:457e4247315d |
---|---|
1 PREFIX=/usr/local | 1 PREFIX=/usr/local |
2 export PREFIX | 2 export PREFIX |
3 PYTHON=python | 3 PYTHON=python |
4 | 4 |
5 all: | 5 all: local build doc |
6 | |
7 local: | |
6 $(PYTHON) setup.py build_ext -i | 8 $(PYTHON) setup.py build_ext -i |
7 | 9 |
8 install: all | 10 build: |
9 $(PYTHON) setup.py install --home="$(PREFIX)" | 11 $(PYTHON) setup.py build |
10 cd doc && $(MAKE) $(MFLAGS) install | 12 |
13 doc: | |
14 $(MAKE) -C doc | |
11 | 15 |
12 clean: | 16 clean: |
13 -$(PYTHON) setup.py clean --all # ignore errors of this command | 17 -$(PYTHON) setup.py clean --all # ignore errors of this command |
14 find . -name '*.py[co]' -exec rm -f '{}' ';' | 18 find . -name '*.py[co]' -exec rm -f '{}' ';' |
15 $(MAKE) -C doc clean | 19 $(MAKE) -C doc clean |
20 | |
21 install: all | |
22 $(PYTHON) setup.py install --prefix="$(PREFIX)" --force | |
23 cd doc && $(MAKE) $(MFLAGS) install | |
24 | |
25 install-home: all | |
26 $(PYTHON) setup.py install --home="$(HOME)" --force | |
27 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install | |
16 | 28 |
17 dist: tests dist-notests | 29 dist: tests dist-notests |
18 | 30 |
19 dist-notests: doc | 31 dist-notests: doc |
20 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest | 32 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest |
23 cd tests && $(PYTHON) run-tests.py | 35 cd tests && $(PYTHON) run-tests.py |
24 | 36 |
25 test-%: | 37 test-%: |
26 cd tests && $(PYTHON) run-tests.py $@ | 38 cd tests && $(PYTHON) run-tests.py $@ |
27 | 39 |
28 doc: | |
29 $(MAKE) -C doc | |
30 | 40 |
41 .PHONY: all local build doc clean install install-home dist dist-notests tests | |
31 | 42 |
32 .PHONY: all clean dist dist-notests tests doc | |
33 |