-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_ebnf.xml
48 lines (40 loc) · 1.54 KB
/
build_ebnf.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="lrpage" default="run" basedir=".">
<property name="source.dir" value="src/"/>
<property name="class.dir" value="bin/"/>
<property name="resource.dir" value="src/bepler/lrpage/code/generator/framework/"/>
<property name="jar.dir" value="dist/"/>
<property name="jar.file" value="${jar.dir}/${ant.project.name}.jar"/>
<property name="main-class" value="bepler.lrpage.ebnf.grammar.EBNFBuild"/>
<path id="resources.path">
<fileset dir="${resource.dir}">
<include name="*.java"/>
</fileset>
</path>
<target name="clean" description="Delete old jar and class files">
<delete dir="${jar.dir}"/>
<delete dir="${class.dir}"/>
</target>
<target name="compile" description="Compile class files" depends="clean">
<mkdir dir="${class.dir}"/>
<javac srcdir="${source.dir}" destdir="${class.dir}" includeantruntime="false">
<!-- <src path="${source.dir}"/> -->
<exclude name="bepler/lrpage/code/generator/parser/**"/>
<!-- <exclude name="bepler/lrpage/test/**"/> -->
</javac>
</target>
<target name="jar" description="Package into a runnable jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<copy todir="${class.dir}/bepler/lrpage/code/generator/framework" flatten="false">
<path refid="resources.path"/>
</copy>
<jar destfile="${jar.file}" basedir="${class.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="${jar.file}" fork="true"/>
</target>
</project>