-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (50 loc) · 1.5 KB
/
Makefile
File metadata and controls
60 lines (50 loc) · 1.5 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: all help clean test clang-format
SHELL=/usr/bin/env bash -eo pipefail
IND=./prophex
.SECONDARY:
DEPS= $(wildcard src/*.h) $(wildcard src/*.c) $(wildcard src/bwa/.*.h) $(wildcard src/bwa/*.c)
all: prophex readme
prophex: $(DEPS)
$(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);\
sed '/USAGE-BEGIN/q' README.md >> $$f; \
printf -- '-->\n' >> $$f; \
printf '```' >> $$f; \
$(IND) 2>&1 | perl -pe 's/^(.*)$$/\1/g' >> $$f; \
printf '```\n\n' >> $$f; \
\
printf '```' >> $$f; \
$(IND) index -h 2>&1 | perl -pe 's/^(.*)$$/\1/g' >> $$f; \
printf '```\n\n' >> $$f; \
\
printf '```' >> $$f; \
$(IND) query -h 2>&1 | perl -pe 's/^(.*)$$/\1/g' >> $$f; \
printf '```\n\n' >> $$f; \
\
printf '```' >> $$f; \
$(IND) klcp -h 2>&1 | perl -pe 's/^(.*)$$/\1/g' >> $$f; \
printf '```\n\n' >> $$f; \
\
printf '```' >> $$f; \
$(IND) bwtdowngrade -h 2>&1 | perl -pe 's/^(.*)$$/\1/g' >> $$f; \
printf '```\n\n' >> $$f; \
\
printf '```' >> $$f; \
$(IND) bwt2fa -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;
format:
clang-format -verbose -i src/*.h src/*.c
clean: ## Clean
$(MAKE) -C src clean
$(MAKE) -C tests clean
rm -f prophex