/[cvs]/jsr166/build.xml
ViewVC logotype

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.53 - (hide annotations)
Tue Aug 26 19:59:14 2003 UTC (16 years, 2 months ago) by dl
Branch: MAIN
Changes since 1.52: +10 -2 lines
File MIME type: text/xml
Clarified a comment.

1 tim 1.18 <project name="jsr166" default="usage">
2 tim 1.1
3     <description>
4 tim 1.29 ------------------------------------------------------------------------------
5     Build file for JSR-166
6 tim 1.18
7 tim 1.29 Usage: ant [target]
8    
9     User-specific settings are read from user.properties.
10 tim 1.32 See user.properties.sample for an explanation of some useful settings.
11 tim 1.29 ------------------------------------------------------------------------------
12 tim 1.18 </description>
13 tim 1.11
14 tim 1.29 <target name="usage" description="Advises user to run with -projecthelp">
15     <echo>Run "ant -projecthelp" for full usage information.</echo>
16     </target>
17 tim 1.3
18 tim 1.11
19 tim 1.27 <!-- User-specific settings -->
20 tim 1.23 <property file="user.properties"/>
21 tim 1.27
22 tim 1.1
23     <!-- Compilation options -->
24 tim 1.11 <property name="build.sourcelevel" value="1.5"/>
25 tim 1.25 <property name="build.docsourcelevel" value="1.4"/>
26 tim 1.1 <property name="build.debug" value="true"/>
27     <property name="build.debuglevel" value="source,lines,vars"/>
28 tim 1.13 <property name="build.deprecation" value="false"/>
29 tim 1.1
30     <!-- Build locations -->
31     <property name="build.dir" location="build"/>
32     <property name="build.classes.dir" location="${build.dir}/classes"/>
33 tim 1.27 <property name="build.emulation.dir" location="${build.dir}/emulation"/>
34 tim 1.1 <property name="build.testcases.dir" location="${build.dir}/testcases"/>
35     <property name="build.lib.dir" location="${build.dir}/lib"/>
36     <property name="build.ant.dir" location="${build.dir}/ant"/>
37 tim 1.9 <property name="build.javadocs.dir" location="${build.dir}/javadocs"/>
38 tim 1.52 <property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/>
39 tim 1.16 <property name="build.stripped.dir" location="${build.dir}/stripped"/>
40 tim 1.1 <property name="build.reports.dir" location="${build.dir}/reports"/>
41 tim 1.16 <property name="build.doccheck.dir" location="${build.dir}/doccheck"/>
42 tim 1.1 <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
43 tim 1.47 <property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/>
44 tim 1.1
45     <!-- Source locations -->
46 tim 1.22 <property name="src.dir" location="${basedir}/src/main"/>
47 tim 1.27 <property name="emulation.src.dir" location="${basedir}/src/emulation"/>
48 tim 1.22 <property name="test.src.dir" location="${basedir}/src/test"/>
49 tim 1.1 <property name="ant.src.dir" location="${basedir}/etc/ant"/>
50     <property name="stylesheet.dir" location="${basedir}/etc/xsl"/>
51     <property name="lib.dir" location="${basedir}/lib"/>
52 tim 1.9 <property name="dist.dir" location="${basedir}/dist"/>
53    
54     <!-- Distribution locations -->
55     <property name="dist.javadocs.dir" location="${dist.dir}/docs"/>
56 tim 1.1
57     <!-- Jar locations -->
58     <property name="product.jar" location="${build.lib.dir}/jsr166.jar"/>
59     <property name="junit.jar" location="${lib.dir}/junit.jar"/>
60     <property name="rt.jar" location="${java.home}/lib/rt.jar"/>
61 tim 1.49 <property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/>
62 tim 1.27
63 tim 1.28
64 tim 1.40 <!-- Files excluded from dist-docs and emulation jar -->
65     <patternset id="unsafe.exclusion">
66 tim 1.28 <exclude name="java/util/Random.*"/>
67     <exclude name="sun/misc/Unsafe.*"/>
68     </patternset>
69    
70 tim 1.40 <!-- Files excludes from emulation jar -->
71     <patternset id="atomic.exclusion">
72 tim 1.41 <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>
73 tim 1.40 <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>
74     <exclude name="java/util/concurrent/atomic/AtomicLong*"/>
75     <exclude name="java/util/concurrent/atomic/AtomicReference*"/>
76 tim 1.50 <exclude name="java/util/concurrent/locks/LockSupport*"/>
77     <exclude name="java/util/concurrent/locks/ReentrantLock*"/>
78 tim 1.40 </patternset>
79    
80 tim 1.28
81    
82 tim 1.11 <!-- Main targets -->
83    
84 tim 1.28 <target name="compile"
85 tim 1.33 depends="init, configure-compiler, prepare-src"
86 tim 1.27 description="Compiles main sources to build folder">
87    
88 tim 1.33 <property name="prepare.src.dir" value="${src.dir}"/>
89    
90 tim 1.1 <mkdir dir="${build.classes.dir}"/>
91 tim 1.27
92 tim 1.37 <!--
93     <echo>javac ${gjc.args}</echo>
94     <echo>bootclasspath=${compile.bootclasspath}</echo>
95     -->
96    
97 tim 1.33 <javac srcdir="${prepare.src.dir}"
98 tim 1.1 destdir="${build.classes.dir}"
99     debug="${build.debug}"
100     debuglevel="${build.debuglevel}"
101     deprecation="${build.deprecation}"
102     source="${build.sourcelevel}"
103     fork="true">
104    
105 dl 1.53 <!--
106 tim 1.37 <compilerarg line="${gjc.args}"/>
107     <bootclasspath refid="compile.bootclasspath"/>
108 dl 1.53 -->
109 tim 1.1
110     </javac>
111 tim 1.27
112 tim 1.1 </target>
113    
114    
115 tim 1.28 <target name="jar"
116 tim 1.32 depends="configure-emulation, init-jar, native-jar, emulation-jar"
117 tim 1.28 description="Builds library jar from compiled sources"/>
118 tim 1.1
119    
120 tim 1.28 <target name="test"
121 tim 1.32 depends="init, configure-tests, report-tests"
122 tim 1.29 description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
123 tim 1.1
124    
125 tim 1.28 <target name="checkstyle"
126     depends="filter-src"
127 tim 1.18 description="Reports on style errors in Java source (verbose, mostly chaff)">
128 tim 1.27
129 tim 1.15 <taskdef resource="checkstyletask.properties"
130     classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
131    
132     <checkstyle>
133 tim 1.16 <formatter type="plain"/> <!-- also available: type="xml" -->
134 tim 1.15 <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
135     </checkstyle>
136 tim 1.27
137 tim 1.15 </target>
138    
139 tim 1.16
140 tim 1.28 <target name="doccheck"
141 tim 1.47 depends="filter-doccheck"
142     description="Reports on javadoc style errors">
143 tim 1.27
144 tim 1.16 <delete dir="${build.doccheck.dir}"/>
145     <mkdir dir="${build.doccheck.dir}"/>
146 tim 1.27
147 tim 1.16 <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
148     docletpath="${lib.dir}/doccheck.jar"
149     destdir="${build.doccheck.dir}">
150 tim 1.47 <packageset dir="${build.filter.doccheck.dir}"/>
151 tim 1.16 </javadoc>
152 tim 1.27
153 tim 1.48 <echo>DocCheck output is in ${build.doccheck.dir}</echo>
154    
155 tim 1.16 </target>
156    
157    
158 tim 1.28 <target name="docs"
159     depends="filter-src"
160 tim 1.9 description="Builds javadocs with custom tags to build folder">
161 tim 1.27
162 tim 1.9 <delete dir="${build.javadocs.dir}"/>
163     <mkdir dir="${build.javadocs.dir}"/>
164 tim 1.27
165 tim 1.9 <javadoc destdir="${build.javadocs.dir}"
166 tim 1.8 link="http://java.sun.com/j2se/1.4.1/docs/api"
167     overview="${src.dir}/intro.html"
168 dholmes 1.24 source="${build.docsourcelevel}">
169 tim 1.8
170 tim 1.9 <tag name="revised" description="Last revised:"/>
171 tim 1.29 <tag name="spec" description="Specified by:"/>
172     <tag name="editor" description="Last edited by:"/>
173     <tag name="fixme" description="FIX ME:"/>
174    
175 tim 1.22 <packageset dir="${build.filter.src.dir}"/>
176 tim 1.8
177     </javadoc>
178 tim 1.49
179     </target>
180    
181    
182     <target name="sinjdocs"
183     depends="configure-tests"
184     description="Builds javadocs with custom tags to build folder">
185    
186 tim 1.52 <delete dir="${build.sinjdocs.dir}"/>
187     <mkdir dir="${build.sinjdocs.dir}"/>
188 tim 1.49
189     <java classname="net.cscott.sinjdoc.Main" fork="true">
190    
191     <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
192    
193     <classpath>
194     <pathelement location="${sinjdoc.jar}"/>
195 tim 1.51 <pathelement location="${lib.dir}/jutil.jar"/>
196     <pathelement location="${lib.dir}/cup.jar"/>
197 tim 1.49 <path refid="test.classpath"/>
198     </classpath>
199    
200    
201 tim 1.52 <arg value="-d"/> <arg value="${build.sinjdocs.dir}"/>
202 tim 1.49 <arg value="-sourcepath"/> <arg value="${src.dir}"/>
203     <arg value="-overview"/> <arg value="${src.dir}/intro.html"/>
204 tim 1.51 <arg value="-source"/> <arg value="${build.sourcelevel}"/>
205     <!-- <arg value="-verbose"/> -->
206     <!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
207     <arg value="java.lang"/>
208 tim 1.49 <arg value="java.util"/>
209 tim 1.51 <arg value="java.util.concurrent"/>
210     <arg value="java.util.concurrent.atomic"/>
211     <arg value="java.util.concurrent.locks"/>
212 tim 1.49
213     <!--
214     <arg value="-help"/>
215     -->
216    
217     </java>
218 tim 1.27
219 tim 1.8 </target>
220    
221    
222 tim 1.28 <target name="strip"
223 tim 1.32 depends="init, configure-compiler"
224 tim 1.31 description="Strip generics from java source (not working yet)">
225 tim 1.27
226 tim 1.16 <mkdir dir="${build.stripped.dir}"/>
227 tim 1.27
228 tim 1.31 <!--
229     # javac -s doesn't reliably generate compilable code. It generates
230     # bridge methods (marked as "synthetic") that can have identical
231     # signatures to existing methods except for the return value.
232     -->
233 tim 1.16 <javac srcdir="${src.dir}"
234     destdir="${build.stripped.dir}"
235     debug="${build.debug}"
236     debuglevel="${build.debuglevel}"
237     deprecation="${build.deprecation}"
238     source="${build.sourcelevel}"
239     fork="true">
240    
241 dl 1.53 <!--
242 tim 1.37 <compilerarg line="${gjc.args} -s"/>
243     <bootclasspath refid="compile.bootclasspath"/>
244 dl 1.53 -->
245 tim 1.16
246     </javac>
247 tim 1.27
248 tim 1.16 </target>
249    
250    
251 tim 1.28 <target name="dist"
252     depends="init, dist-clean, dist-jar, dist-docs"
253 tim 1.16 description="Puts all distributable products in single hierarchy"/>
254 tim 1.1
255 tim 1.42 <target name="release"
256     depends="dist"
257     description="Puts entire CVS tree, plus distribution productions, in a jar">
258    
259 tim 1.46 <!--
260 dl 1.45 #keep build dir? - dl
261 tim 1.42 <delete dir="${build.dir}"/>
262 dl 1.45 -->
263 tim 1.42 <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
264    
265     <jar basedir="${basedir}" destfile="${release.jar}">
266     <exclude name="${release.jar}"/>
267     <exclude name="user.properties"/>
268     <exclude name="etc/notes/**"/>
269 tim 1.43 <exclude name="lib/gjc/2.1/**"/>
270 tim 1.44 <exclude name="**/SyntaxTest.java"/>
271 tim 1.42 </jar>
272    
273     </target>
274 tim 1.1
275 tim 1.11 <target name="clean"
276     description="Removes all build products">
277 tim 1.27
278 tim 1.11 <delete dir="${build.dir}"/>
279     <delete dir="${build.classes.dir}"/>
280     <delete dir="${build.lib.dir}"/>
281 tim 1.27
282 tim 1.1 </target>
283    
284    
285 tim 1.11 <target name="dist-clean"
286     description="Removes all build and distribution products">
287 tim 1.27
288 tim 1.11 <delete dir="${dist.dir}"/>
289 tim 1.27
290 tim 1.9 </target>
291 tim 1.10
292    
293 tim 1.28 <target name="dist-docs"
294     depends="filter-src"
295     description="Builds javadocs without custom tags to dist folder">
296    
297     <delete dir="${dist.javadocs.dir}"/>
298     <mkdir dir="${dist.javadocs.dir}"/>
299    
300     <javadoc destdir="${dist.javadocs.dir}"
301     link="http://java.sun.com/j2se/1.4.1/docs/api"
302     overview="${src.dir}/intro.html"
303     source="${build.docsourcelevel}">
304    
305     <packageset dir="${build.filter.src.dir}"/>
306 tim 1.14
307 tim 1.28 </javadoc>
308 tim 1.14
309     </target>
310    
311    
312 tim 1.28
313 tim 1.11 <!-- Internal targets -->
314 tim 1.9
315 tim 1.16
316 tim 1.32 <target name="init">
317 tim 1.27
318 tim 1.11 <!-- Version is kept in a separate file -->
319     <loadfile property="version" srcFile="version.properties"/>
320     <echo>Building JSR-166 version ${version}</echo>
321 tim 1.27
322     </target>
323    
324    
325 tim 1.28 <target name="init-jar">
326 tim 1.27
327     <mkdir dir="${build.lib.dir}"/>
328    
329 tim 1.28 </target>
330    
331    
332     <target name="native-jar"
333 tim 1.30 depends="compile"
334     unless="build.emulation.true">
335 tim 1.28
336 tim 1.27 <jar destfile="${product.jar}">
337     <fileset dir="${build.classes.dir}"/>
338     </jar>
339    
340     </target>
341    
342    
343 tim 1.28 <target name="compile-emulation"
344 tim 1.32 depends="init, configure-compiler"
345 tim 1.30 if="build.emulation.true">
346 tim 1.27
347     <mkdir dir="${build.emulation.dir}"/>
348    
349     <javac srcdir="${emulation.src.dir}"
350     destdir="${build.emulation.dir}"
351     debug="${build.debug}"
352     debuglevel="${build.debuglevel}"
353     deprecation="${build.deprecation}"
354     source="${build.sourcelevel}"
355     fork="true">
356    
357 tim 1.37 <compilerarg line="${gjc.args}"/>
358     <bootclasspath refid="compile.bootclasspath"/>
359 tim 1.27
360     </javac>
361    
362     </target>
363    
364    
365 tim 1.28 <target name="emulation-jar"
366 tim 1.30 depends="compile-emulation"
367     if="build.emulation.true">
368 tim 1.27
369 tim 1.29
370     <jar destfile="${product.jar}" duplicate="add">
371     <fileset dir="${build.classes.dir}">
372 tim 1.40 <patternset refid="atomic.exclusion"/>
373     <patternset refid="unsafe.exclusion"/>
374 tim 1.29 </fileset>
375 tim 1.27 <fileset dir="${build.emulation.dir}"/>
376     </jar>
377    
378 tim 1.9 </target>
379    
380    
381 tim 1.28 <target name="dist-jar"
382     depends="clean, jar">
383 tim 1.27
384 tim 1.11 <copy file="${product.jar}" todir="${dist.dir}"/>
385 tim 1.27
386 tim 1.11 </target>
387    
388    
389 tim 1.28 <target name="compile-ant-filter"
390     depends="init">
391 tim 1.27
392 tim 1.1 <mkdir dir="${build.ant.dir}"/>
393 tim 1.27
394 tim 1.1 <javac srcdir="${ant.src.dir}"
395     destdir="${build.ant.dir}"
396     source="1.4"
397     />
398 tim 1.27
399 tim 1.1 </target>
400    
401    
402 tim 1.28 <target name="filter-src"
403     depends="compile-ant-filter">
404 tim 1.27
405 tim 1.1 <mkdir dir="${build.filter.src.dir}"/>
406 tim 1.27
407 tim 1.1 <copy todir="${build.filter.src.dir}">
408     <fileset dir="${src.dir}">
409 tim 1.31 <include name="**/*.html"/>
410     </fileset>
411     </copy>
412    
413     <copy todir="${build.filter.src.dir}">
414     <fileset dir="${src.dir}">
415     <exclude name="**/*.html"/>
416 tim 1.40 <patternset refid="unsafe.exclusion"/>
417 tim 1.1 </fileset>
418     <filterchain>
419 tim 1.36
420     <!--
421     # This filter gets rid of angle-bracketed type parameters
422     # so that javadoc can run on the result. The following
423     # heuristic seems to work:
424     #
425     # For all lines not starting with space(s)-asterisk-space(s),
426     # replace <something> with a space, where there may be more
427     # than one right angle bracket at the end, and "something"
428     # must not contain parens or pipes. (This may need some
429     # tweaking.)
430     -->
431    
432 tim 1.1 <filterreader classname="jsr166.ant.filters.ReplaceFilter"
433     classpath="${build.ant.dir}">
434     <param name="notmatching" value="^\s+\*\s.*$"/>
435 tim 1.36 <param name="pattern" value="&lt;[^|>()]+?>+"/>
436 tim 1.1 <param name="replacement" value=" "/>
437     </filterreader>
438 tim 1.36
439    
440     <!--
441     # This filter uncomments lines beginning with "//@" so that
442     # javadoc can see imports that are needed to resolve links
443     # but that shouldn't be in the compiled code.
444     -->
445    
446 tim 1.1 <filterreader classname="jsr166.ant.filters.ReplaceFilter"
447     classpath="${build.ant.dir}">
448 tim 1.36 <param name="matching" value="^//@.*$"/>
449     <param name="pattern" value="^//@"/>
450 tim 1.1 <param name="replacement" value=""/>
451     </filterreader>
452 tim 1.47 </filterchain>
453     </copy>
454    
455     </target>
456    
457    
458    
459    
460     <target name="filter-doccheck"
461     depends="filter-src">
462 tim 1.36
463 tim 1.47 <mkdir dir="${build.filter.doccheck.dir}"/>
464 tim 1.36
465 tim 1.47 <copy todir="${build.filter.doccheck.dir}">
466     <fileset dir="${build.filter.src.dir}">
467     <include name="**/*.html"/>
468     </fileset>
469     </copy>
470    
471     <property name="generic.declarations"
472     value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}"
473     />
474    
475     <copy todir="${build.filter.doccheck.dir}">
476     <fileset dir="${build.filter.src.dir}">
477     <exclude name="**/*.html"/>
478     </fileset>
479     <filterchain>
480 tim 1.36 <!--
481 tim 1.47 # These two filters try to make the source look like
482 tim 1.36 # something that doccheck can process. The first removes
483     # -source 1.4 assertions and the second adds in a bunch
484     # of single letter public nested marker interfaces so that
485     # the generic type parameters are recognized.
486     -->
487    
488     <filterreader classname="jsr166.ant.filters.ReplaceFilter"
489     classpath="${build.ant.dir}">
490     <param name="matching" value="^\s*assert[\s ].*$"/>
491     <param name="pattern" value="assert"/>
492     <param name="replacement" value="//assert"/>
493     </filterreader>
494    
495     <filterreader classname="jsr166.ant.filters.ReplaceFilter"
496     classpath="${build.ant.dir}">
497 tim 1.47 <param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
498 tim 1.36 <param name="pattern" value="$"/>
499     <param name="replacement" value=" ${generic.declarations}"/>
500     </filterreader>
501    
502 tim 1.1 </filterchain>
503     </copy>
504 tim 1.27
505 tim 1.1 </target>
506    
507    
508 tim 1.28 <target name="compile-tests"
509     depends="jar">
510 tim 1.27
511 tim 1.1 <mkdir dir="${build.testcases.dir}"/>
512 tim 1.27
513 tim 1.37 <!--
514     <echo>javac ${gjc.args}</echo>
515     <echo>bootclasspath=${test.compile.bootclasspath}</echo>
516     <echo>classpath="${test.classpath}"</echo>
517     -->
518    
519 tim 1.1 <javac srcdir="${test.src.dir}"
520     destdir="${build.testcases.dir}"
521     debug="${build.debug}"
522     debuglevel="${build.debuglevel}"
523     deprecation="${build.deprecation}"
524     source="${build.sourcelevel}"
525     fork="true">
526    
527 dl 1.53 <!--
528 tim 1.37 <compilerarg line="${gjc.args}"/>
529 dl 1.53 -->
530 tim 1.37 <bootclasspath refid="test.compile.bootclasspath"/>
531     <classpath refid="test.classpath"/>
532 tim 1.1
533     </javac>
534 tim 1.27
535 tim 1.1 </target>
536 tim 1.11
537 tim 1.1
538 tim 1.28 <target name="run-tests"
539     depends="compile-tests">
540 tim 1.27
541     <!-- May be overridden by user.properties -->
542     <property name="testcase" value="*"/>
543    
544 tim 1.1 <mkdir dir="${build.reports.dir}"/>
545 tim 1.27
546 tim 1.1 <junit printsummary="true"
547     showoutput="true"
548     errorProperty="junit.failed"
549     failureProperty="junit.failed"
550 tim 1.12 dir="${build.reports.dir}"
551     fork="true">
552    
553 tim 1.37 <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
554 tim 1.1
555     <formatter type="xml"/>
556    
557     <batchtest todir="${build.reports.dir}">
558     <fileset dir="${test.src.dir}">
559 tim 1.23 <include name="**/${testcase}Test.java"/>
560 tim 1.1 </fileset>
561     </batchtest>
562    
563     </junit>
564 tim 1.27
565 tim 1.1 </target>
566    
567    
568 tim 1.28 <target name="report-tests"
569     depends="run-tests">
570    
571 tim 1.1 <!-- Sets junit.report.format to frames if Xalan is present,
572     otherwise sets it to noframes. -->
573     <available property="junit.report.format"
574     value="frames"
575     classname="org.apache.xalan.lib.Redirect"
576     />
577     <property name="junit.report.format" value="noframes"/>
578    
579     <junitreport todir="${build.reports.dir}">
580     <fileset dir="${build.reports.dir}">
581     <include name="TEST-*.xml"/>
582     </fileset>
583     <report styledir="${stylesheet.dir}"
584     format="${junit.report.format}"
585     todir="${build.reports.dir}"
586     />
587     </junitreport>
588    
589     <fail message="Test Cases Failed" if="junit.failed"/>
590 tim 1.28
591 tim 1.18 </target>
592    
593    
594 tim 1.32 <target name="configure-compiler">
595 dl 1.53 <!--
596 tim 1.32 <property name="gjc.version"
597 tim 1.46 value="2.2"/>
598 tim 1.32
599 tim 1.37 <condition property="novariance.arg" value="-novariance">
600 tim 1.32 <and>
601     <equals arg1="${gjc.version}" arg2="2.0"/>
602     <or>
603     <not><isset property="gjc.novariance"/></not>
604     <istrue value="${gjc.novariance}"/>
605     </or>
606     </and>
607     </condition>
608    
609 tim 1.37 <property name="novariance.arg"
610 tim 1.32 value=""/>
611    
612     <property name="gjc.dir"
613     value="${lib.dir}/gjc"/>
614    
615     <property name="javac.jar"
616     location="${gjc.dir}/${gjc.version}/javac.jar"/>
617    
618     <property name="collect.jar"
619 tim 1.37 location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
620 tim 1.32
621 dl 1.53 -->
622 tim 1.37 <condition property="warnunchecked.arg" value="-warnunchecked">
623 tim 1.32 <istrue value="${gjc.warnunchecked}"/>
624     </condition>
625    
626 tim 1.37 <property name="warnunchecked.arg" value=""/>
627 tim 1.32
628 tim 1.34 <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
629 tim 1.35 <istrue value="${build.nothreads}"/>
630 tim 1.34 </condition>
631    
632 tim 1.32
633     <!--
634     ! Bootclasspath munging for source compilation.
635     -->
636    
637 tim 1.37 <path id="pre.bootclasspath">
638 tim 1.32 <pathelement location="${javac.jar}"/>
639     </path>
640    
641 tim 1.37 <path id="compile.bootclasspath">
642 tim 1.39 <pathelement location="${build.classes.dir}"/>
643 tim 1.32 <pathelement location="${collect.jar}"/>
644     <pathelement location="${rt.jar}"/>
645     </path>
646    
647 tim 1.37 <!-- Flatten paths into platform-appropriate strings -->
648     <property name="pre.bootclasspath" refid="pre.bootclasspath"/>
649     <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
650    
651 tim 1.32
652     <!-- Common options in javac invocations -->
653 dl 1.53 <!--
654 tim 1.37 <property name="gjc.args"
655     value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
656     />
657 dl 1.53 -->
658 tim 1.33
659     </target>
660    
661    
662     <target name="prepare-src"
663 tim 1.34 depends="configure-compiler"
664 tim 1.33 if="prepare.src.dir">
665    
666     <mkdir dir="${prepare.src.dir}"/>
667     <copy todir="${prepare.src.dir}">
668     <fileset dir="${src.dir}">
669     <exclude name="java/lang/**"/>
670     </fileset>
671     </copy>
672 tim 1.32
673     </target>
674    
675    
676     <target name="configure-emulation">
677    
678     <condition property="build.emulation.true">
679     <or>
680     <and>
681     <os family="windows"/>
682     <not>
683     <isset property="build.emulation"/>
684     </not>
685     </and>
686     <istrue value="${build.emulation}"/>
687     </or>
688     </condition>
689    
690     </target>
691    
692    
693 tim 1.37 <target name="configure-tests"
694     depends="configure-compiler">
695 tim 1.28
696     <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
697 tim 1.18 <available property="junit.available"
698 tim 1.28 classname="junit.framework.Protectable"/>
699    
700     <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
701     unless="junit.available"/>
702    
703 tim 1.30
704 tim 1.32 <!--
705     ! Bootclasspath munging for testing, so JUnit can test our local
706     ! modifications to java.*.
707     -->
708    
709     <path id="test.classpath">
710     <pathelement location="${product.jar}"/>
711     <pathelement location="${build.testcases.dir}"/>
712     <pathelement location="${junit.jar}"/>
713     </path>
714    
715 tim 1.37 <path id="test.compile.bootclasspath">
716     <pathelement location="${javac.jar}"/>
717     <pathelement location="${collect.jar}"/>
718     <pathelement location="${rt.jar}"/>
719     </path>
720    
721     <path id="test.run.bootclasspath">
722     <pathelement location="${javac.jar}"/>
723     <path refid="test.classpath"/>
724     </path>
725 tim 1.32
726 tim 1.37 <!-- Flatten test classpaths into platform-appropriate strings -->
727     <property name="test.classpath" refid="test.classpath"/>
728     <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>
729     <property name="test.run.bootclasspath" refid="test.run.bootclasspath"/>
730 tim 1.30
731 tim 1.28 </target>
732    
733    
734    
735     <!-- Anthill targets -->
736    
737     <target name="anthill-build"
738     depends="jar, test, docs, dist-docs"/>
739    
740     <target name="anthill-publish">
741    
742     <copy todir="${deployDir}/docs/private">
743     <fileset dir="${build.javadocs.dir}"/>
744     </copy>
745    
746     <copy todir="${deployDir}/docs/public">
747     <fileset dir="${dist.javadocs.dir}"/>
748     </copy>
749    
750     <copy tofile="${deployDir}/index.html"
751     file="${basedir}/etc/anthill-index.html"/>
752    
753     <copy todir="${deployDir}/notes">
754     <fileset dir="${basedir}/etc/notes"/>
755     </copy>
756    
757 tim 1.43 </target>
758    
759    
760     <target name="ng" depends="test">
761     <java classname="SuperfluousAbstract" fork="true">
762    
763     <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
764    
765     </java>
766 tim 1.1 </target>
767    
768    
769     </project>

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27