build.xml

Mon, 28 Sep 2020 01:52:27 +0100

author
andrew
date
Mon, 28 Sep 2020 01:52:27 +0100
changeset 2115
ba503169016f
parent 412
1c2079d11a79
child 759
7ea027fae4d8
permissions
-rw-r--r--

Added tag jdk8u272-b09 for changeset a5b79eebcc1f

duke@1 1 <?xml version="1.0"?>
duke@1 2 <!--
ohair@207 3 Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
duke@1 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 5
duke@1 6 This code is free software; you can redistribute it and/or modify it
duke@1 7 under the terms of the GNU General Public License version 2 only, as
ohair@124 8 published by the Free Software Foundation. Oracle designates this
duke@1 9 particular file as subject to the "Classpath" exception as provided
ohair@124 10 by Oracle in the LICENSE file that accompanied this code.
duke@1 11
duke@1 12 This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 15 version 2 for more details (a copy is included in the LICENSE file that
duke@1 16 accompanied this code).
duke@1 17
duke@1 18 You should have received a copy of the GNU General Public License version
duke@1 19 2 along with this work; if not, write to the Free Software Foundation,
duke@1 20 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 21
ohair@124 22 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@124 23 or visit www.oracle.com if you need additional information or have any
ohair@124 24 questions.
duke@1 25 -->
duke@1 26
ohair@88 27 <project name="jaxp" default="all" basedir=".">
ohair@88 28
ohair@88 29 <!-- For 'ant -p' or 'ant -projecthelp' -->
ohair@88 30
ohair@88 31 <description>
ohair@88 32 Ant build script for the ${ant.project.name} part of the jdk.
duke@1 33
ohair@88 34 Input Properties: (see build.properties for the ant defaults)
ohair@88 35 bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
ohair@88 36 javac.debug - true or false for debug classfiles
ohair@88 37 javac.target - classfile version target
ohair@88 38 javac.source - source version
ohair@132 39
ohair@132 40 Run 'make help' for help using the Makefile.
ohair@88 41 </description>
duke@1 42
ohair@88 43 <!-- Project build properties. -->
duke@1 44 <property file="build.properties"/>
duke@1 45
ohair@282 46 <!-- Source dir def -->
joehw@293 47 <property name="jaxp.src.dir" value="src"/>
ohair@282 48 <path id="src.dir.id">
ohair@282 49 <pathelement path="${jaxp.src.dir}"/>
ohair@282 50 </path>
ohair@88 51
ohair@88 52 <!-- Initialization of directories needed for build. -->
ohair@88 53 <target name="init">
ohair@88 54 <mkdir dir="${build.dir}"/>
ohair@88 55 <mkdir dir="${build.classes.dir}"/>
ohair@88 56 <mkdir dir="${dist.dir}"/>
ohair@88 57 <mkdir dir="${dist.lib.dir}"/>
ohair@88 58 </target>
ohair@88 59
ohair@88 60 <!-- Sanity checks and settings -->
ohair@88 61 <target name="sanity"
ohair@88 62 depends="-javac-jar-exists"
ohair@88 63 description="Display settings of configuration values">
ohair@88 64 <echo message="${sanity.info}"/>
duke@1 65 </target>
duke@1 66
ohair@88 67 <!-- Check for bootstrap javac.jar file, warn if missing. -->
ohair@88 68 <condition property="javac.jar.exists">
ohair@88 69 <available file="${javac.jar}" type="file"/>
ohair@88 70 </condition>
ohair@88 71 <target name="-javac-jar-exists"
ohair@88 72 unless="javac.jar.exists">
ohair@88 73 <echo message="WARNING: Cannot find ${javac.jar}"/>
duke@1 74 </target>
duke@1 75
ohair@88 76 <!-- Creation of distribution files to jdk build process. -->
ohair@88 77 <target name="dist"
ohair@282 78 depends="init, build, -dist-classes-jar, -dist-src-zip"
ohair@88 79 description="Create all built distribution files.">
ohair@88 80 </target>
ohair@88 81 <target name="-dist-classes-jar-uptodate"
ohair@282 82 depends="init">
ohair@88 83 <condition property="dist.classes.jar.uptodate">
ohair@88 84 <and>
ohair@88 85 <available file="${dist.classes.jar}" type="file"/>
ohair@88 86 <uptodate targetfile="${dist.classes.jar}">
ohair@88 87 <srcfiles dir="${build.classes.dir}" includes="**"/>
ohair@88 88 </uptodate>
ohair@88 89 </and>
ohair@88 90 </condition>
ohair@88 91 </target>
ohair@88 92 <target name="-dist-classes-jar"
ohair@282 93 depends="init, -dist-classes-jar-uptodate"
ohair@88 94 unless="dist.classes.jar.uptodate">
ohair@88 95 <delete file="${dist.classes.jar}"/>
ohair@88 96 <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
duke@1 97 </target>
duke@1 98
ohair@282 99 <!-- Special build area setup. -->
ohair@282 100 <target name="-build-setup" depends="init">
ohair@282 101 <mkdir dir="${build.classes.dir}"/>
ohair@282 102 <copy todir="${build.classes.dir}">
ohair@282 103 <fileset dir="${jaxp.src.dir}"
ohair@282 104 includes="**/*.properties"/>
ohair@282 105 </copy>
ohair@282 106 <replaceregexp match="#(.*)$" replace="#" flags="gm">
ohair@282 107 <fileset dir="${build.classes.dir}" includes="**/*.properties"/>
ohair@282 108 </replaceregexp>
duke@1 109 </target>
duke@1 110
ohair@282 111 <!-- Create src.zip. -->
ohair@282 112 <target name="-dist-src-zip" depends="init">
ohair@282 113 <zip file="${dist.src.zip}" basedir="${jaxp.src.dir}"/>
ohair@282 114 </target>
ohair@282 115
ohair@88 116 <!-- Build (compilation) of sources to class files. -->
ohair@88 117 <target name="build"
ohair@132 118 depends="compile, -build-setup">
ohair@132 119 </target>
ohair@132 120 <target name="compile"
ohair@282 121 depends="init">
ohair@132 122 <mkdir dir="${build.classes.dir}"/>
ohair@100 123 <javac
ohair@132 124 includeAntRuntime="false"
ohair@132 125 classpath="${build.classes.dir}:${tools.jar}"
ohair@100 126 fork="true"
duke@1 127 destdir="${build.classes.dir}"
duke@1 128 memoryInitialSize="${javac.memoryInitialSize}"
duke@1 129 memoryMaximumSize="${javac.memoryMaximumSize}"
ohair@88 130 source="${javac.source}"
aph@51 131 debug="${javac.debug}"
duke@1 132 target="${javac.target}">
ohair@88 133 <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
ohair@88 134 <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
ohair@88 135 <src refid="src.dir.id"/>
ohair@88 136 </javac>
duke@1 137 </target>
duke@1 138
ohair@88 139 <!-- Test. (FIXME: Need to know how to run tests.) -->
ohair@88 140 <target name="test"
ohair@282 141 depends="init, dist">
ohair@88 142 <echo message="FIXME: How do you run the tests"/>
ohair@88 143 </target>
ohair@88 144
ohair@88 145 <!-- Populate source area if needed. -->
ohair@88 146 <target name="source"
ohair@282 147 depends="init"
ohair@88 148 description="Populate all source file directories">
duke@1 149 </target>
duke@1 150
ohair@88 151 <!-- Clean up compiled files. -->
ohair@88 152 <target name="clean"
ohair@88 153 description="Delete all generated files">
ohair@88 154 <delete dir="${build.dir}"/>
ohair@88 155 <delete dir="${dist.dir}"/>
ohair@88 156 </target>
ohair@88 157
ohair@88 158 <!-- Clean up compiled files and all imported source files. -->
ohair@88 159 <target name="clobber"
ohair@88 160 depends="clean"
ohair@88 161 description="Delete all generated files, including imported sources">
ohair@88 162 </target>
ohair@88 163
ohair@88 164 <target name="-banner">
ohair@88 165 <echo message="+---------------------------------------+"/>
ohair@88 166 <echo message="+ Starting ant project ${ant.project.name} +"/>
ohair@88 167 <echo message="+---------------------------------------+"/>
ohair@88 168 </target>
ohair@88 169
ohair@88 170 <!-- Do everything but test. -->
ohair@88 171 <target name="all"
ohair@88 172 depends="-banner, sanity, dist"
ohair@88 173 description="Build everything.">
ohair@88 174 <echo message="+---------------------------------------+"/>
ohair@88 175 <echo message="+ Finishing ant project ${ant.project.name}"/>
ohair@88 176 <echo message="+---------------------------------------+"/>
duke@1 177 </target>
duke@1 178
dfuchs@412 179 <target name="javadoc" depends="init" description="Build basic Javadoc for public packages.">
dfuchs@412 180 <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
dfuchs@412 181 <!-- Note: even with this default value, includes/excludes
dfuchs@412 182 from share.src.dir get javadoc'd; see packageset below -->
dfuchs@412 183 <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
dfuchs@412 184 <property name="javadoc.dir" value="${build.dir}/docs/api"/>
dfuchs@412 185 <property name="includes" value="**"/>
dfuchs@412 186 <javadoc destdir="${javadoc.dir}" source="1.5"
dfuchs@412 187 windowtitle="UNOFFICIAL" failonerror="true" use="true"
dfuchs@412 188 author="false" version="false"
dfuchs@412 189 packagenames="${javadoc.packagenames}">
dfuchs@412 190 <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
dfuchs@412 191 <arg line="${javadoc.options}"/>
dfuchs@412 192 <bootclasspath>
dfuchs@412 193 <path location="${java.home}/lib/rt.jar"/>
dfuchs@412 194 <path location="${build.classes.dir}"/>
dfuchs@412 195 </bootclasspath>
dfuchs@412 196 <sourcepath>
dfuchs@412 197 <pathelement location="${jaxp.src.dir}"/>
dfuchs@412 198 </sourcepath>
dfuchs@412 199 <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
dfuchs@412 200 <!-- means that {@link some.package} will not work, which is no good. -->
dfuchs@412 201 <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
dfuchs@412 202 <!-- which also causes duplicates in the class index for included files.) -->
dfuchs@412 203 <packageset dir="${jaxp.src.dir}" includes="${includes}" excludes="${excludes}">
dfuchs@412 204 <or>
dfuchs@412 205 <filename name="javax/"/>
dfuchs@412 206 <filename name="org/w3c/"/>
dfuchs@412 207 <filename name="org/xml/sax/"/>
dfuchs@412 208 </or>
dfuchs@412 209 </packageset>
dfuchs@412 210 </javadoc>
dfuchs@412 211 </target>
dfuchs@412 212 <target name="javadoc-nb" depends="javadoc" if="netbeans.home">
dfuchs@412 213 <property name="javadoc.dir=" value="${build.dir}/docs/api"/>
dfuchs@412 214 <nbbrowse file="${javadoc.dir}/index.html"/>
dfuchs@412 215 </target>
dfuchs@412 216
duke@1 217 </project>

mercurial