forked from karel-brinda/samsift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (33 loc) · 929 Bytes
/
Makefile
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
.PHONY: all clean pypi test test1 test2 readme README.rst README.html inc
SHELL=/usr/bin/env bash
.SECONDARY:
all: readme
clean:
rm -fr build/ dist/ samsift/__pycache__ samsift.egg-info
rm -f *.sam *.bam
pypi:
/usr/bin/env python3 setup.py sdist bdist_wheel upload
readme: README.rst README.html
README.html:
rst2html.py README.rst > README.html
README.rst:
f=$$(mktemp);\
sed '/USAGE-BEGIN/q' README.rst >> $$f; \
printf '\n.. code-block::\n' >> $$f;\
./samsift/samsift -h 2>&1 | perl -pe 's/^(.*)$$/\t\1/g' >> $$f; \
printf '\n' >> $$f;\
sed -n '/USAGE-END/,$$ p' README.rst >> $$f;\
cp $$f README.rst
inc:
./samsift/increment_version.py
$(MAKE) readme
test: test1 test2
test1:
cat README.rst \
| grep -E ' ' \
| perl -pe 's/^\s*//g' \
| grep -E "^samsift" \
| perl -pe 's/^samsift /samsift\/samsift /g' \
| xargs -L 1 bash -x
test2:
$(MAKE) -C tests