Add import -p option
[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 stgit-completion.bash
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 stgit-completion.bash: $(ALL_PY)
18 $(PYTHON) stg-build --bash-completion > $@
19
20 install: build
21 $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
22
23 doc:
24 cd Documentation && $(MAKE) all
25
26 install-doc:
27 $(MAKE) -C Documentation install
28
29 install-html:
30 $(MAKE) -C Documentation install-html
31
32 test: build
33 cd t && $(MAKE) all
34
35 test_patches: build
36 for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
37 stg goto $$patch && $(MAKE) test || break; \
38 done
39
40 clean:
41 for dir in Documentation t; do \
42 (cd $$dir && $(MAKE) clean); \
43 done
44 rm -rf build
45 rm -f stgit/*.pyc
46 rm -f stgit/commands/*.pyc
47 rm -f TAGS
48 rm -f stgit/commands/cmdlist.py
49
50 tags:
51 ctags -R stgit/*
52
53 TAGS:
54 ctags -e -R stgit/*
55
56 .PHONY: all build install doc install-doc install-html test test_patches \
57 clean tags TAGS