35 |
|
<property name="build.lib.dir" location="${build.dir}/lib"/> |
36 |
|
<property name="build.ant.dir" location="${build.dir}/ant"/> |
37 |
|
<property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
38 |
+ |
<property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
39 |
|
<property name="build.stripped.dir" location="${build.dir}/stripped"/> |
40 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
41 |
|
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
42 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
43 |
+ |
<property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
44 |
|
|
45 |
|
<!-- Source locations --> |
46 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
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 |
< |
|
61 |
> |
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
62 |
|
|
63 |
|
|
64 |
|
<!-- Files excluded from dist-docs and emulation jar --> |
73 |
|
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
74 |
|
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
75 |
|
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
76 |
+ |
<exclude name="java/util/concurrent/locks/LockSupport*"/> |
77 |
+ |
<exclude name="java/util/concurrent/locks/ReentrantLock*"/> |
78 |
|
</patternset> |
79 |
|
|
80 |
|
|
102 |
|
source="${build.sourcelevel}" |
103 |
|
fork="true"> |
104 |
|
|
105 |
+ |
<!-- |
106 |
|
<compilerarg line="${gjc.args}"/> |
107 |
|
<bootclasspath refid="compile.bootclasspath"/> |
108 |
+ |
--> |
109 |
|
|
110 |
|
</javac> |
111 |
|
|
138 |
|
|
139 |
|
|
140 |
|
<target name="doccheck" |
141 |
< |
depends="filter-src" |
142 |
< |
description="Reports on javadoc style errors (not working yet)"> |
141 |
> |
depends="filter-doccheck" |
142 |
> |
description="Reports on javadoc style errors"> |
143 |
|
|
144 |
|
<delete dir="${build.doccheck.dir}"/> |
145 |
|
<mkdir dir="${build.doccheck.dir}"/> |
147 |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
148 |
|
docletpath="${lib.dir}/doccheck.jar" |
149 |
|
destdir="${build.doccheck.dir}"> |
150 |
< |
<packageset dir="${build.filter.src.dir}"/> |
150 |
> |
<packageset dir="${build.filter.doccheck.dir}"/> |
151 |
|
</javadoc> |
152 |
|
|
153 |
+ |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
154 |
+ |
|
155 |
|
</target> |
156 |
|
|
157 |
|
|
179 |
|
</target> |
180 |
|
|
181 |
|
|
182 |
+ |
<target name="sinjdocs" |
183 |
+ |
depends="configure-tests" |
184 |
+ |
description="Builds javadocs with custom tags to build folder"> |
185 |
+ |
|
186 |
+ |
<delete dir="${build.sinjdocs.dir}"/> |
187 |
+ |
<mkdir dir="${build.sinjdocs.dir}"/> |
188 |
+ |
|
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 |
+ |
<pathelement location="${lib.dir}/jutil.jar"/> |
196 |
+ |
<pathelement location="${lib.dir}/cup.jar"/> |
197 |
+ |
<path refid="test.classpath"/> |
198 |
+ |
</classpath> |
199 |
+ |
|
200 |
+ |
|
201 |
+ |
<arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
202 |
+ |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
203 |
+ |
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
204 |
+ |
<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 |
+ |
<arg value="java.util"/> |
209 |
+ |
<arg value="java.util.concurrent"/> |
210 |
+ |
<arg value="java.util.concurrent.atomic"/> |
211 |
+ |
<arg value="java.util.concurrent.locks"/> |
212 |
+ |
|
213 |
+ |
<!-- |
214 |
+ |
<arg value="-help"/> |
215 |
+ |
--> |
216 |
+ |
|
217 |
+ |
</java> |
218 |
+ |
|
219 |
+ |
</target> |
220 |
+ |
|
221 |
+ |
|
222 |
|
<target name="strip" |
223 |
|
depends="init, configure-compiler" |
224 |
|
description="Strip generics from java source (not working yet)"> |
238 |
|
source="${build.sourcelevel}" |
239 |
|
fork="true"> |
240 |
|
|
241 |
+ |
<!-- |
242 |
|
<compilerarg line="${gjc.args} -s"/> |
243 |
|
<bootclasspath refid="compile.bootclasspath"/> |
244 |
+ |
--> |
245 |
|
|
246 |
|
</javac> |
247 |
|
|
256 |
|
depends="dist" |
257 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
258 |
|
|
259 |
+ |
<!-- |
260 |
+ |
#keep build dir? - dl |
261 |
|
<delete dir="${build.dir}"/> |
262 |
< |
|
262 |
> |
--> |
263 |
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
264 |
|
|
265 |
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
267 |
|
<exclude name="user.properties"/> |
268 |
|
<exclude name="etc/notes/**"/> |
269 |
|
<exclude name="lib/gjc/2.1/**"/> |
270 |
+ |
<exclude name="**/SyntaxTest.java"/> |
271 |
|
</jar> |
272 |
|
|
273 |
|
</target> |
410 |
|
</fileset> |
411 |
|
</copy> |
412 |
|
|
360 |
– |
<!-- Not needed now, used for doccheck filtering: |
361 |
– |
<property name="generic.declarations" |
362 |
– |
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
363 |
– |
/> |
364 |
– |
--> |
365 |
– |
|
413 |
|
<copy todir="${build.filter.src.dir}"> |
414 |
|
<fileset dir="${src.dir}"> |
415 |
|
<exclude name="**/*.html"/> |
449 |
|
<param name="pattern" value="^//@"/> |
450 |
|
<param name="replacement" value=""/> |
451 |
|
</filterreader> |
452 |
+ |
</filterchain> |
453 |
+ |
</copy> |
454 |
|
|
455 |
+ |
</target> |
456 |
+ |
|
457 |
+ |
|
458 |
+ |
|
459 |
+ |
|
460 |
+ |
<target name="filter-doccheck" |
461 |
+ |
depends="filter-src"> |
462 |
+ |
|
463 |
+ |
<mkdir dir="${build.filter.doccheck.dir}"/> |
464 |
+ |
|
465 |
+ |
<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 |
|
<!-- |
481 |
< |
# The next two filters try to make the source look like |
481 |
> |
# These two filters try to make the source look like |
482 |
|
# 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. |
413 |
– |
# |
414 |
– |
# Currently commented out because doccheck doesn't work. :-( |
486 |
|
--> |
487 |
|
|
417 |
– |
<!-- |
488 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
489 |
|
classpath="${build.ant.dir}"> |
490 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
494 |
|
|
495 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
496 |
|
classpath="${build.ant.dir}"> |
497 |
< |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
497 |
> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
498 |
|
<param name="pattern" value="$"/> |
499 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
500 |
|
</filterreader> |
431 |
– |
--> |
501 |
|
|
502 |
|
</filterchain> |
503 |
|
</copy> |
524 |
|
source="${build.sourcelevel}" |
525 |
|
fork="true"> |
526 |
|
|
527 |
+ |
<!-- |
528 |
|
<compilerarg line="${gjc.args}"/> |
529 |
+ |
--> |
530 |
|
<bootclasspath refid="test.compile.bootclasspath"/> |
531 |
|
<classpath refid="test.classpath"/> |
532 |
|
|
592 |
|
|
593 |
|
|
594 |
|
<target name="configure-compiler"> |
595 |
< |
|
595 |
> |
<!-- |
596 |
|
<property name="gjc.version" |
597 |
< |
value="2.0"/> |
597 |
> |
value="2.2"/> |
598 |
|
|
599 |
|
<condition property="novariance.arg" value="-novariance"> |
600 |
|
<and> |
618 |
|
<property name="collect.jar" |
619 |
|
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
620 |
|
|
621 |
< |
|
621 |
> |
--> |
622 |
|
<condition property="warnunchecked.arg" value="-warnunchecked"> |
623 |
|
<istrue value="${gjc.warnunchecked}"/> |
624 |
|
</condition> |
650 |
|
|
651 |
|
|
652 |
|
<!-- Common options in javac invocations --> |
653 |
+ |
<!-- |
654 |
|
<property name="gjc.args" |
655 |
|
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
656 |
|
/> |
657 |
+ |
--> |
658 |
|
|
659 |
|
</target> |
660 |
|
|