ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.27 by tim, Wed May 28 00:33:17 2003 UTC vs.
Revision 1.28 by tim, Wed May 28 13:37:59 2003 UTC

# Line 74 | Line 74 | ant [target], where target is one of:
74    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
75  
76  
77 +
78    <!--
79     ! Bootclasspath munging for source compilation.
80     -->
81  
82 <  <path id="javac.bootclasspath.prepend">
82 >  <path id="javac.bootclasspath.prefix">
83      <!-- <pathelement location="${src.dir}"/> -->
84      <pathelement location="${javac.jar}"/>
85    </path>
# Line 90 | Line 91 | ant [target], where target is one of:
91    </path>
92  
93    <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
94 <  <property name="javac.bootclasspath.prepend" refid="javac.bootclasspath.prepend"/>
94 >  <property name="javac.bootclasspath.prefix" refid="javac.bootclasspath.prefix"/>
95  
96    <!-- Turn the flattened bootclasspath prefix into a javac argument -->
97 <  <property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prepend}'/>
97 >  <property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>
98 >
99  
100  
101    <!--
# Line 115 | Line 117 | ant [target], where target is one of:
117  
118  
119  
120 +  <!-- Files excluded from emulation and dist-docs -->
121 +  <patternset id="emulation.excludes">
122 +    <exclude name="java/util/Random.*"/>
123 +    <exclude name="sun/misc/Unsafe.*"/>
124 +  </patternset>
125 +
126 +
127 +
128    <!-- Main targets -->
129  
130 <  <target name="compile" depends="init"
130 >  <target name="compile"
131 >          depends="init"
132            description="Compiles main sources to build folder">
133  
134      <mkdir dir="${build.classes.dir}"/>
# Line 138 | Line 149 | ant [target], where target is one of:
149    </target>
150  
151  
152 <  <target name="jar" depends="native-jar, emulation-jar"/>
152 >  <target name="jar"
153 >          depends="native-jar, emulation-jar"
154 >          description="Builds library jar from compiled sources"/>
155  
156  
157 <  <target name="test" depends="init, check-junit, report-tests"
158 <          description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)"
159 <  />
157 >  <target name="test"
158 >          depends="init, check-junit, report-tests"
159 >          description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" />
160  
161  
162 <  <target name="checkstyle" depends="filter-src"
162 >  <target name="checkstyle"
163 >          depends="filter-src"
164            description="Reports on style errors in Java source (verbose, mostly chaff)">
165  
166      <taskdef resource="checkstyletask.properties"
# Line 160 | Line 174 | ant [target], where target is one of:
174    </target>
175  
176  
177 <  <target name="doccheck" depends="filter-src"
177 >  <target name="doccheck"
178 >          depends="filter-src"
179            description="Reports on javadoc style errors (not working yet)">
180  
181      <delete dir="${build.doccheck.dir}"/>
# Line 175 | Line 190 | ant [target], where target is one of:
190    </target>
191  
192  
193 <  <target name="docs" depends="filter-src"
193 >  <target name="docs"
194 >          depends="filter-src"
195            description="Builds javadocs with custom tags to build folder">
196  
197      <delete dir="${build.javadocs.dir}"/>
# Line 202 | Line 218 | ant [target], where target is one of:
218     # bridge methods (marked as "synthetic") that can have identical
219     # signatures to existing methods except for the return value.
220     -->
221 <  <target name="strip" depends="init">
221 >  <target name="strip"
222 >          depends="init">
223  
224      <mkdir dir="${build.stripped.dir}"/>
225  
# Line 222 | Line 239 | ant [target], where target is one of:
239    </target>
240  
241  
242 <  <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"
242 >  <target name="dist"
243 >          depends="init, dist-clean, dist-jar, dist-docs"
244            description="Puts all distributable products in single hierarchy"/>
245  
246  
# Line 244 | Line 262 | ant [target], where target is one of:
262    </target>
263  
264  
265 <  <!-- Anthill targets -->
265 >  <target name="dist-docs"
266 >          depends="filter-src"
267 >          description="Builds javadocs without custom tags to dist folder">
268  
269 <  <!-- Should really run the tests instead of just the jar target -->
270 <  <target name="anthill-build" depends="jar, test, docs, dist-docs"/>
269 >    <delete dir="${dist.javadocs.dir}"/>
270 >    <mkdir dir="${dist.javadocs.dir}"/>
271 >
272 >    <javadoc destdir="${dist.javadocs.dir}"
273 >                link="http://java.sun.com/j2se/1.4.1/docs/api"
274 >            overview="${src.dir}/intro.html"
275 >              source="${build.docsourcelevel}">
276 >
277 >      <packageset dir="${build.filter.src.dir}"/>
278 >
279 >    </javadoc>
280  
252  <target name="anthill-publish">
253    <copy todir="${deployDir}/docs/private">
254      <fileset dir="${build.javadocs.dir}"/>
255    </copy>
256    <copy todir="${deployDir}/docs/public">
257      <fileset dir="${dist.javadocs.dir}"/>
258    </copy>
259    <copy tofile="${deployDir}/index.html"
260          file="${basedir}/etc/anthill-index.html"/>
261    <copy todir="${deployDir}/notes">
262      <fileset dir="${basedir}/etc/notes"/>
263    </copy>
281    </target>
282  
283  
284 +
285    <!-- Internal targets -->
286  
287    <target name="set-warnings-if" if="build.warnings">
# Line 280 | Line 298 | ant [target], where target is one of:
298    </target>
299  
300  
301 <  <target name="init" depends="set-warnings-if, set-warnings-unless">
301 >  <target name="init"
302 >          depends="set-warnings-if, set-warnings-unless">
303  
304      <!-- Version is kept in a separate file -->
305      <loadfile property="version" srcFile="version.properties"/>
# Line 289 | Line 308 | ant [target], where target is one of:
308    </target>
309  
310  
311 <  <target name="native-jar" depends="compile"
293 <          description="Builds library jar from compiled sources">
311 >  <target name="init-jar">
312  
313      <mkdir dir="${build.lib.dir}"/>
314  
315 +  </target>
316 +
317 +
318 +  <target name="native-jar"
319 +          depends="compile, init-jar"
320 +          unless="build.emulation">
321 +
322      <jar destfile="${product.jar}">
323        <fileset dir="${build.classes.dir}"/>
324      </jar>
# Line 301 | Line 326 | ant [target], where target is one of:
326    </target>
327  
328  
329 <  <target name="compile-emulation" depends="init"
330 <          if="build.emulation"
331 <          description="Compiles emulation sources to build folder">
329 >  <target name="base-jar"
330 >          depends="compile, init-jar">
331 >
332 >    <jar destfile="${product.jar}">
333 >      <fileset dir="${build.classes.dir}">
334 >        <patternset refid="emulation.excludes"/>
335 >      </fileset>
336 >    </jar>
337 >
338 >  </target>
339 >
340 >
341 >  <target name="compile-emulation"
342 >          depends="init"
343 >          if="build.emulation">
344  
345      <mkdir dir="${build.emulation.dir}"/>
346  
# Line 323 | Line 360 | ant [target], where target is one of:
360    </target>
361  
362  
363 <  <target name="emulation-jar" depends="native-jar, compile-emulation"
363 >  <target name="emulation-jar"
364 >          depends="base-jar, compile-emulation"
365            if="build.emulation">
366  
367      <jar destfile="${product.jar}" update="true" duplicate="add">
# Line 333 | Line 371 | ant [target], where target is one of:
371    </target>
372  
373  
374 <  <target name="dist-jar" depends="clean, jar">
374 >  <target name="dist-jar"
375 >          depends="clean, jar">
376  
377      <copy file="${product.jar}" todir="${dist.dir}"/>
378  
379    </target>
380  
381  
382 <  <target name="dist-docs" depends="filter-src"
383 <          description="Builds javadocs without custom tags to dist folder">
345 <
346 <    <delete dir="${dist.javadocs.dir}"/>
347 <    <mkdir dir="${dist.javadocs.dir}"/>
348 <
349 <    <javadoc destdir="${dist.javadocs.dir}"
350 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
351 <            overview="${src.dir}/intro.html"
352 <              source="${build.docsourcelevel}">
353 <
354 <      <packageset dir="${build.filter.src.dir}"/>
355 <
356 <    </javadoc>
357 <
358 <  </target>
359 <
360 <
361 <  <target name="compile-ant-filter" depends="init">
382 >  <target name="compile-ant-filter"
383 >          depends="init">
384  
385      <mkdir dir="${build.ant.dir}"/>
386  
# Line 370 | Line 392 | ant [target], where target is one of:
392    </target>
393  
394  
395 <  <target name="filter-src" depends="compile-ant-filter">
395 >  <target name="filter-src"
396 >          depends="compile-ant-filter">
397  
398      <mkdir dir="${build.filter.src.dir}"/>
399  
400      <copy todir="${build.filter.src.dir}">
401        <fileset dir="${src.dir}">
402 <        <include name="**/*.java"/>
380 <        <exclude name="**/Random.java"/>
381 <        <exclude name="**/Unsafe.java"/>
402 >        <patternset refid="emulation.excludes"/>
403        </fileset>
404        <filterchain>
405          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
# Line 416 | Line 437 | ant [target], where target is one of:
437    </target>
438  
439  
440 <  <target name="compile-tests" depends="jar">
440 >  <target name="compile-tests"
441 >          depends="jar">
442  
443      <mkdir dir="${build.testcases.dir}"/>
444  
# Line 437 | Line 459 | ant [target], where target is one of:
459    </target>
460  
461  
462 <  <target name="run-tests" depends="compile-tests">
462 >  <target name="run-tests"
463 >          depends="compile-tests">
464  
465      <!-- May be overridden by user.properties -->
466      <property name="testcase" value="*"/>
# Line 466 | Line 489 | ant [target], where target is one of:
489    </target>
490  
491  
492 <  <target name="report-tests" depends="run-tests">
492 >  <target name="report-tests"
493 >          depends="run-tests">
494 >
495      <!-- Sets junit.report.format to frames if Xalan is present,
496           otherwise sets it to noframes. -->
497      <available property="junit.report.format"
# Line 486 | Line 511 | ant [target], where target is one of:
511      </junitreport>
512  
513      <fail message="Test Cases Failed" if="junit.failed"/>
514 +
515    </target>
516  
517  
518    <target name="check-junit">
519 <    <!-- FIXME: this test isn't specific enough -->
519 >
520 >    <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
521      <available property="junit.available"
522 <               classname="junit.framework.TestCase"/>
523 <    <fail message="Need JUnit 3.8 to run tests" unless="junit.available"/>
522 >               classname="junit.framework.Protectable"/>
523 >
524 >    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
525 >          unless="junit.available"/>
526 >
527 >  </target>
528 >
529 >
530 >
531 >  <!-- Anthill targets -->
532 >
533 >  <target name="anthill-build"
534 >          depends="jar, test, docs, dist-docs"/>
535 >
536 >  <target name="anthill-publish">
537 >
538 >    <copy todir="${deployDir}/docs/private">
539 >      <fileset dir="${build.javadocs.dir}"/>
540 >    </copy>
541 >
542 >    <copy todir="${deployDir}/docs/public">
543 >      <fileset dir="${dist.javadocs.dir}"/>
544 >    </copy>
545 >
546 >    <copy tofile="${deployDir}/index.html"
547 >          file="${basedir}/etc/anthill-index.html"/>
548 >
549 >    <copy todir="${deployDir}/notes">
550 >      <fileset dir="${basedir}/etc/notes"/>
551 >    </copy>
552 >
553    </target>
554  
555  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines