This repository was archived by the owner on Feb 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 1.31 KB
/
Makefile
File metadata and controls
48 lines (39 loc) · 1.31 KB
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
#
# Makefile
# =============================================================================
# Customers API Lite microservice prototype (Clojure port). Version 0.3.0
# =============================================================================
# A daemon written in Clojure, designed and intended to be run
# as a microservice, implementing a special Customers API prototype
# with a smart yet simplified data scheme.
# =============================================================================
# (See the LICENSE file at the top of the source tree.)
#
SRV = target
UBERJAR = uberjar
JAR = $(SRV)/$(UBERJAR)
# Specify flags and other vars here.
LEIN = lein
LFLAGS = compile :all
MV = mv
UNXZ = unxz
# Making the first target (JVM classes).
$(SRV):
$(LEIN) $(LFLAGS)
# Making the second target (executable JAR bundle).
$(JAR):
$(LEIN) $(UBERJAR) && \
DAEMON_NAME="customers-api-lite"; \
DMN_VERSION="0.3.0"; \
SIMPLE_JAR="$(JAR)/$${DAEMON_NAME}-$${DMN_VERSION}.jar"; \
BUNDLE_JAR="$(JAR)/$${DAEMON_NAME}-$${DMN_VERSION}-standalone.jar"; \
$(RM) $${SIMPLE_JAR} && $(MV) $${BUNDLE_JAR} $${SIMPLE_JAR} && \
DB_DIR="data/db"; \
if [ -f $${DB_DIR}/$${DAEMON_NAME}.db.xz ]; then \
$(UNXZ) $${DB_DIR}/$${DAEMON_NAME}.db.xz; \
fi
.PHONY: all clean
all: $(JAR)
clean:
$(LEIN) clean
# vim:set nu et ts=4 sw=4: