-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·60 lines (49 loc) · 1.4 KB
/
build.sh
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
export CLASSPATH=./classes:$CLASSPATH
DIST=./classes
VERSION=1.1.5
echo "SALSA Build Script v0.2.2"
echo "Please make sure the current directory is in your CLASSPATH"
echo ""
if [ -d $DIST ]; then
rm -rf $DIST
fi
echo "Making dir: "$DIST
mkdir $DIST
echo ""
echo "Compiling SALSA Compiler Code"
javac -Xlint:none -d $DIST `find salsac/ | grep "java$"`
echo ""
echo "Compiling Language Package"
echo "java source..."
javac -Xlint:none -d $DIST `find salsa/ | grep "java$"`
echo ""
echo "Compling WWC Package"
echo "java source..."
javac -Xlint:none -d $DIST `find wwc/ | grep "java$"`
echo ""
echo "Compiling GC Package"
echo "java source..."
javac -Xlint:none -d $DIST `find gc/ | grep "java$"`
echo ""
echo "Compiling tests"
echo "salsa source..."
java -Dsilent salsac.SalsaCompiler `find gctest/ | grep "salsa$"`
echo "java source..."
javac -Xlint:none -d $DIST `find gctest/ | grep "java$"`
echo "salsa source..."
java -Dsilent salsac.SalsaCompiler `find tests/ | grep "salsa$"`
echo "java source..."
javac -Xlint:none -d $DIST `find tests/ | grep "java$"`
echo ""
echo "Compiling Examples"
echo "salsa source..."
java -Dsilent salsac.SalsaCompiler `find examples/ | grep "salsa$"`
echo "java source..."
javac -Xlint:none -d $DIST `find examples/ | grep "java$"`
echo ""
echo "Generating jar file..."
cd $DIST
jar cf ../salsa$VERSION.jar `find wwc` `find salsa` `find salsac` `find gc`
cd ..
echo ""
echo "Finished!"