-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
67 lines (54 loc) · 1.87 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# MAKEFILE
#
# @link https://github.com/genomicsplc/wecall
# ------------------------------------------------------------------------------
# List special make targets that are not associated with files
.PHONY: help format clean vendor wecall test-unit env-wecall test-acceptance install package clean
PREFIX=/usr/local
BUILD=target/build
export WECALL_TEST_RESULTS=results
export WECALL_BIN=$(BUILD)
all: vendor wecall
help:
@echo ""
@echo "weCall Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make : Build weCall"
@echo " make test-unit : Execute unit tests"
@echo " make test-acceptance : Execute acceptance tests"
@echo " make install : Install the executable"
@echo " make package : Build DEB, RPM and TGZ packages"
@echo " make clean : Remove any build artifact"
@echo ""
vendor:
$(MAKE) --directory=vendor
wecall: vendor
mkdir -p $(BUILD) \
&& cd $(BUILD) \
&& cmake -D CMAKE_INSTALL_PREFIX=$(PREFIX) ../../cpp
$(MAKE) --directory=$(BUILD)
cp vendor/samtools/samtools $(BUILD)
cp vendor/tabix/tabix $(BUILD)
cp vendor/tabix/bgzip $(BUILD)
test-unit: vendor wecall
$(BUILD)/unittest
$(BUILD)/iotest
env-wecall:
python3 -m venv env-wecall
bash -c "source env-wecall/bin/activate && pip install wheel"
bash -c "source env-wecall/bin/activate && cd python && pip install ."
bash -c "source env-wecall/bin/activate && cd test-drivers && pip install ."
test-acceptance: wecall env-wecall
bash -c " source env-wecall/bin/activate && scripts/run-tests.sh test"
install: vendor wecall
$(MAKE) --directory=$(BUILD) install
package: vendor wecall
$(MAKE) --directory=$(BUILD) package
clean:
$(MAKE) --directory=vendor clean
-rm -rf $(BUILD)
-rm -f cpp/src/version/version.cpp
-rm -f doc/weCall-userguide.aux
-rm -f doc/weCall-userguide.out
-rm -f doc/weCall-userguide.toc