-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
53 lines (39 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
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(dir $(MAKEFILE_PATH))
SWIPL = $(MAKEFILE_DIR)bin/swipl_wrap
# override these GNU-recommended variables for a custom install
prefix = /usr/local
datadir = $(prefix)/share
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
.PHONY: all clean test symlink install uninstall
all: clean test
test: stage-test
$(SWIPL) -q -t test -l prolog/test/test
test-%: stage-test
$(SWIPL) -q -t "test($*)" -l prolog/test/test
stage-test:
(test -e t/target && rm -rf t/target) || true
cp -r t/init t/target
clean:
git clean -fd || true
symlink:
ln -sf $(MAKEFILE_DIR)bin/biomake $(bindir)/biomake
install:
mkdir -p $(datadir)
(test -e $(datadir)/biomake && rm -rf $(datadir)/biomake) || true
cp -r $(MAKEFILE_DIR) $(datadir)/biomake
ln -sf $(datadir)/biomake/bin/biomake $(bindir)/biomake
uninstall:
(test -e $(datadir)/biomake && rm -rf $(datadir)/biomake) || true
(test -e $(bindir)/biomake && rm -rf $(bindir)/biomake) || true
VERSION = "v0.0.1"
IM=cmungall/biomake
docker-build:
@docker build -t $(IM):$(VERSION) . \
&& docker tag $(IM):$(VERSION) $(IM):latest
docker-run:
docker run --rm -ti --name biomake $(IM)
docker-publish: docker-build
@docker push $(IM):$(VERSION) \
&& docker push $(IM):latest