-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·58 lines (51 loc) · 1.97 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
<project name="min" default="all">
<path id="build.classpath">
<fileset dir="build" includes="*.jar"/>
<fileset dir="vendor" includes="*.jar"/>
</path>
<target name="all" depends="grammar,jar,test" />
<target name="init">
<mkdir dir="build"/>
<mkdir dir="build/classes"/>
<uptodate property="grammar.notUpdated" targetfile="src/akin/lang/AkinParser.java">
<srcfiles dir="src/akin/lang" includes="*.g"/>
</uptodate>
</target>
<target name="grammar" depends="init" description="Generates source files from the ANTLR definitions"
unless="grammar.notUpdated">
<java classname="org.antlr.Tool" maxmemory="750M" fork="true" dir="src/akin/lang" classpathref="build.classpath" failonerror="true">
<arg line="-Xconversiontimeout 60000 AkinLexer.g AkinParser.g"/>
</java>
</target>
<target name="compile" depends="init" description="Compile Java sources.">
<javac destdir="build/classes" debug="true" target="1.5">
<classpath refid="build.classpath"/>
<src path="src"/>
<include name="**/*.java"/>
<!-- <compilerarg value="-Xlint"/> -->
</javac>
</target>
<target name="jar" depends="compile" description="Creates the jar file of the language.">
<jar destfile="build/akin.jar">
<fileset dir="build/classes">
<include name="**/*.class"/>
<include name="**/*.properties"/>
</fileset>
<zipfileset src="vendor/antlr-3.1.1.jar" includes="**/*"/>
<manifest>
<attribute name="Main-Class" value="akin.Main"/>
</manifest>
</jar>
</target>
<target name="test" description="Runs the tests.">
<exec executable="ruby" failonerror="true">
<arg value="test/runner.rb"/>
</exec>
</target>
<target name="clean" description="Remove generated files and directories.">
<delete dir="build"/>
<delete>
<fileset dir="src/akin/lang" includes="*.tokens,*Lexer.java,*Parser.java"/>
</delete>
</target>
</project>