-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 1.48 KB
/
Makefile
File metadata and controls
46 lines (38 loc) · 1.48 KB
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
37
38
39
40
41
42
43
44
45
46
################################################################################
# Makefile
# The orchestrator makefile.
################################################################################
################################################################################
# HELP (default)
# Automatically generate well-formatted output for any target that has a "##"
# comment preceding it.
################################################################################
.PHONY: help check-all
default: help
help:
@printf "Available targets:\n\n"
@awk '/^[a-zA-Z\-_0-9%:\\]+/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = $$1; \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
gsub("\\\\", "", helpCommand); \
gsub(":+$$", "", helpCommand); \
printf " \x1b[32;01m%-35s\x1b[0m %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort -u
@printf "\n"
################################################################################
# INCLUDES
# Avoid sticking every target in the same Makefile for the same reason we don't
# stick all code in the same source file.
################################################################################
-include tasks/*.make
.PHONY: keep/check keep/tidy
## Check all.
keep/check: md/lint yaml/lint py/lint py/security py/test
@echo "All files checked."
## Tidy all.
keep/tidy: json/tidy md/tidy py/tidy toml/tidy yaml/tidy
@echo "All files tidied."