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
23 $(MAKE
) -C completion
install
25 .PHONY
: all build
dist install install-completion
28 $(MAKE
) -C Documentation
all
31 $(MAKE
) -C Documentation
install
34 $(MAKE
) -C Documentation install-html
36 .PHONY
: doc install-doc install-html
38 lint
: lint-black lint-isort lint-flake8 lint-t
41 $(PYTHON
) -m black
--check --quiet
--diff .
44 $(PYTHON
) -m isort
--check-only
--quiet
--diff .
50 $(MAKE
) -C t test-lint
52 .PHONY
: lint lint-black lint-isort lint-flake8 lint-t
56 $(PYTHON
) -m isort
--quiet .
62 for patch in
$$($(PYTHON
) -m stgit.main series
--noprefix
$(TEST_PATCHES
)); do \
63 $(PYTHON
) -m stgit.main goto
$$patch && $(MAKE
) test || break
; \
66 .PHONY
: format
test test-patches
70 $(MAKE
) coverage-report
79 COVERAGE_RCFILE
=$(CURDIR
)/pyproject.toml \
80 COVERAGE_FILE
=$(CURDIR
)/.cov-files
/.coverage \
81 $(PYTHON
) -m coverage run
--context
=setup setup.py build
82 COVERAGE_RCFILE
=$(CURDIR
)/pyproject.toml \
83 COVERAGE_FILE
=$(CURDIR
)/.cov-files
/.coverage \
85 COVERAGE_PROCESS_START
=$(CURDIR
)/pyproject.toml \
86 COVERAGE_RCFILE
=$(CURDIR
)/pyproject.toml \
87 COVERAGE_FILE
=$(CURDIR
)/.cov-files
/.coverage \
88 $(MAKE
) -C Documentation build-txt man
89 $(PYTHON
) -m coverage combine .cov-files
/.coverage.
*
92 coverage-report
: .coverage
93 $(PYTHON
) -m coverage html
94 $(PYTHON
) -m coverage report
95 @echo
"HTML coverage report: file://$(CURDIR)/htmlcov/index.html"
97 .PHONY
: coverage coverage-test coverage-report
100 $(PYTHON
) -m pip
install -U pip setuptools wheel
101 $(PYTHON
) -m pip
install coverage
[toml
] black flake8 flake8-bugbear isort
105 for
dir in Documentation t
; do \
106 $(MAKE
) -C
$$dir clean; \
111 rm -rf stgit
/__pycache__
112 rm -f stgit
/builtin_version.py
113 rm -f stgit
/commands
/*.pyc
114 rm -rf stgit
/commands
/__pycache__
115 rm -f stgit
/commands
/cmdlist.py
116 rm -f stgit
/completion
/*.pyc
117 rm -rf stgit
/completion
/__pycache__
118 rm -f stgit
/lib
/*.pyc
119 rm -rf stgit
/lib
/__pycache__
120 rm -f stgit
/lib
/git
/*.pyc
121 rm -rf stgit
/lib
/git
/__pycache__
124 rm -f completion
/stg.fish
125 rm -f completion
/stgit.bash
136 .PHONY
: clean tags TAGS