-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (38 loc) · 1.34 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
.PHONY: clean
clean:
rm -rf target cljs-test-runner-out
################################################################################
# Testing/CI
################################################################################
.PHONY: test-clj test-cljs coverage ci
test-clj:
clojure -A:test:runner-clj
test-cljs:
clojure -A:test:runner-cljs
coverage:
clojure -A:test:runner-coverage
ci: clean test-clj test-cljs
################################################################################
# Command Line Interface
################################################################################
.PHONY: bundle
MACHINE ?= $(shell bin/machine.sh)
JAVA_MODULES ?= $(shell cat .java_modules)
BUNDLE_RUNTIMES ?= true # false for Docker
target/bundle/cli.jar:
clojure -T:build uber :jar cli
target/bundle/server.jar:
clojure -T:build uber :jar server
target/bundle/bin:
mkdir -p target/bundle/bin
cp bin/*.sh target/bundle/bin
chmod +x target/bundle/bin/*.sh
target/bundle/runtimes:
mkdir -p target/bundle/runtimes
jlink --output target/bundle/runtimes/${MACHINE} --add-modules ${JAVA_MODULES}
ifeq ($(BUNDLE_RUNTIMES),true)
target/bundle: target/bundle/cli.jar target/bundle/server.jar target/bundle/bin target/bundle/runtimes
else
target/bundle: target/bundle/cli.jar target/bundle/server.jar target/bundle/bin
endif
bundle: target/bundle