chiark / gitweb /
fix "stg float -s FILE" for FILE != "-"
[stgit] / Makefile
CommitLineData
29a8a0c9 1prefix ?= $(HOME)
3dd412a1
CM
2DESTDIR ?= /
3PYTHON ?= python
c8a4777f 4
f26b5036
CM
5TEST_PATCHES ?= ..
6
33ff9cdd 7all: build
c8a4777f
PR
8 $(PYTHON) setup.py build
9
6c8a90e1 10build: stgit/commands/cmdlist.py stgit-completion.bash
33ff9cdd
KH
11
12ALL_PY = $(shell find stgit -name '*.py')
13
14stgit/commands/cmdlist.py: $(ALL_PY)
15 $(PYTHON) stg-build --py-cmd-list > $@
16
6c8a90e1
KH
17stgit-completion.bash: $(ALL_PY)
18 $(PYTHON) stg-build --bash-completion > $@
19
33ff9cdd 20install: build
29a8a0c9 21 $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
c8a4777f
PR
22
23doc:
368a44c3 24 cd Documentation && $(MAKE) all
c8a4777f 25
722b07a6
DW
26install-doc:
27 $(MAKE) -C Documentation install
28
fd52912d
DW
29install-html:
30 $(MAKE) -C Documentation install-html
31
33ff9cdd 32test: build
c8a4777f
PR
33 cd t && $(MAKE) all
34
33ff9cdd 35test_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 40clean:
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
50tags:
ca454a61
CM
51 ctags -R stgit/*
52
53TAGS:
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