-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
58 lines (41 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
55
56
57
# Can be overriden by user using environment variable
DUCTTAPE:=$(shell dirname $(realpath $(lastword ${MAKEFILE_LIST})))
SBT:=${DUCTTAPE}/build-support/sbt
DUCTTAPE_LIBS:=$(shell find ${DUCTTAPE}/lib -name "*.jar" -printf "%p:")
scalac:
echo >&2 "Building source..."
mkdir -p ${DUCTTAPE}/bin
find ${DUCTTAPE}/src/main/scala ${DUCTTAPE}/src/test/scala \
| egrep '\.scala$$' \
| xargs scalac \
-Dscala.timings=true \
-unchecked -deprecation -cp ${DUCTTAPE_LIBS} \
-d ${DUCTTAPE}/bin/ \
| ${DUCTTAPE}/build-support/color_scalac.awk
sbt:
${SBT} compile
jar: ${DUCTTAPE}/ducttape.jar
minjar: ${DUCTTAPE}/ducttape.min.jar
${DUCTTAPE}/ducttape.jar:
echo >&2 "Building JAR..."
(cd ${DUCTTAPE}/bin; for j in $(shell find ${DUCTTAPE}/lib -name "*.jar"); do jar xfv $${j}; done; zip -qr ${DUCTTAPE}/ducttape.jar *)
# Make a minimal JAR containing all dependencies,
# but with unnecessary class files removed
${DUCTTAPE}/ducttape.min.jar:
${SBT} proguard
doc:
${DUCTTAPE}/doc.sh
scaladoc:
${DUCTTAPE}/scaladoc.sh
release: jar
test-unit:
${SBT} test
# Run regression tests using the distribution version
test-regression: dist
PATH=${DUCTTAPE}/dist/ducttape-current:${PATH} ${DUCTTAPE}/test-regression.sh
clean:
echo >&2 "TODO"
# SBT likes to keep lots of garbage around
deep-clean:
rm -rf ~/.ivy2 ~/.m2 ~/.sbt
sbt clean clean-files