File: Makefile

package info (click to toggle)
stgit 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,752 kB
  • sloc: python: 10,558; sh: 5,739; lisp: 2,678; makefile: 142; perl: 42
file content (70 lines) | stat: -rw-r--r-- 1,489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
prefix	?= $(HOME)
DESTDIR	?= /
PYTHON	?= python

export DESTDIR PYTHON

TEST_PATCHES ?= ..

all:
	$(PYTHON) setup.py build

install:
	$(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force

doc:
	$(MAKE) -C Documentation all

install-doc:
	$(MAKE) -C Documentation install

install-html:
	$(MAKE) -C Documentation install-html

test:
	$(PYTHON) setup.py build
	$(MAKE) -C t all

test_patches:
	for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
		stg goto $$patch && $(MAKE) test || break; \
	done

coverage: coverage-test coverage-report

coverage-test:
	$(PYTHON) -m coverage run setup.py build
	COVERAGE_PROCESS_START=$(PWD)/.coveragerc $(MAKE) -C t all
	$(PYTHON) -m coverage combine $$(find . -name '.coverage.*')

coverage-report:
	$(PYTHON) -m coverage html --title="stgit coverage"
	$(PYTHON) -m coverage report
	@echo "HTML coverage report: file://$(PWD)/htmlcov/index.html"

clean:
	for dir in Documentation t; do \
		$(MAKE) -C $$dir clean; \
	done
	rm -rf build
	rm -rf dist
	rm  -f stgit/*.pyc
	rm -rf stgit/__pycache__
	rm  -f stgit/builtin_version.py
	rm  -f stgit/commands/*.pyc
	rm -rf stgit/commands/__pycache__
	rm  -f stgit/commands/cmdlist.py
	rm  -f stgit/lib/*.pyc
	rm -rf stgit/lib/__pycache__
	rm  -f TAGS tags
	rm  -f MANIFEST
	rm  -f stgit-completion.bash

tags:
	ctags -R stgit/*

TAGS:
	ctags -e -R stgit/*

.PHONY: all install doc install-doc install-html test test_patches \
	coverage coverage-test coverage-report clean tags TAGS