-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (47 loc) · 1.22 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
58
59
60
BUILD = build
BUILD_DIRS = $(BUILD)
DIST = dist
FREGEJAR = frege.jar
ALEX = alex
CLIJAR = Libraries/commons-cli-1.3.1.jar
JAVAC = javac -cp $(FREGEJAR):${BUILD}:$(CLIJAR)
JAVA = java
MKDIR_P = mkdir -p
RM = rm -rf
MV = mv
BASH = bash
CP = cp
CP_P = cp --parents
CLASS_FILES = `find build -name "*class"`
FREGECFLAGS = -hints -O
FREGEC0 = $(JAVA) -Xss16m -Xmx2g -jar $(FREGEJAR) -fp ${BUILD}:${BUILD_TOOLS}
FREGEC = $(FREGEC0) $(FREGECFLAGS)
FREGE = $(JAVA) -Xss16m -Xmx2g -cp $(FREGEJAR):${BUILD}:${BUILD_TOOLS}
TESTSDIR = CSPM-Frontend/test
TESTFILES = $(notdir $(wildcard test/*))
TMP = /tmp
cspmf:
$(MKDIR_P) $(BUILD)
$(FREGEC) -d build Main.fr
dist: cspmf
@echo "[1;42mMake $@[0m"
$(MKDIR_P) $(DIST)
$(CP_P) $(CLASS_FILES) $(DIST)
$(MV) $(DIST)/$(BUILD)/* $(DIST)/
$(RM) $(DIST)/$(BUILD)
$(CP) $(FREGEJAR) $(DIST)/frege.jar
.PHONY: test %.csp
test: $(TESTFILES)
@echo $(TESTFILES)
@echo "[1;42mTesting done[0m"
%.csp:
@echo "[1;42mTesting $@[0m"
$(RM) $(TMP)/[email protected]
./cspmf.sh
@mv out $(TMP)/out
diff "test/$@" $(TMP)/out || \
(echo "Test $@ failed" && exit 1)
.PHONY: clean
clean:
@echo "[1;42mMaking $@[0m"
$(RM) $(BUILD_DIRS) $(DIST)