-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
62 lines (54 loc) · 3.21 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="antlr-php-jar" name="Produce Php Target extentesion for the ANTLR Tool as a stand-alone Jar">
<target name="init">
<property file="build.properties" />
<property name='product.Name' value='Antlr Php Runtime'/>
<property name='product.name' value='antlrphpruntime'/>
<property name='product.shortname' value='antlr-php'/>
<property name='product.version.major' value='0'/>
<property name='product.version.minor' value='0'/>
<property name='product.version.level' value='4'/>
<property name='product.Version' value='${product.version.major}.${product.version.minor}.${product.version.level}'/>
<property name='product.version' value='${product.version.major}.${product.version.minor}.${product.version.level}'/>
<property name='product_version' value='${product.version.major}_${product.version.minor}_${product.version.level}'/>
<property name="year" value="2009-2010, 2012" />
<property name="contributors" value="Terence Parr, Sidharth Kuruvila, Yauhen Yakimovich, Geoff Speicher, Rolland Brunec, Benjamin Eberlei, Samu Voutilainen" />
<property name="copyright" value="Copyright © ${year} ${contributors}. All Rights Reserved. Distributed under New BSD License." />
<property name="dir.project" value="." />
<property name="dir.bin" value="${dir.project}/bin" />
<property name="dir.build" value="${dir.project}/build" />
<property name="dir.doc" value="${dir.project}/doc" />
<property name="dir.lib" value="${dir.project}/lib" />
<property name="dir.tool" value="${dir.project}/tool" />
<property name="dir.tool.src" value="${dir.tool}/src/main/java" />
<property name="dir.tool.resources" value="${dir.tool}/src/main/resources" />
<property name="jar.antlr-php" value="${dir.lib}/antlr-php.jar" />
<path id="classpath">
<fileset dir="${dir.lib}" includes="**/*.jar"/>
</path>
</target>
<target name="clean" depends="init">
<delete dir="${dir.build}"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="${dir.build}/classes"/>
<javac srcdir="${dir.tool.src}" destdir="${dir.build}/classes">
<classpath>
<pathelement path="${classpath}"/>
<pathelement path="${antlr.package}"/>
</classpath>
</javac>
</target>
<target name="antlr-php-jar" depends="compile">
<delete file="${jar.antlr-php}" />
<jar destfile="${jar.antlr-php}" basedir="${dir.build}/classes" filesetmanifest="mergewithoutmain">
<fileset dir="${dir.build}/classes"/>
<fileset dir="${dir.tool.resources}"/>
</jar>
<copy file="${antlr.package}" todir="${dir.lib}"/>
</target>
<target name="test" depends="antlr-php-jar">
<exec executable="${dir.project}/gengrammars.sh" />
<exec executable="${dir.project}/runtests.sh" />
</target>
</project>