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 | ||
33ff9cdd KH |
10 | build: stgit/commands/cmdlist.py |
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 | ||
17 | install: build | |
29a8a0c9 | 18 | $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force |
c8a4777f PR |
19 | |
20 | doc: | |
368a44c3 | 21 | cd Documentation && $(MAKE) all |
c8a4777f | 22 | |
722b07a6 DW |
23 | install-doc: |
24 | $(MAKE) -C Documentation install | |
25 | ||
fd52912d DW |
26 | install-html: |
27 | $(MAKE) -C Documentation install-html | |
28 | ||
33ff9cdd | 29 | test: build |
c8a4777f PR |
30 | cd t && $(MAKE) all |
31 | ||
33ff9cdd | 32 | test_patches: build |
f26b5036 CM |
33 | for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \ |
34 | stg goto $$patch && $(MAKE) test || break; \ | |
35 | done | |
36 | ||
c8a4777f | 37 | clean: |
368a44c3 | 38 | for dir in Documentation t; do \ |
c8a4777f PR |
39 | (cd $$dir && $(MAKE) clean); \ |
40 | done | |
41 | rm -rf build | |
42 | rm -f stgit/*.pyc | |
43 | rm -f stgit/commands/*.pyc | |
a7c71daf | 44 | rm -f TAGS |
33ff9cdd | 45 | rm -f stgit/commands/cmdlist.py |
a7c71daf CM |
46 | |
47 | tags: | |
48 | ctags -e -R stgit/* | |
368a44c3 | 49 | |
33ff9cdd | 50 | .PHONY: all build install doc install-doc install-html test test_patches clean |