-
Notifications
You must be signed in to change notification settings - Fork 40
/
Makefile
46 lines (34 loc) · 1019 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
40
41
42
43
44
45
46
package = hamler
exe_target = hamler
export HAMLER_HOME ?= $(shell $(CURDIR)/get-hamler-home.sh)
all: build foreign
build:
cabal run hamler build -- -l -e
foreign:
@erlc -o ebin lib/Foreign/*.erl
clean:
cabal clean
run:
cabal build && cabal run $(exe_target)
install:
@mkdir -p $(HAMLER_HOME)
cabal install --installdir=$(HAMLER_HOME)/bin --overwrite-policy=always
@cp repl/replsrv $(HAMLER_HOME)/bin/replsrv
@cp -r ebin $(HAMLER_HOME)
@cp -r lib $(HAMLER_HOME)
test:
cabal run hamler testDev
repl:
cabal run hamler repldev
docker:
docker build -t hamlerlang/hamler:$$(git describe --tags --always) -f deploy/docker/Dockerfile .
pkg:
mkdir -p /usr/lib/hamler/bin
HAMLER_HOME="/usr/lib/hamler" cabal run hamler build -- -l -e
cabal install --overwrite-policy=always
cp ~/.cabal/bin/hamler /usr/lib/hamler/bin
cp repl/replsrv /usr/lib/hamler/bin/replsrv
cp -r ebin /usr/lib/hamler
cp -r lib /usr/lib/hamler
make -C deploy/packages
.PHONY : build clean run install test repl docker pkg