-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (46 loc) · 1.68 KB
/
Makefile
File metadata and controls
59 lines (46 loc) · 1.68 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
49
50
51
52
53
54
55
56
57
58
59
SRC_FILES = $(shell find src test -name '*.java')
TESTS = \
datastructures.ListTest \
datastructures2.FunctionCombinatorTest \
datastructures2.ListHeadTailTest \
datastructures2.ListTest \
datastructures3.FunctionCombinatorTest \
datastructures3.ListHeadTailTest \
datastructures3.ListTest \
equals.MutableEqualsTest \
functions.FunctionTypeTest \
functions.RecursionTest \
math.NaturalNumbersTest \
math.FactorialTest \
option.OptionTest
CLASSPATH = lib/junit-4.5.jar:lib/scala-library.jar:lib/akka-actor-1.1.jar:lib/akka-remote-1.1.jar:lib/akka-stm-1.1.jar:lib/multiverse-alpha-0.6.2.jar
CLASSPATH_ARG = -classpath ${CLASSPATH}
all: tests examples
# I didn't make this target part of all because the resulting files should be
# visually inspected before using them!
detab: cleanbaks
@find . -name '*.javax' -o -name '*.java' | while read f; \
do echo "Converting tabs in $$f"; \
mv $$f $$f.bak; \
expand -t 2 $$f.bak > $$f; \
done
cleanbaks:
@find . -name '*.bak' | while read f; do rm $$f; done
tests: compile
@for t in ${TESTS}; do echo "Running $$t"; \
java -ea ${CLASSPATH_ARG}:out org.junit.runner.JUnitCore $$t; \
test $$? -eq 0 || exit 1; \
done
examples: actor.example stm.example
clean: cleanbaks
rm -rf out
compile: clean out
javac ${CLASSPATH_ARG} -Xlint:unchecked -d out -sourcepath src -sourcepath test ${SRC_FILES}
out:
mkdir -p out
actor.example: compile
@echo "Running actors.AkkaActorExample"
java ${CLASSPATH_ARG}:out -Dakka.config=lib/akka.conf actors.AkkaActorExample I am a Master Thespian!
stm.example: compile
@echo "Running stm.AkkaSTMIntegerCounter"
java ${CLASSPATH_ARG}:out -Dakka.config=lib/akka.conf stm.AkkaSTMIntegerCounter