-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
79 lines (69 loc) · 2.24 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
<project default="go">
<property name="classpath" value="/usr/local/opt/antlr/antlr-4.13.2-complete.jar"/>
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="src.dir" value="src" />
<property name="srcgen.dir" value="${build.dir}/grammar" />
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="antlr">
<mkdir dir="${srcgen.dir}"/>
<exec executable="antlr">
<arg value="-o"/>
<arg value="${srcgen.dir}"/>
<arg value="-package"/>
<arg value="com.dogatech.napiwrapper.grammar"/>
<arg value="${src.dir}/napiwrapper.g4"/>
</exec>
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac includeantruntime="false" destdir="${classes.dir}">
<classpath>
<pathelement path="${classpath}"/>
</classpath>
<src path="${srcgen.dir}"/>
<src path="${src.dir}"/>
</javac>
</target>
<target name="jar">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/SoulSifternapiwrapperTool.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="com.dogatech.soulsifter.napiwrapper.SoulSifterWrapperTool"/>
<attribute name="Class-Path" value="${classpath}"/>
</manifest>
</jar>
</target>
<target name="run">
<java jar="${jar.dir}/SoulSifternapiwrapperTool.jar" fork="true"/>
</target>
<target name="all">
<antcall target="clean"/>
<antcall target="antlr"/>
<antcall target="compile"/>
<antcall target="jar"/>
<antcall target="run"/>
</target>
<target name="go">
<antcall target="compile"/>
<antcall target="jar"/>
<antcall target="run"/>
</target>
<target name="gui">
<antcall target="clean"/>
<antcall target="antlr"/>
<antcall target="compile"/>
<exec executable="java">
<arg value="-classpath"/>
<arg value="${classpath}:${classes.dir}"/>
<arg value="org.antlr.v4.runtime.misc.TestRig"/>
<arg value="com.dogatech.napiwrapper.grammar.napiwrapper"/>
<arg value="header"/>
<arg value="-gui"/>
<redirector input="${file}"/>
</exec>
</target>
</project>