-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
198 lines (182 loc) · 6.86 KB
/
build.xml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0"?>
<project name="ASP_PARSER" default="compile" basedir=".">
<!-- PROJECT OPTIONS -->
<property file="build.properties" />
<path id="classpath">
<fileset id="classfiles" dir="${lib_dir}">
<include name="**/ext/*.jar"/>
<include name="**/*.jar"/>
</fileset>
<pathelement location="${build_dir}/classes"/>
</path>
<target name="prepare">
<tstamp />
<mkdir dir="${src_dir}"/>
<mkdir dir="${build_dir}/src/gr/omadak/leviathan/asp" />
<mkdir dir="${build_dir}/classes" />
<mkdir dir="${build_dir}/${grama_dir}" />
<mkdir dir="${lib_dir}"/>
<mkdir dir="${lib_dir}/${lib_ext_dir}"/>
<mkdir dir="etc"/>
<mkdir dir="etc/META-INF"/>
<mkdir dir="${test_dir}" />
<mkdir dir="${test_reports}" />
<mkdir dir="logs" />
</target>
<!-- ANTLR -->
<target name="antlr" depends="prepare">
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/html.g" />
<arg value="-i" />
<arg value="${grama_dir}/html.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/html.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/html.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/vbs.g" />
<arg value="-i" />
<arg value="${grama_dir}/vbs.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/vbs.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/vbs.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/tree_vbs.g" />
<arg value="-i" />
<arg value="${grama_dir}/tree_vbs_php.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/tree_vbs.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/tree_vbs.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/producer_vbs.g" />
<arg value="-i" />
<arg value="${grama_dir}/producer_vbs_php.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/producer_vbs.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/producer_vbs.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/js.g" />
<arg value="-i" />
<arg value="${grama_dir}/js.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/js.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/js.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/tree_js.g" />
<arg value="-i" />
<arg value="${grama_dir}/tree_js_php.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/tree_js.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/tree_js.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
<java classname="annotation.Insert" classpathref="classpath"
failonerror="yes" fork="yes">
<arg value="-s"/>
<arg value="${grama_dir}/producer_js.g" />
<arg value="-i" />
<arg value="${grama_dir}/producer_js_php.act" />
<arg value="-d" />
<arg value="${build_dir}/${grama_dir}/producer_js.g" />
</java>
<antlr target="${build_dir}/${grama_dir}/producer_js.g"
outputdirectory="${build_dir}/src/gr/omadak/leviathan/asp"
debug="${antlr.debug}" html="${antlr.html}"
diagnostic="${antlr.diagnostic}"
/>
</target>
<!-- COMPILE -->
<target name="compile" depends="antlr,scompile" />
<target name="scompile" depends="prepare" >
<copy todir="${build_dir}/classes/gr/omadak/leviathan/asp" file="etc/log4j.properties" />
<mkdir dir="${build_dir}/classes/gr/omadak/leviathan/asp/tokens" />
<copy todir="${build_dir}/classes/gr/omadak/leviathan/asp/tokens">
<fileset dir="etc/tokens" includes="*.txt" />
</copy>
<copy todir="${build_dir}/classes/gr/omadak/leviathan/asp/tokens">
<fileset dir="${build_dir}/src/gr/omadak/leviathan/asp" includes="*.txt" />
</copy>
<copy todir="${build_dir}/classes/gr/omadak/leviathan/asp/objects">
<fileset dir="objects" includes="*.xml" />
</copy>
<javac debug="${compile.debug}" deprecation="${compile.deprecation}"
destdir="${build_dir}/classes" optimize="${compile.optimize}">
<src location="${src_dir}" />
<src location="${build_dir}/src" />
<classpath refid="classpath"/>
</javac>
</target>
<!-- CLEAN -->
<target name="clean">
<delete dir="${build_dir}" quiet="true"/>
<delete dir="{$docs_dir}/${javadoc_dir}" quiet="true"/>
</target>
<!-- COMPILE TESTS -->
<target name="compile_tests" depends="scompile"
description="Compiles the tests">
<copy file="etc/files.txt"
todir="${build_dir}/classes/gr/omadak/leviathan/asp"/>
<javac srcdir="${test_dir}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
destdir="${build_dir}/classes">
<classpath refid="classpath"/>
</javac>
</target>
<!-- RUN TESTS-->
<target name="test" depends="compile_tests"
description="Runs the tests in batch mode">
<junit fork="true">
<classpath refid="classpath" />
<formatter type="${test.formater}" usefile="true"/>
<test name="${test.class}" todir="${test_reports}"
outfile="output" />
</junit>
</target>
<target name="jar" depends="compile">
<jar basedir="build/classes" destfile="build/aspa.jar">
<exclude name="ASPSuite*"/>
<exclude name="ASPTest*" />
</jar>
</target>
</project>