-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (42 loc) · 1.27 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
# ---------------- configuration ----------------------
# if you have multiple SWI Prolog installations or an installation
# in a non-standard place, set PLLD to the appropriate plld invokation, eg
# PLLD=/usr/local/bin/plld -p /usr/local/bin/swipl
#PACKNAME=sparkle
#include ../Makefile.inc
SWIPL = swipl -L0 -G0 -T0 -p library=prolog
all: tmp test
check:
install:
clean:
test: tmp
$(SWIPL) -l tests/tests.pl -g run_tests,halt
bigtest:
$(SWIPL) -l tests/bigtests.pl -g run_tests,halt
coverage:
$(SWIPL) -l tests/bigtests.pl -l tests/tests.pl -g "show_coverage(run_tests),halt"
t-%:
$(SWIPL) -l tests/$*_test.pl -g run_tests,halt
tmp:
mkdir $@
# --------------------
# Docker
# --------------------
# Get version from pack
VERSION = v$(shell swipl -l pack.pl -g "version(V),writeln(V),halt.")
show-version:
echo $(VERSION)
IM = cmungall/neoplasmer
docker-all: docker-clean docker-build docker-run
docker-clean:
docker kill /neoplasmer || echo not running ;
docker kill $(IM) || echo not running ;
docker rm $(IM) || echo not made
docker-build:
@docker build -t $(IM):$(VERSION) . \
&& docker tag $(IM):$(VERSION) $(IM):latest
docker-run:
docker run --name neoplasmer $(IM)
docker-publish: docker-build
@docker push $(IM):$(VERSION) \
&& docker push $(IM):latest