-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·57 lines (48 loc) · 1.74 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
<project name="cogwed" default="compile" basedir=".">
<path id="lib.path">
<pathelement location="build"/>
<fileset dir=".">
<include name="lib/*.jar"/>
</fileset>
</path>
<macrodef name="antlr4">
<attribute name="grammar.name"/>
<attribute name="outputdirectory" default="."/>
<attribute name="package.name" />
<sequential>
<java jar="lib/antlr-4.7.1-complete.jar" fork="true">
<arg value="-package" />
<arg value="@{package.name}" />
<arg value="-o"/>
<arg path="@{outputdirectory}"/>
<arg path="@{grammar.name}"/>
<classpath>
<pathelement location="./lib/antlr-4.7.1-complete.jar"/>
</classpath>
</java>
</sequential>
</macrodef>
<target name="-init">
<tstamp/>
<mkdir dir="build"/>
</target>
<target name="CogwedModelGrammar">
<antlr4 grammar.name="src/grammars/CogwedModelGrammar.g" package.name="mccal.model.modelreader.antlr" outputdirectory="./src/mccal/model/modelreader/antlr"/>
</target>
<target name="CogwedFormulaGrammar">
<antlr4 grammar.name="./src/grammars/CogwedFormulaGrammar.g" package.name="mccal.formula.formulareader.antlr" outputdirectory="./src/mccal/formula/formulareader/antlr" />
</target>
<target name="compile" depends="-init,CogwedModelGrammar,CogwedFormulaGrammar">
<javac srcdir="src/" destdir="build/" includeantruntime="false"
classpathref="lib.path" />
</target>
<target name="clean"
description="remove all build artifacts and temporary files">
<delete dir="build" failonerror="false"/>
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no" />
<fileset dir="." includes="**/*.bak" defaultexcludes="no" />
<fileset dir="." includes="**/error.xml" />
</delete>
</target>
</project>