This repository has been archived by the owner on Dec 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.xml
150 lines (131 loc) · 4.22 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<project name="rsense" default="build" basedir=".">
<property file="src/resources/org/cx4a/rsense/rsense.properties" />
<path id="build.class.path">
<fileset file="build_lib/*.jar" />
<fileset file="lib/*.jar" />
<pathelement path="${classpath}" />
</path>
<path id="exec.class.path">
<fileset file="dist/lib/*.jar" />
<pathelement path="${classpath}" />
</path>
<property name="dist.dir" value="rsense-${rsense.version}" />
<target name="init">
<mkdir dir="build" />
</target>
<target name="antlr" depends="init">
<java fork="true" classpathref="build.class.path" classname="org.antlr.Tool">
<arg value="-make" />
<arg file="src/org/cx4a/rsense/parser/TypeAnnotation.g" />
</java>
</target>
<target name="build" depends="antlr">
<javac fork="true" source="1.5" target="1.5" debug="true" deprecation="true"
srcdir="src" destdir="build"
classpathref="build.class.path">
<compilerarg value="-Xlint:all" />
</javac>
<jar jarfile="lib/rsense.jar" basedir="build">
<fileset dir="src/resources" />
</jar>
</target>
<target name="dist" depends="build">
<copy todir="${dist.dir}" preservelastmodified="true" includeEmptyDirs="true">
<fileset dir=".">
<include name="README.txt" />
<include name="bin/**/*" />
<include name="doc/**/*" />
<include name="etc/**/*" />
<include name="lib/**/*" />
<include name="stubs/**/*" />
<include name="src/**/*" />
</fileset>
</copy>
</target>
<target name="zip" depends="dist">
<zip destfile="${dist.dir}.zip">
<zipfileset dir="${dist.dir}" prefix="${dist.dir}" />
</zip>
</target>
<target name="tar.bz2" depends="dist">
<exec executable="tar">
<arg value="cjf" />
<arg value="${dist.dir}.tar.bz2" />
<arg value="${dist.dir}" />
</exec>
</target>
<target name="test">
<antcall target="dotest">
<param name="name" value="all" />
</antcall>
</target>
<target name="test.builtin">
<antcall target="dotest">
<param name="name" value="builtin" />
</antcall>
</target>
<target name="test.stdlib">
<antcall target="dotest">
<param name="name" value="stdlib" />
</antcall>
</target>
<target name="test.misc">
<antcall target="dotest">
<param name="name" value="misc" />
</antcall>
</target>
<target name="test.regression">
<antcall target="dotest">
<param name="name" value="regression" />
</antcall>
</target>
<target name="test.where">
<antcall target="dotest">
<param name="name" value="where" />
</antcall>
</target>
<target name="test.find-definition">
<antcall target="dotest">
<param name="name" value="find-definition" />
</antcall>
</target>
<target name="dotest" depends="build">
<java fork="true" classpathref="build.class.path" classname="org.cx4a.rsense.Main">
<arg value="script" /><arg file="test/script/${name}.rsense" />
<arg value="--log-level=error" />
<arg value="--test-color" />
</java>
</target>
<target name="doc">
<exec executable="bluefeather">
<arg value="-f" /><arg value="d" />
<arg file="doc/*.txt" />
</exec>
</target>
<target name="jruby-diff">
<exec executable="diff" output="etc/jruby-1.4.0.patch">
<arg value="-ruN" />
<arg value="-x" /><arg value="ri" />
<arg value="-x" /><arg value="cache" />
<arg value="-x" /><arg value="DefaultRubyParser.java" />
<arg value="-x" /><arg value="YyTables.java" />
<arg value="-x" /><arg value="PATH" />
<arg value="../jruby-1.4.0-orig" />
<arg value="../jruby-1.4.0" />
</exec>
</target>
<target name="clean">
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="build" />
<fileset dir="${dist.dir}" />
<fileset file="rsense-*.tar.bz2" />
<fileset file="rsense-*.zip" />
<fileset file="hs_err_pid*.log" />
<fileset file="lib/rsense.jar" />
<fileset file="java.hprof.txt" />
<fileset file="doc/*.html" />
<fileset file="TypeAnnotation.tokens" />
<fileset file="src/org/cx4a/rsense/parser/TypeAnnotation*.java" />
</delete>
</target>
</project>