##// END OF EJS Templates
makefile: cleanup makefile
milka -
r912:a3afd478 default
parent child
Show More
@@ -1,28 +1,45
1
1 .DEFAULT_GOAL := help
2 .PHONY: clean test test-clean test-only generate-pkgs pip-packages
3
2
4 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
3 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
5 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
4 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
6
5
7 clean:
6 .PHONY: clean
7 clean: ## full clean
8 make test-clean
8 make test-clean
9 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
9 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
10
10
11 test:
11
12 .PHONY: test
13 test: ## run test-clean and tests
12 make test-clean
14 make test-clean
13 make test-only
15 make test-only
14
16
15 test-clean:
17
18 .PHONY:test-clean
19 test-clean: ## run test-clean and tests
16 rm -rf coverage.xml htmlcov junit.xml pylint.log result
20 rm -rf coverage.xml htmlcov junit.xml pylint.log result
17 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
21 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
22 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
18
23
19 test-only:
24
25 .PHONY: test-only
26 test-only: ## run tests
20 PYTHONHASHSEED=random \
27 PYTHONHASHSEED=random \
21 py.test -x -vv -r xw -p no:sugar \
28 py.test -x -vv -r xw -p no:sugar \
22 --cov=vcsserver --cov-report=term-missing --cov-report=html vcsserver
29 --cov=vcsserver --cov-report=term-missing --cov-report=html \
30 vcsserver
23
31
24 generate-pkgs:
32
33 .PHONY: generate-pkgs
34 generate-pkgs: ## generate new python packages
25 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
35 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
26
36
27 pip-packages:
37
38 .PHONY: pip-packages
39 pip-packages: ## show outdated packages
28 python ${OUTDATED_PACKAGES}
40 python ${OUTDATED_PACKAGES}
41
42
43 .PHONY: help
44 help:
45 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-24s\033[0m %s\n", $$1, $$2}'
General Comments 0
You need to be logged in to leave comments. Login now