-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
112 lines (100 loc) · 3.41 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2006, 2011 IBM Corporation. -->
<project default="compile">
<property name="version" value="401"/>
<target name="VERSION">
<echo file="VERSION">VERSION=${version}</echo>
</target>
<!-- Simple zip with binary release. -->
<target name="zip" depends="jar,javadoczip">
<zip destfile="crsx${version}.zip">
<zipfileset prefix="crsx" dir="." includes="VERSION"/>
<zipfileset prefix="crsx" dir="." includes="README"/>
<zipfileset prefix="crsx" dir="." includes="LICENSE.TXT"/>
<zipfileset prefix="crsx" dir="." includes="crsx.jar"/>
<zipfileset prefix="crsx" dir="." includes="crsx-javadoc.zip"/>
<zipfileset prefix="crsx/samples" dir="samples" includes="**/*"/>
</zip>
</target>
<!-- Simple jar with all binaries and non-java sources. -->
<target name="jar" depends="compile">
<jar destfile="crsx.jar" manifest="crsx.manifest">
<fileset dir="build" excludes="net/sf/crsx/compiler/c/build/* net/sf/crsx/compiler/c/Debug/* net/sf/crsx/compiler/c/crsx_scan.c net/sf/crsx/compiler/c/rules" />
<fileset dir="src" excludes="**/*.java net/sf/crsx/compiler/c/build/* net/sf/crsx/compiler/c/Debug/* net/sf/crsx/compiler/c/crsx_scan.c net/sf/crsx/compiler/c/rules"/>
<fileset dir="." includes="VERSION"/>
</jar>
</target>
<target name="compile" depends="src,setup,crs">
<javac srcdir="src" destdir="build" classpath="">
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="lib/antlr-runtime-3.1.3.jar"/>
</classpath>
</javac>
</target>
<target name="crs">
<copy todir="build/net">
<fileset dir="src/net">
<include name="**/*.crs"/>
<include name="**/*.pg"/>
<include name="**/*.c"/>
<include name="**/*.h"/>
<include name="**/*.l"/>
<include name="**/*.flex"/>
<include name="**/*.html"/>
<exclude name="**/*.java"/>
<exclude name="**/*.patch"/>
<exclude name="**/README"/>
</fileset>
</copy>
<copy file="src/net/sf/crsx/run/default"
tofile="build/net/sf/crsx/run/default"/>
</target>
<!-- Simple zip with all sources. -->
<target name="srczip" depends="src">
<zip destfile="crsx${version}-src.zip">
<zipfileset prefix="crsx/src" dir="src" includes="**"/>
</zip>
</target>
<!-- Source for PG and ClassicParser are generated from grammar. -->
<target name="src">
<javacc javacchome="${basedir}/lib" target="src/net/sf/crsx/pg/PGParser.jj"/>
<javacc javacchome="${basedir}/lib" target="src/net/sf/crsx/parser/ClassicParser.jj"/>
</target>
<!-- Simple zip with all javadoc. -->
<target name="javadoczip" depends="javadoc">
<zip destfile="crsx${version}-javadoc.zip" basedir="crsx-javadoc"/>
</target>
<target name="javadoc" depends="compile">
<javadoc
access="package"
author="true"
classpath="."
destdir="crsx-javadoc"
doctitle="CRSX - Combinatory Reduction Systems (with Extensions) for Java"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
overview="overview.html"
packagenames="*"
source="1.5"
sourcepath="src"
splitindex="false"
use="true"
version="true"/>
</target>
<!-- Clean up. -->
<target name="clean">
<delete dir="build"/>
<delete file="crsx.jar"/>
<delete dir="crsx-javadoc"/>
<delete file="crsx-javadoc.zip"/>
<delete file="crsx.zip"/>
</target>
<!-- Set up. -->
<target name="setup">
<mkdir dir="build"/>
</target>
</project>