-
Notifications
You must be signed in to change notification settings - Fork 1
/
s_build.old
executable file
·108 lines (83 loc) · 4.21 KB
/
s_build.old
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# #########################################################################
# Build Script for BNGParser
# #########################################################################
# /bin/rm -r -f bionetgen
# git clone https://github.com/RuleWorld/bionetgen.git
# /bin/cp -r bionetgen.safe bionetgen
# cd bionetgen/parsers/BNGParser/src/bngparser/grammars
cd src/bngparser/grammars
# /home/roc60/eclipse_bngparser/plugins/antlr4ide.core_0.3.5.jar \
#antlr4ide.ui_0.3.5.jar
#org.antlr.runtime_3.2.0.v201101311130.jar
#antlr4ide.core_0.3.5.jar
#org.apache.ant_1.9.2.v201404171502/lib/ant-antlr.jar
echo '-------------------------------------------------------------------'
echo ' Generate grammars'
echo '-------------------------------------------------------------------'
java -jar ../antlr-3.3-complete.jar BNGLexer.g
java -jar ../antlr-3.3-complete.jar BNGGrammar.g
cd ../..
cp /home/roc60/build_BNGParser/ANTLR/antlr-4.5-complete.jar .
# javac -Xlint:deprecation -Xlint:unchecked \
echo '-------------------------------------------------------------------'
echo ' Compile grammars'
echo '-------------------------------------------------------------------'
#javac -classpath bngparser/grammars:bngparser/methods:bngparser/models:bngparser/dataType:bngparser/exceptions:antlr-4.5-complete.jar:antlr-3.3-complete.jar:/home/roc60/build_BNGParser/Apache/commons-lang3-3.4/commons-lang3-3.4.jar:. \
# -sourcepath . $jfile
for jfile in $(ls bngparser/grammars/*.java)
do
echo $jfile
javac -classpath bngparser/grammars:bngparser/methods:bngparser/models:bngparser/dataType:bngparser/exceptions:antlr-3.3-complete.jar:../commons-lang3-3.1.jar:. -sourcepath . $jfile
done
echo '-------------------------------------------------------------------'
echo ' Compiling methods '
echo '-------------------------------------------------------------------'
for jfile in $(ls bngparser/methods/*.java)
do
echo $jfile
javac -classpath bngparser/grammars:bngparser/methods:bngparser/models:bngparser/dataType:bngparser/exceptions:antlr-3.3-complete.jar:../commons-lang3-3.1.jar:. -sourcepath . $jfile
done
echo '-------------------------------------------------------------------'
echo ' Compiling dataType '
echo '-------------------------------------------------------------------'
for jfile in $(ls bngparser/dataType/*.java)
do
echo $jfile
javac -classpath bngparser/grammars:bngparser/methods:bngparser/models:bngparser/dataType:bngparser/exceptions:antlr-3.3-complete.jar:../commons-lang3-3.1.jar:. -sourcepath . $jfile
done
echo '-------------------------------------------------------------------'
echo ' Compiling exceptions '
echo '-------------------------------------------------------------------'
for jfile in $(ls bngparser/exceptions/*.java)
do
echo $jfile
javac -classpath bngparser/grammars:bngparser/methods:bngparser/models:bngparser/dataType:bngparser/exceptions:antlr-3.3-complete.jar:../commons-lang3-3.1.jar:. -sourcepath . $jfile
done
echo '-------------------------------------------------------------------'
echo ' Compiling bngparser '
echo '-------------------------------------------------------------------'
for jfile in $(ls bngparser/*.java)
do
if [ $jfile != 'bngparser/MCellTranslatorTester.java' ];
then
echo $jfile
javac -classpath bngparser/grammars:bngparser/methods:bngparser/models:bngparser/dataType:bngparser/exceptions:antlr-3.3-complete.jar:../commons-lang3-3.1.jar:. -sourcepath . $jfile
fi
done
echo '-------------------------------------------------------------------'
echo ' Creating jar '
echo '-------------------------------------------------------------------'
cp ../xml.stg .
jar cf BNGParser.jar bngparser xml.stg
echo '-------------------------------------------------------------------'
echo ' Running a Test '
echo '-------------------------------------------------------------------'
cp ../commons-lang3-3.1.jar .
javac -cp antlr-3.3-complete.jar:BNGParser.jar:commons-lang3-3.1.jar:. \
bngparser/Tester.java
java -cp antlr-3.3-complete.jar:BNGParser.jar:commons-lang3-3.1.jar:. \
bngparser/Tester
echo '-------------------------------------------------------------------'
echo ' Done '
echo '-------------------------------------------------------------------'