-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (27 loc) · 1.35 KB
/
Makefile
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
# Self-documenting Makefile
# Version: s7
# Source: https://github.com/jara001/Makefile
# Originally:
# Self-documenting Makefile by prwhite
# https://gist.github.com/prwhite/8168133
# https://gist.github.com/prwhite/8168133#gistcomment-1716694
# https://gist.github.com/prwhite/8168133#gistcomment-1737630
.PHONY: build develop install uninstall reinstall
help: ## Show this help message.
@echo "Usage: make [target] ..."
@echo
@echo "Targets:"
@grep --color=auto -F "## " $(MAKEFILE_LIST) | grep --color=auto -F -v grep | sed -e "s/\\$$//" | sed -e "s/##//" | column -c2 -t -s :
@grep "##@[^ \"]*" $(MAKEFILE_LIST) | grep --color=auto -F -v grep | sed -e "s/^.*##@\\([a-zA-Z][a-zA-Z]*\\).*\$$/\1/" | sed "/^\\$$/d" | sort | uniq | xargs -I'{}' -n 1 bash -c "echo; echo {} targets:; grep '##@{}' $(MAKEFILE_LIST) | sed -e 's/##@{}//' | column -c2 -t -s :"
build: ##@Build Build a Python3 wheel.
python setup.py build bdist_wheel --universal
develop: ##@Developer Install the package as link to this repository.
python setup.py develop --user
install: ##@Install Install the package for current user.
python setup.py install --user
uninstall: ##@Install Uninstall the package.
python -m pip uninstall '$(notdir $(CURDIR))'
reinstall: ##@Install Reinstall the package
reinstall: uninstall install
test: ##@Test Run the unit tests.
python -m unittest discover -s tests