forked from evoldoers/biomake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 863 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
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
all: clean test
test:
$(SWIPL) -q -t test -l prolog/test/test
test-%:
$(SWIPL) -q -t "test($*)" -l prolog/test/test
clean:
git clean -fd t/target || 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