1 prefix ?
= $(HOME
)/.local
4 DEFAULT_TEST_TARGET ?
= test
14 $(PYTHON
) setup.py build
17 $(PYTHON
) setup.py sdist
20 $(PYTHON
) setup.py
install --prefix=$(prefix) --root
=$(DESTDIR
) --force
22 .PHONY
: all build
dist install
25 $(MAKE
) -C Documentation
all
28 $(MAKE
) -C Documentation
install
31 $(MAKE
) -C Documentation install-html
33 .PHONY
: doc install-doc install-html
35 lint
: lint-black lint-isort lint-flake8 lint-t
38 $(PYTHON
) -m black
--check --quiet
--diff .
41 $(PYTHON
) -m isort
--check-only
--quiet
--diff .
47 $(MAKE
) -C t test-lint
49 .PHONY
: lint lint-black lint-isort lint-flake8 lint-t
53 $(PYTHON
) -m isort
--quiet .
59 for patch in
$$($(PYTHON
) -m stgit.main series
--noprefix
$(TEST_PATCHES
)); do \
60 $(PYTHON
) -m stgit.main goto
$$patch && $(MAKE
) test || break
; \
63 .PHONY
: format
test test-patches
67 $(MAKE
) coverage-report
76 COVERAGE_FILE
=$(CURDIR
)/.cov-files
/.coverage \
77 $(PYTHON
) -m coverage run
--context
=setup setup.py build
78 COVERAGE_PROCESS_START
=$(CURDIR
)/pyproject.toml \
79 COVERAGE_FILE
=$(CURDIR
)/.cov-files
/.coverage \
81 COVERAGE_PROCESS_START
=$(CURDIR
)/pyproject.toml \
82 COVERAGE_FILE
=$(CURDIR
)/.cov-files
/.coverage \
83 $(MAKE
) -C Documentation build-txt
84 $(PYTHON
) -m coverage combine .cov-files
/.coverage.
*
87 coverage-report
: .coverage
88 $(PYTHON
) -m coverage html
89 $(PYTHON
) -m coverage report
90 @echo
"HTML coverage report: file://$(CURDIR)/htmlcov/index.html"
92 .PHONY
: coverage coverage-test coverage-report
95 $(PYTHON
) -m pip
install -U pip
96 $(PYTHON
) -m pip
install coverage
[toml
] black flake8 flake8-bugbear isort
100 for
dir in Documentation t
; do \
101 $(MAKE
) -C
$$dir clean; \
106 rm -rf stgit
/__pycache__
107 rm -f stgit
/builtin_version.py
108 rm -f stgit
/commands
/*.pyc
109 rm -rf stgit
/commands
/__pycache__
110 rm -f stgit
/commands
/cmdlist.py
111 rm -f stgit
/completion
/*.pyc
112 rm -rf stgit
/completion
/__pycache__
113 rm -f stgit
/lib
/*.pyc
114 rm -rf stgit
/lib
/__pycache__
115 rm -f stgit
/lib
/git
/*.pyc
116 rm -rf stgit
/lib
/git
/__pycache__
119 rm -f completion
/stg.fish
120 rm -f completion
/stgit.bash
131 .PHONY
: clean tags TAGS