Test that stg coalesce handles head != top gracefully
[stgit] / Makefile
1 prefix ?= $(HOME)
2 DESTDIR ?= /
3 PYTHON ?= python
4
5 TEST_PATCHES ?= ..
6
7 all: build
8 $(PYTHON) setup.py build
9
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
18 $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
19
20 doc:
21 cd Documentation && $(MAKE) all
22
23 install-doc:
24 $(MAKE) -C Documentation install
25
26 install-html:
27 $(MAKE) -C Documentation install-html
28
29 test: build
30 cd t && $(MAKE) all
31
32 test_patches: build
33 for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
34 stg goto $$patch && $(MAKE) test || break; \
35 done
36
37 clean:
38 for dir in Documentation t; do \
39 (cd $$dir && $(MAKE) clean); \
40 done
41 rm -rf build
42 rm -f stgit/*.pyc
43 rm -f stgit/commands/*.pyc
44 rm -f TAGS
45 rm -f stgit/commands/cmdlist.py
46
47 tags:
48 ctags -e -R stgit/*
49
50 .PHONY: all build install doc install-doc install-html test test_patches clean