-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.old
41 lines (29 loc) · 1.28 KB
/
Makefile.old
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
# Create "make test"
.PHONY: testshpec testshunit2 test clean build
BIN=./bin
SOURCE=./src
NIM_PATHS= --colors:on --noNimblePath --path:/local/giovanni/bamtocov/nimbledeps/pkgs/hts-0.3.17 --path:/local/giovanni/bamtocov/nimbledeps/pkgs/docopt-0.6.8 --path:/local/giovanni/bamtocov/nimbledeps/pkgs/regex-0.19.0 --path:/local/giovanni/bamtocov/nimbledeps/pkgs/unicodedb-0.9.0 --path:/local/giovanni/bamtocov/nimbledeps/pkgs/lapper-0.1.7
VERSION := $(shell grep version bamtocov.nimble | grep -o "[0-9]\\+\.[0-9]\.[0-9]\\+")
LIST=$(BIN)/bamtocov $(BIN)/bamtoreads $(BIN)/bamtocounts $(BIN)/covtotarget $(BIN)/bamcountrefs $(BIN)/gff2bed $(BIN)/bamtocounts_legacy $(BIN)/bamtarget
$(BIN)/%: $(SOURCE)/%.nim $(SOURCE)/covutils.nim bamtocov.nimble
nim c $(NIM_PATHS) -d:NimblePkgVersion=$(VERSION) -d:release --opt:speed --out:$@ $<
all: $(LIST)
test: testshpec
testall: testbash testshpec testshunit2
testshpec:
@echo " --- Test shpec --- "
./tests/bin/shpec ./tests/shpec/bamtocov.sh
testshunit2:
@echo " --- Test shunit2 --- "
./tests/unit/bamtocov-base.sh
testbash:
@echo " --- Test (legacy) --- "
bash tests/all.sh
build:
nimble build
clean:
@echo "Cleaning..."
@for i in $(LIST); \
do \
if [ -e "$$i" ]; then rm -f $$i; echo "Removing $$i"; else echo "$$i Not found"; fi \
done