forked from rigetti/rpcq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (32 loc) · 945 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
34
35
36
37
38
39
COMMIT_HASH=$(shell git rev-parse --short HEAD)
SBCL_BIN=sbcl
SBCL=$(SBCL_BIN) --noinform --no-userinit --no-sysinit --non-interactive
QUICKLISP_HOME=$(HOME)/quicklisp
QUICKLISP_SETUP=$(QUICKLISP_HOME)/setup.lisp
QUICKLISP=$(SBCL) --load $(QUICKLISP_HOME)/setup.lisp \
--eval '(push (truename ".") asdf:*central-registry*)'
UNAME_S=$(shell uname -s)
all: build
.PHONY: install-test-deps
install-test-deps:
ifeq ($(UNAME_S),Linux)
ifeq ($(shell sed -n "s/^ID=//p" /etc/os-release),debian)
apt-get install -y git libzmq3-dev
else
echo "Centos-based platforms unsupported"
endif
else
echo "Non-Linux-based platforms unsupported"
endif
.PHONY: install-build-deps
install-build-deps: install-test-deps
test:
$(QUICKLISP) \
--eval "(ql:quickload :rpcq-tests)" \
--eval '(asdf:test-system :rpcq)'
build:
$(QUICKLISP) \
--eval "(ql:quickload :rpcq)"
.PHONY: docker
docker: Dockerfile
docker build -t rigetti/rpcq:$(COMMIT_HASH) .