forked from emichael/dslabs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (40 loc) · 1.16 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
.PHONY: all test dependencies clean clean-all
ODDITY_URL = https://github.com/uwplse/oddity/releases/download/v0.38a/oddity.jar
FRAMEWORK_FILES = $(shell find framework -type f | sed 's/ /\\ /g')
LAB_FILES = $(shell find labs -type f | sed 's/ /\\ /g')
HANDOUT_FILES = $(shell find handout-files -type f | sed 's/ /\\ /g')
JAR_FILES = build/libs/framework.jar \
build/libs/framework-compile.jar \
build/libs/framework-sources.jar
OTHER_FILES = build/doc/ lombok.config deps/oddity.jar
ifeq ($(shell uname -s),Darwin)
TAR = gtar
else
TAR = tar
endif
ifeq ($(shell uname -s),Darwin)
CP = gcp
else
CP = cp
endif
all: build/handout/
dependencies: deps/oddity.jar
./gradlew copyDependencies
$(JAR_FILES) build/doc/: $(FRAMEWORK_FILES)
./gradlew assemble
touch $@
deps/oddity.jar:
mkdir -p deps
wget -O $@ $(ODDITY_URL)
build/handout/: $(LAB_FILES) $(JAR_FILES) $(HANDOUT_FILES) $(OTHER_FILES)
rm -rf $@
mkdir $@
$(CP) -r labs handout-files/. $(JAR_FILES) $(OTHER_FILES) $@
build/handout.tar.gz: build/handout/
$(TAR) -czf $@ --transform "s/^build\/handout/dslabs/" $^
test:
./gradlew test
clean:
rm -rf build
clean-all: clean
rm -rf deps .gradle