Commit | Line | Data |
---|---|---|
29a8a0c9 | 1 | prefix ?= $(HOME) |
3dd412a1 CM |
2 | DESTDIR ?= / |
3 | PYTHON ?= python | |
c8a4777f | 4 | |
f26b5036 CM |
5 | TEST_PATCHES ?= .. |
6 | ||
33ff9cdd | 7 | all: build |
c8a4777f PR |
8 | $(PYTHON) setup.py build |
9 | ||
6c8a90e1 | 10 | build: stgit/commands/cmdlist.py stgit-completion.bash |
33ff9cdd KH |
11 | |
12 | ALL_PY = $(shell find stgit -name '*.py') | |
13 | ||
14 | stgit/commands/cmdlist.py: $(ALL_PY) | |
15 | $(PYTHON) stg-build --py-cmd-list > $@ | |
16 | ||
6c8a90e1 KH |
17 | stgit-completion.bash: $(ALL_PY) |
18 | $(PYTHON) stg-build --bash-completion > $@ | |
19 | ||
33ff9cdd | 20 | install: build |
29a8a0c9 | 21 | $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force |
c8a4777f PR |
22 | |
23 | doc: | |
368a44c3 | 24 | cd Documentation && $(MAKE) all |
c8a4777f | 25 | |
722b07a6 DW |
26 | install-doc: |
27 | $(MAKE) -C Documentation install | |
28 | ||
fd52912d DW |
29 | install-html: |
30 | $(MAKE) -C Documentation install-html | |
31 | ||
33ff9cdd | 32 | test: build |
c8a4777f PR |
33 | cd t && $(MAKE) all |
34 | ||
33ff9cdd | 35 | test_patches: build |
f26b5036 CM |
36 | for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \ |
37 | stg goto $$patch && $(MAKE) test || break; \ | |
38 | done | |
39 | ||
c8a4777f | 40 | clean: |
368a44c3 | 41 | for dir in Documentation t; do \ |
c8a4777f PR |
42 | (cd $$dir && $(MAKE) clean); \ |
43 | done | |
44 | rm -rf build | |
45 | rm -f stgit/*.pyc | |
46 | rm -f stgit/commands/*.pyc | |
a7c71daf | 47 | rm -f TAGS |
33ff9cdd | 48 | rm -f stgit/commands/cmdlist.py |
a7c71daf CM |
49 | |
50 | tags: | |
ca454a61 CM |
51 | ctags -R stgit/* |
52 | ||
53 | TAGS: | |
a7c71daf | 54 | ctags -e -R stgit/* |
368a44c3 | 55 | |
ca454a61 CM |
56 | .PHONY: all build install doc install-doc install-html test test_patches \ |
57 | clean tags TAGS |