chiark / gitweb /
Implement "stg refresh --edit" again
[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
33ff9cdd
KH
10build: stgit/commands/cmdlist.py
11
12ALL_PY = $(shell find stgit -name '*.py')
13
14stgit/commands/cmdlist.py: $(ALL_PY)
15 $(PYTHON) stg-build --py-cmd-list > $@
16
17install: build
29a8a0c9 18 $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
c8a4777f
PR
19
20doc:
368a44c3 21 cd Documentation && $(MAKE) all
c8a4777f 22
722b07a6
DW
23install-doc:
24 $(MAKE) -C Documentation install
25
fd52912d
DW
26install-html:
27 $(MAKE) -C Documentation install-html
28
33ff9cdd 29test: build
c8a4777f
PR
30 cd t && $(MAKE) all
31
33ff9cdd 32test_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 37clean:
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
47tags:
48 ctags -e -R stgit/*
368a44c3 49
33ff9cdd 50.PHONY: all build install doc install-doc install-html test test_patches clean