Skip to content

Commit 18b3870

Browse files
authored
Infra: Declare Makefile targets as phony (#2841)
1 parent c0b28da commit 18b3870

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,35 @@ JOBS=8
66
OUTPUT_DIR=build
77
RENDER_COMMAND=$(VENVDIR)/bin/python3 build.py -j $(JOBS) -o $(OUTPUT_DIR)
88

9+
.PHONY: render
910
render: venv
1011
$(RENDER_COMMAND)
1112

13+
.PHONY: pages
1214
pages: venv rss
1315
$(RENDER_COMMAND) --build-dirs
1416

17+
.PHONY: fail-warning
1518
fail-warning: venv
1619
$(RENDER_COMMAND) --fail-on-warning
1720

21+
.PHONY: check-links
1822
check-links: venv
1923
$(RENDER_COMMAND) --check-links
2024

25+
.PHONY: rss
2126
rss: venv
2227
$(VENVDIR)/bin/python3 generate_rss.py
2328

29+
.PHONY: clean
2430
clean: clean-venv
2531
-rm -rf build topic
2632

33+
.PHONY: clean-venv
2734
clean-venv:
2835
rm -rf $(VENVDIR)
2936

37+
.PHONY: venv
3038
venv:
3139
@if [ -d $(VENVDIR) ] ; then \
3240
echo "venv already exists."; \
@@ -38,13 +46,16 @@ venv:
3846
echo "The venv has been created in the $(VENVDIR) directory"; \
3947
fi
4048

49+
.PHONY: lint
4150
lint: venv
4251
$(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit
4352
$(VENVDIR)/bin/python3 -m pre_commit run --all-files
4453

54+
.PHONY: test
4555
test: venv
4656
$(VENVDIR)/bin/python3 -bb -X dev -W error -m pytest
4757

58+
.PHONY: spellcheck
4859
spellcheck: venv
4960
$(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit
5061
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell

0 commit comments

Comments
 (0)