Thu, 16 Sep 2010 11:18:41 -0700
Merge
duke@1 | 1 | <?xml version="1.0"?> |
duke@1 | 2 | <!-- |
ohair@116 | 3 | Copyright (c) 2009, 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@116 | 8 | published by the Free Software Foundation. Oracle designates this |
duke@1 | 9 | particular file as subject to the "Classpath" exception as provided |
ohair@116 | 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@116 | 22 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@116 | 23 | or visit www.oracle.com if you need additional information or have any |
ohair@116 | 24 | questions. |
duke@1 | 25 | --> |
duke@1 | 26 | |
ohair@85 | 27 | <project name="jaxws" default="all" basedir="."> |
ohair@85 | 28 | |
ohair@85 | 29 | <!-- For 'ant -p' or 'ant -projecthelp' --> |
ohair@85 | 30 | |
ohair@85 | 31 | <description> |
ohair@85 | 32 | Ant build script for the ${ant.project.name} part of the jdk. |
duke@1 | 33 | |
ohair@85 | 34 | Input Properties: (see build.properties for the ant defaults) |
ohair@85 | 35 | bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath |
ohair@85 | 36 | javac.debug - true or false for debug classfiles |
ohair@85 | 37 | javac.target - classfile version target |
ohair@85 | 38 | javac.source - source version |
ohair@124 | 39 | drops.dir - directory that holds source drop bundles |
ohair@124 | 40 | allow.download - permit downloads from public url (default is false) |
ohair@124 | 41 | (used if bundles not found in drops.dir) |
ohair@124 | 42 | |
ohair@124 | 43 | Run 'make help' for help using the Makefile. |
ohair@85 | 44 | </description> |
duke@1 | 45 | |
ohair@85 | 46 | <!-- Mac is special, need to downgrade these before build.properties. --> |
ohair@85 | 47 | <condition property="javac.source" value="1.5"> |
ohair@85 | 48 | <os family="mac"/> |
ohair@85 | 49 | </condition> |
ohair@85 | 50 | <condition property="javac.target" value="1.5"> |
ohair@85 | 51 | <os family="mac"/> |
ohair@85 | 52 | </condition> |
ohair@85 | 53 | |
ohair@85 | 54 | <!-- Project build properties. --> |
duke@1 | 55 | <property file="build.properties"/> |
duke@1 | 56 | |
ohair@91 | 57 | <!-- See if drop sources were included. --> |
ohair@91 | 58 | <condition property="drop.dir" |
ohair@91 | 59 | value="${drop.included.dir}" |
ohair@91 | 60 | else="${drop.expanded.dir}"> |
ohair@91 | 61 | <available file="${drop.included.dir}" type="dir"/> |
ohair@91 | 62 | </condition> |
ohair@91 | 63 | |
ohair@85 | 64 | <!-- Get shared targets. --> |
ohair@85 | 65 | <import file="build-defs.xml"/> |
ohair@85 | 66 | |
ohair@85 | 67 | <!-- Initialization of directories needed for build. --> |
ohair@85 | 68 | <target name="init"> |
ohair@85 | 69 | <mkdir dir="${build.dir}"/> |
ohair@85 | 70 | <mkdir dir="${build.classes.dir}"/> |
ohair@85 | 71 | <mkdir dir="${dist.dir}"/> |
ohair@85 | 72 | <mkdir dir="${dist.lib.dir}"/> |
ohair@85 | 73 | </target> |
ohair@85 | 74 | |
ohair@85 | 75 | <!-- Sanity checks and settings --> |
ohair@85 | 76 | <target name="sanity" |
ohair@85 | 77 | depends="-javac-jar-exists" |
ohair@85 | 78 | description="Display settings of configuration values"> |
ohair@85 | 79 | <echo message="${sanity.info}"/> |
duke@1 | 80 | </target> |
duke@1 | 81 | |
ohair@85 | 82 | <!-- Check for bootstrap javac.jar file, warn if missing. --> |
ohair@85 | 83 | <condition property="javac.jar.exists"> |
ohair@85 | 84 | <available file="${javac.jar}" type="file"/> |
ohair@85 | 85 | </condition> |
ohair@85 | 86 | <target name="-javac-jar-exists" |
ohair@85 | 87 | unless="javac.jar.exists"> |
ohair@85 | 88 | <echo message="WARNING: Cannot find ${javac.jar}"/> |
duke@1 | 89 | </target> |
duke@1 | 90 | |
ohair@85 | 91 | <!-- Creation of distribution files to jdk build process. --> |
ohair@85 | 92 | <target name="dist" |
ohair@85 | 93 | depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip" |
ohair@85 | 94 | description="Create all built distribution files."> |
ohair@85 | 95 | </target> |
ohair@85 | 96 | <target name="-dist-classes-jar-uptodate" |
ohair@85 | 97 | depends="init, -init-src-dirs"> |
ohair@85 | 98 | <condition property="dist.classes.jar.uptodate"> |
ohair@85 | 99 | <and> |
ohair@85 | 100 | <available file="${dist.classes.jar}" type="file"/> |
ohair@85 | 101 | <uptodate targetfile="${dist.classes.jar}"> |
ohair@85 | 102 | <srcfiles dir="${build.classes.dir}" includes="**"/> |
ohair@85 | 103 | </uptodate> |
ohair@85 | 104 | </and> |
ohair@85 | 105 | </condition> |
ohair@85 | 106 | </target> |
ohair@85 | 107 | <target name="-dist-classes-jar" |
ohair@85 | 108 | depends="init, -init-src-dirs, -dist-classes-jar-uptodate" |
ohair@85 | 109 | unless="dist.classes.jar.uptodate"> |
ohair@85 | 110 | <delete file="${dist.classes.jar}"/> |
ohair@85 | 111 | <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
duke@1 | 112 | </target> |
duke@1 | 113 | |
ohair@124 | 114 | <target name="-build-setup" |
ohair@124 | 115 | depends="init, -init-src-dirs, -drop-build-setup"> |
duke@1 | 116 | </target> |
duke@1 | 117 | |
ohair@85 | 118 | <!-- Build (compilation) of sources to class files. --> |
ohair@85 | 119 | <target name="build" |
ohair@124 | 120 | depends="compile, -build-setup"> |
ohair@124 | 121 | </target> |
ohair@124 | 122 | <target name="compile" |
ohair@124 | 123 | depends="init, -init-src-dirs"> |
ohair@124 | 124 | <mkdir dir="${build.classes.dir}"/> |
ohair@95 | 125 | <javac |
ohair@95 | 126 | includeAntRuntime="false" |
ohair@95 | 127 | classpath="${build.classes.dir}:${tools.jar}" |
ohair@95 | 128 | fork="true" |
duke@1 | 129 | destdir="${build.classes.dir}" |
duke@1 | 130 | memoryInitialSize="${javac.memoryInitialSize}" |
duke@1 | 131 | memoryMaximumSize="${javac.memoryMaximumSize}" |
jjg@63 | 132 | source="${javac.source}" |
aph@54 | 133 | debug="${javac.debug}" |
ohair@85 | 134 | target="${javac.target}"> |
ohair@85 | 135 | <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/> |
ohair@85 | 136 | <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/> |
ohair@85 | 137 | <src refid="src.dir.id"/> |
ohair@85 | 138 | </javac> |
duke@1 | 139 | </target> |
duke@1 | 140 | |
ohair@85 | 141 | <!-- Test. (FIXME: Need to know how to run tests.) --> |
ohair@85 | 142 | <target name="test" |
ohair@85 | 143 | depends="init, -init-src-dirs, dist"> |
ohair@85 | 144 | <echo message="FIXME: How do you run the tests"/> |
ohair@85 | 145 | </target> |
ohair@85 | 146 | |
ohair@85 | 147 | <!-- Populate source area if needed. --> |
ohair@85 | 148 | <target name="source" |
ohair@85 | 149 | depends="init, -init-src-dirs" |
ohair@85 | 150 | description="Populate all source file directories"> |
duke@1 | 151 | </target> |
duke@1 | 152 | |
ohair@91 | 153 | <!-- Populate drop_included area. --> |
ohair@91 | 154 | <target name="drop_included" |
ohair@91 | 155 | depends="clobber" |
ohair@91 | 156 | description="Populate all source file directories"> |
ohair@91 | 157 | <delete dir="${drop.included.dir}"/> |
ohair@91 | 158 | <antcall target="source"/> |
ohair@91 | 159 | <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/> |
ohair@91 | 160 | <delete dir="${drop.included.dir}/bundles"/> |
ohair@91 | 161 | </target> |
ohair@91 | 162 | |
ohair@85 | 163 | <!-- Clean up compiled files. --> |
ohair@85 | 164 | <target name="clean" |
ohair@85 | 165 | description="Delete all generated files"> |
ohair@85 | 166 | <delete dir="${build.dir}"/> |
ohair@85 | 167 | <delete dir="${dist.dir}"/> |
ohair@85 | 168 | </target> |
ohair@85 | 169 | |
ohair@85 | 170 | <!-- Clean up compiled files and all imported source files. --> |
ohair@85 | 171 | <target name="clobber" |
ohair@85 | 172 | depends="clean" |
ohair@85 | 173 | description="Delete all generated files, including imported sources"> |
ohair@91 | 174 | <delete dir="${drop.expanded.dir}"/> |
ohair@85 | 175 | </target> |
ohair@85 | 176 | |
ohair@85 | 177 | <target name="-banner"> |
ohair@85 | 178 | <echo message="+---------------------------------------+"/> |
ohair@85 | 179 | <echo message="+ Starting ant project ${ant.project.name} +"/> |
ohair@85 | 180 | <echo message="+---------------------------------------+"/> |
ohair@85 | 181 | </target> |
ohair@85 | 182 | |
ohair@85 | 183 | <!-- Do everything but test. --> |
ohair@85 | 184 | <target name="all" |
ohair@85 | 185 | depends="-banner, sanity, dist" |
ohair@85 | 186 | description="Build everything."> |
ohair@85 | 187 | <echo message="+---------------------------------------+"/> |
ohair@85 | 188 | <echo message="+ Finishing ant project ${ant.project.name}"/> |
ohair@85 | 189 | <echo message="+---------------------------------------+"/> |
duke@1 | 190 | </target> |
duke@1 | 191 | |
duke@1 | 192 | </project> |