-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 825 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 825 Bytes
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
.PHONY: all help clean test prophasm readme
SHELL=/usr/bin/env bash -eo pipefail
.SECONDARY:
all: prophasm
prophasm:
$(MAKE) -C src
help: ## Print help message
@echo "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s : | sort)"
test:
$(MAKE) -C tests
readme:
f=$$(mktemp);\
echo $$f;\
sed '/USAGE-BEGIN/q' README.md >> $$f; \
printf -- '-->\n```' >> $$f; \
./prophasm -h 2>&1 | perl -pe 's/^(.*)$$/\1/g' >> $$f; \
printf '```\n<!---\n' >> $$f; \
sed -n '/USAGE-END/,$$ p' README.md >> $$f;\
cat $$f \
| perl -pe 's/^[\s]+$$/\n/g' \
| perl -pe 's/[\s]+$$/\n/g' \
> README.md
markdown_py README.md > README.html
clean: ## Clean
$(MAKE) -C src clean
$(MAKE) -C tests clean
rm -f prophasm README.html