Skip to content

Commit 7728603

Browse files
committed
[MISC] Ensure make targets won't collide with potential file names
1 parent 9f4f6cc commit 7728603

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

Makefile

+25-10
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ package = aa_intel_tool
99
.DEFAULT_GOAL := help
1010

1111
# Help
12+
.PHONY: help
1213
help:
14+
@echo ""
1315
@echo "$(appname_verbose) Makefile"
1416
@echo ""
15-
@echo "Usage: make [command]"
17+
@echo "Usage:"
18+
@echo " make [command]"
1619
@echo ""
1720
@echo "Commands:"
1821
@echo " build_test Build the package"
@@ -21,11 +24,13 @@ help:
2124
@echo " pre-commit-checks Run pre-commit checks"
2225
@echo " tox_tests Run tests with tox"
2326
@echo " translationfiles Create or update translation files"
27+
@echo ""
2428

2529
# Translation files
30+
.PHONY: translationfiles
2631
translationfiles:
27-
#cd $(package); \
28-
django-admin makemessages \
32+
@echo "Creating or updating translation files"
33+
@django-admin makemessages \
2934
-l cs \
3035
-l de \
3136
-l es \
@@ -43,17 +48,21 @@ translationfiles:
4348
--ignore 'build/*'
4449

4550
# Graph models
51+
.PHONY: graph_models
4652
graph_models:
47-
python ../myauth/manage.py \
53+
@echo "Creating a graph of the models"
54+
@python ../myauth/manage.py \
4855
graph_models \
4956
$(package) \
5057
--arrow-shape normal \
5158
-o $(appname)-models.png
5259

5360
# Coverage
61+
.PHONY: coverage
5462
coverage:
55-
rm -rfv htmlcov; \
56-
coverage run ../myauth/manage.py \
63+
@echo "Running tests and creating a coverage report"
64+
@rm -rf htmlcov
65+
@coverage run ../myauth/manage.py \
5766
test \
5867
$(package) \
5968
--keepdb \
@@ -62,16 +71,22 @@ coverage:
6271
coverage report -m
6372

6473
# Build test
74+
.PHONY: build_test
6575
build_test:
66-
rm -rfv dist; \
67-
python3 -m build
76+
@echo "Building the package"
77+
@rm -rf dist
78+
@python3 -m build
6879

6980
# Tox tests
81+
.PHONY: tox_tests
7082
tox_tests:
71-
export USE_MYSQL=False; \
83+
@echo "Running tests with tox"
84+
@export USE_MYSQL=False; \
7285
tox -v -e allianceauth-latest; \
7386
rm -rf .tox/
7487

7588
# Pre-commit checks
89+
.PHONY: pre-commit-checks
7690
pre-commit-checks:
77-
pre-commit run --all-files
91+
@echo "Running pre-commit checks"
92+
@pre-commit run --all-files

0 commit comments

Comments
 (0)