0N/A<?xml version="1.0" encoding="UTF-8"?>
0N/A
0N/A<!--
2362N/A Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
0N/A
0N/A Redistribution and use in source and binary forms, with or without
0N/A modification, are permitted provided that the following conditions
0N/A are met:
0N/A
0N/A - Redistributions of source code must retain the above copyright
0N/A notice, this list of conditions and the following disclaimer.
0N/A
0N/A - Redistributions in binary form must reproduce the above copyright
0N/A notice, this list of conditions and the following disclaimer in the
0N/A documentation and/or other materials provided with the distribution.
0N/A
2362N/A - Neither the name of Oracle nor the names of its
0N/A contributors may be used to endorse or promote products derived
0N/A from this software without specific prior written permission.
0N/A
0N/A THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
0N/A IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
0N/A THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
0N/A PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
0N/A CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
0N/A EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
0N/A PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
0N/A PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
0N/A LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
0N/A NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0N/A SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0N/A-->
0N/A
0N/A<project name="shared" basedir="..">
0N/A
0N/A <import file="make.xml"/>
0N/A
0N/A <target name="-tstamp">
0N/A <tstamp>
0N/A <format property="build.time" pattern="MM/dd/yyyy hh:mm aa"/>
0N/A <format property="build.fullversion.time" pattern="MM/dd/yyyy_HH_mm"/>
0N/A </tstamp>
0N/A </target>
0N/A
0N/A <target name="-first-init" depends="-tstamp">
0N/A <mkdir dir="${user.home}/.openjdk"/>
0N/A <property name="workspace-user-build.properties" location="nbproject/private/build.properties"/>
0N/A <property file="${workspace-user-build.properties}"/>
0N/A <property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
0N/A <property name="user-build.properties" location="${user.home}/.openjdk/build.properties"/>
0N/A <property file="${user-build.properties}"/>
0N/A <property file="${basedir}/build.properties"/>
0N/A <property environment="env."/>
0N/A </target>
0N/A <target name="-warn-about-bootstrap.jdk" depends="-first-init" unless="bootstrap.jdk">
0N/A <property name="fallback.jdk" location="${java.home}/.."/>
0N/A <echo level="warning">Warning: falling back to building against ${fallback.jdk}</echo>
0N/A <echo level="warning">Please define bootstrap.jdk=.../recent/jdk7/snapshot in ${user-build.properties} or ${workspace-user-build.properties}</echo>
0N/A </target>
0N/A <target name="-pre-init">
0N/A <!-- Invoked before -first-init. -->
0N/A <!-- Empty placeholder for easier customization. -->
0N/A <!-- You can override this target in the /build.xml file. -->
0N/A </target>
0N/A <target name="-post-init">
0N/A <!-- Invoked after -project-init. -->
0N/A <!-- Empty placeholder for easier customization. -->
0N/A <!-- You can override this target in the /build.xml file. -->
0N/A </target>
0N/A <target name="-init" description="Initial configuration used by everything else." depends="-pre-init,-first-init,-project-init,-post-init"/>
0N/A <target name="-project-init" depends="-warn-about-bootstrap.jdk">
0N/A <property name="root" location="../../.."/>
0N/A <property file="/common/architectures/name-${os.name}.properties"/>
0N/A <property name="platform" value="windows"/>
0N/A <property file="/common/architectures/arch-${os.arch}.properties"/>
0N/A <property name="arch" value="${os.arch}"/>
0N/A <echo level="verbose">System configuration claims architecture is ${platform}-${arch}</echo>
0N/A <property name="build.dir" location="${root}/build/${platform}-${arch}"/>
0N/A <property name="bin.dir" location="${build.dir}/bin"/>
0N/A <property name="make.dir" location="${root}/make"/>
0N/A <property name="gensrc.dir" location="${build.dir}/gensrc"/>
0N/A <property name="classes.dir" location="${build.dir}/classes"/>
0N/A <property name="jtreg.dir" location="${build.dir}/jtreg/${ant.project.name}"/>
0N/A <property name="dist.dir" value="${root}/dist"/>
0N/A <property name="includes" value="(nothing)"/>
0N/A <property name="excludes" value=""/>
0N/A <property name="javadoc.dir" location="${build.dir}/javadoc/${ant.project.name}"/>
0N/A <condition property="os.linux">
0N/A <os name="linux"/>
0N/A </condition>
0N/A <condition property="os.solaris">
0N/A <os name="SunOS"/>
0N/A </condition>
0N/A <condition property="osfamily.unix">
0N/A <os family="unix"/>
0N/A </condition>
0N/A <condition property="os.windows">
0N/A <os family="windows"/>
0N/A </condition>
0N/A <condition property="platform.src.dir" value="${root}/src/solaris/classes">
0N/A <os family="unix"/>
0N/A </condition>
0N/A <condition property="platform.src.dir" value="${root}/src/windows/classes">
0N/A <os family="windows"/>
0N/A </condition>
0N/A <property name="share.src.dir" value="${root}/src/share/classes"/>
0N/A <property name="bootstrap.jdk" location="${fallback.jdk}"/>
0N/A <!-- XXX ensure that bootstrap.jdk meets some minimum version requirements (TBD) -->
0N/A <condition property="bootstrap.javac" value="${bootstrap.jdk}/bin/javac">
0N/A <available file="${bootstrap.jdk}/bin/javac"/>
0N/A </condition>
0N/A <condition property="bootstrap.javac" value="${bootstrap.jdk}\bin\javac.exe">
0N/A <available file="${bootstrap.jdk}\bin\javac.exe"/>
0N/A </condition>
0N/A <fail unless="bootstrap.javac">${bootstrap.jdk} does not appear to be a functional JDK; no javac found.</fail>
0N/A <property name="javac.options" value="-Xlint"/> <!-- default, can be overridden per user or per project -->
0N/A <property name="javac.debug" value="true"/> <!-- default, can be overridden per user or per project -->
0N/A <property name="javac.debuglevel" value="lines,vars,source"/> <!-- default, can be overridden per user or per project -->
0N/A <macrodef name="jdk-javac">
0N/A <attribute name="srcdir"/>
0N/A <attribute name="includes" default="${includes}"/>
0N/A <attribute name="excludes" default="${excludes}"/>
0N/A <attribute name="classesdir" default="${classes.dir}"/>
0N/A <sequential>
0N/A <mkdir dir="@{classesdir}"/>
0N/A <javac srcdir="@{srcdir}" includes="@{includes}" excludes="@{excludes}" sourcepath=""
0N/A destdir="@{classesdir}" fork="true" executable="${bootstrap.javac}"
0N/A debug="${javac.debug}" debuglevel="${javac.debuglevel}">
0N/A <compilerarg value="-source"/>
0N/A <compilerarg value="1.5"/>
0N/A <compilerarg value="-target"/>
0N/A <compilerarg value="1.6"/> <!-- for usability of JDK 6 as snapshot; change to 1.7 when JSR 294 put back -->
0N/A <!-- Mandatory for compiling partial JDK sources against a snapshot; should NEVER be used for any other purpose: -->
0N/A <compilerarg value="-XDignore.symbol.file=true"/>
0N/A <compilerarg line="${javac.options}"/>
0N/A </javac>
0N/A </sequential>
0N/A </macrodef>
0N/A <available property="have.closed.src" file="${root}/src/closed/share/classes" type="dir"/>
0N/A </target>
0N/A
0N/A <target name="-pre-compile">
0N/A <!-- Empty placeholder for easier customization. -->
0N/A <!-- You can override this target in the /build.xml file. -->
0N/A </target>
0N/A <target name="-post-compile">
0N/A <!-- Empty placeholder for easier customization. -->
0N/A <!-- You can override this target in the /build.xml file. -->
0N/A </target>
0N/A
0N/A <target name="build" depends="-init,-pre-compile,-build-ant,-build-make,-post-compile" description="Build sources."/>
0N/A <target name="-do-build-ant">
0N/A <depend srcdir="${share.src.dir}:${platform.src.dir}:${root}/src/closed/share/classes:${gensrc.dir}" destdir="${classes.dir}" cache="${build.dir}/depcache" includes="${includes}" excludes="${excludes}"/>
0N/A <mkdir dir="${gensrc.dir}"/>
0N/A <jdk-javac srcdir="${share.src.dir}:${platform.src.dir}:${gensrc.dir}"/>
0N/A <property name="copy.excludes" value="**/*.java,**/package.html,**/doc-files/"/>
0N/A <copy todir="${classes.dir}">
0N/A <fileset dir="${share.src.dir}" includes="${includes}" excludes="${excludes},${copy.excludes}"/>
0N/A <fileset dir="${platform.src.dir}" includes="${includes}" excludes="${excludes},${copy.excludes}"/>
0N/A </copy>
0N/A <antcall target="-maybe-do-build-ant-closed"/>
0N/A </target>
0N/A <target name="-maybe-do-build-ant-closed" if="have.closed.src">
0N/A <jdk-javac srcdir="${root}/src/closed/share/classes"/>
0N/A <copy todir="${classes.dir}">
0N/A <fileset dir="${root}/src/closed/share/classes" includes="${includes}" excludes="${excludes},${copy.excludes}"/>
0N/A </copy>
0N/A </target>
0N/A <target name="-build-ant" depends="-init" unless="use.make">
0N/A <antcall target="-do-build-ant"/>
0N/A </target>
0N/A <target name="-build-make" depends="-init" if="use.make"> <!-- override me to call <make-run> -->
0N/A <echo level="info">No make target defined for this project; falling back to simple Java build</echo>
0N/A <antcall target="-do-build-ant"/>
0N/A </target>
0N/A
0N/A <target name="clean" depends="-init,-clean-docs-tests,-clean-ant,-clean-make" description="Clean build products."/>
0N/A <target name="-do-clean-ant">
0N/A <!-- XXX first s/\.java/.class/g in includes and excludes! -->
0N/A <delete dir="${classes.dir}" includes="${includes}" excludes="${excludes}" includeemptydirs="true"/>
0N/A <delete dir="${gensrc.dir}" includes="${includes}" excludes="${excludes}" includeemptydirs="true"/>
0N/A <delete dir="${build.dir}/depcache"/>
0N/A </target>
0N/A <target name="-clean-docs-tests">
0N/A <delete dir="${javadoc.dir}" includeemptydirs="true"/>
0N/A <delete dir="${jtreg.dir}" includeemptydirs="true"/>
0N/A </target>
0N/A <target name="-clean-ant" depends="-init" unless="use.make">
0N/A <antcall target="-do-clean-ant"/>
0N/A </target>
0N/A <target name="-clean-make" depends="-init" if="use.make"> <!-- override me to call <make-run> -->
0N/A <echo level="info">No make clean target defined for this project; falling back to simple Java clean</echo>
0N/A <antcall target="-do-clean-ant"/>
0N/A </target>
0N/A
0N/A <target name="compile-single" depends="-init">
0N/A <fail unless="srcdir">Must set property 'srcdir'</fail>
0N/A <fail unless="includes">Must set property 'includes'</fail>
0N/A <jdk-javac srcdir="${srcdir}" includes="${includes}" excludes=""/>
0N/A </target>
0N/A <target name="debug-fix" depends="-init" if="netbeans.home">
0N/A <fail unless="class">Must set property 'class'</fail>
0N/A <antcall target="compile-single">
0N/A <param name="includes" value="${class}.java"/>
0N/A </antcall>
0N/A <nbjpdareload>
0N/A <fileset dir="${classes.dir}">
0N/A <include name="${class}.class"/>
0N/A </fileset>
0N/A </nbjpdareload>
0N/A </target>
0N/A
0N/A <target name="-taskdef-jtreg" depends="-init" unless="jtreg.defined">
0N/A <fail message="Cannot locate jtreg: please set jtreg.home to its location">
0N/A <condition>
0N/A <not>
0N/A <isset property="jtreg.home"/>
0N/A </not>
0N/A </condition>
0N/A </fail>
0N/A <fail message="jtreg is not installed in ${jtreg.home}">
0N/A <condition>
0N/A <not>
0N/A <and>
0N/A <available file="${jtreg.home}/lib/jtreg.jar"/>
0N/A <available file="${jtreg.home}/lib/javatest.jar"/>
0N/A </and>
0N/A </not>
0N/A </condition>
0N/A </fail>
0N/A <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
0N/A <classpath>
0N/A <pathelement location="${jtreg.home}/lib/jtreg.jar"/>
0N/A <pathelement location="${jtreg.home}/lib/javatest.jar"/>
0N/A </classpath>
0N/A </taskdef>
0N/A <property name="jtreg.defined" value="true"/>
0N/A </target>
0N/A <target name="-check-tests-defined" unless="jtreg.tests">
0N/A <fail>You must define jtreg.tests to select some tests to run.</fail>
0N/A </target>
0N/A <target name="-jtreg-setup">
0N/A <property name="jtreg.vm.options" value=""/> <!-- default, can be overridden per user or per project -->
0N/A <property name="jtreg.options" value=""/> <!-- default, can be overridden per user or per project -->
0N/A <property name="jtreg.samevm" value="false"/> <!-- default, can be overridden per user or per project -->
0N/A </target>
0N/A <target name="-jtreg-ant" unless="use.make">
0N/A <jtreg dir="${root}/test" samevm="${jtreg.samevm}" verbose="summary"
0N/A jdk="${bootstrap.jdk}"
0N/A failonerror="false" resultproperty="jtreg.result"
0N/A javacoptions="-g"
0N/A vmoptions="-Xbootclasspath/p:${classes.dir} ${jtreg.vm.options}"
0N/A reportDir="${jtreg.dir}/JTreport"
0N/A workDir="${jtreg.dir}/JTwork"
0N/A includes="${jtreg.tests}">
0N/A <arg line="${jtreg.options}"/>
0N/A </jtreg>
0N/A </target>
0N/A <target name="-jtreg-make" if="use.make">
0N/A <jtreg dir="${root}/test" samevm="${jtreg.samevm}" verbose="summary"
0N/A failonerror="false" resultproperty="jtreg.result"
0N/A jdk="${build.dir}"
0N/A vmoptions="${jtreg.vm.options}"
0N/A javacoptions="-g"
0N/A reportDir="${jtreg.dir}/JTreport"
0N/A workDir="${jtreg.dir}/JTwork"
0N/A includes="${jtreg.tests}">
0N/A <arg line="${jtreg.options}"/>
0N/A </jtreg>
0N/A </target>
0N/A <target name="-pre-jtreg">
0N/A <!-- Empty placeholder for easier customization. -->
0N/A <!-- You can override this target in the /build.xml file. -->
0N/A </target>
0N/A <target name="-post-jtreg">
0N/A <!-- Empty placeholder for easier customization. -->
0N/A <!-- You can override this target in the /build.xml file. -->
0N/A </target>
0N/A <target name="-jtreg" depends="-init,-pre-jtreg,-taskdef-jtreg,-check-tests-defined,-jtreg-setup,-jtreg-make,-jtreg-ant,-post-jtreg">
0N/A <property name="jtreg.report" location="${jtreg.dir}/JTreport/report.html"/>
0N/A <condition property="jtreg.passed">
0N/A <equals arg1="${jtreg.result}" arg2="0"/>
0N/A </condition>
0N/A </target>
0N/A <target name="test" depends="jtreg"/> <!-- Allow use of existing finger muscle memory from command line. -->
0N/A <target name="jtreg" depends="-jtreg" description="Run jtreg-based tests." unless="jtreg.passed">
0N/A <fail>${jtreg.report}: some tests failed.</fail>
0N/A </target>
0N/A <target name="jtreg-nb" depends="-jtreg" if="netbeans.home" unless="jtreg.passed">
0N/A <makeurl file="${jtreg.report}" property="jtreg.report.url"/>
0N/A <nbbrowse url="${jtreg.report.url}#Results"/>
0N/A <fail>Some tests failed; see report for details.</fail>
0N/A </target>
0N/A <target name="jtreg-debug-nb" depends="-init" if="netbeans.home">
0N/A <!-- No package decls -> "source root" is immediately containing dir -->
0N/A <dirname file="${root}/test/${jtreg.tests}" property="test.dir"/>
0N/A <nbjpdastart addressproperty="jpda.address" name="${ant.project.name}" transport="dt_socket">
0N/A <bootclasspath>
0N/A <pathelement location="${classes.dir}"/>
0N/A <pathelement location="${bootstrap.jdk}/jre/lib/rt.jar"/>
0N/A </bootclasspath>
0N/A <classpath>
0N/A <pathelement location="${jtreg.dir}/JTwork/classes"/>
0N/A </classpath>
0N/A <sourcepath>
0N/A <pathelement location="${share.src.dir}"/>
0N/A <pathelement location="${platform.src.dir}"/>
0N/A <pathelement location="${root}/src/closed/share/classes"/>
0N/A <pathelement location="${test.dir}"/>
0N/A </sourcepath>
0N/A </nbjpdastart>
0N/A <antcall target="-jtreg">
0N/A <param name="jtreg.vm.options" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
0N/A </antcall>
0N/A </target>
0N/A
0N/A <target name="debug" depends="-init" if="netbeans.home">
0N/A <!-- No package decls -> "source root" is immediately containing dir -->
0N/A <dirname file="${root}/test/${jtreg.tests}" property="test.dir"/>
0N/A <nbjpdastart addressproperty="jpda.address" name="${ant.project.name}" transport="dt_socket">
0N/A <bootclasspath>
0N/A <pathelement location="${classes.dir}"/>
0N/A <pathelement location="${bootstrap.jdk}/jre/lib/rt.jar"/>
0N/A </bootclasspath>
0N/A <sourcepath>
0N/A <pathelement location="${share.src.dir}"/>
0N/A <pathelement location="${platform.src.dir}"/>
0N/A <pathelement location="${root}/src/closed/share/classes"/>
0N/A <pathelement location="${test.dir}"/>
0N/A </sourcepath>
0N/A </nbjpdastart>
0N/A <antcall target="run">
0N/A <param name="jvm.args" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
0N/A </antcall>
0N/A </target>
0N/A
0N/A <target name="javadoc" depends="-init" description="Build basic Javadoc for public packages.">
0N/A <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
0N/A <!-- Note: even with this default value, includes/excludes
0N/A from share.src.dir get javadoc'd; see packageset below -->
0N/A <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
0N/A <javadoc destdir="${javadoc.dir}" source="1.5"
0N/A windowtitle="UNOFFICIAL" failonerror="true" use="true"
0N/A author="false" version="false"
0N/A packagenames="${javadoc.packagenames}">
0N/A <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
0N/A <arg line="${javadoc.options}"/>
0N/A <bootclasspath>
0N/A <path location="${bootstrap.jdk}/jre/lib/rt.jar"/>
0N/A <path location="${classes.dir}"/>
0N/A </bootclasspath>
0N/A <sourcepath>
0N/A <pathelement location="${share.src.dir}"/>
0N/A <pathelement location="${platform.src.dir}"/>
0N/A <pathelement location="${root}/src/closed/share/classes"/>
0N/A <pathelement location="${root}/src/share/doc/stub"/>
0N/A </sourcepath>
0N/A <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
0N/A <!-- means that {@link some.package} will not work, which is no good. -->
0N/A <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
0N/A <!-- which also causes duplicates in the class index for included files.) -->
0N/A <packageset dir="${share.src.dir}" includes="${includes}" excludes="${excludes}">
0N/A <or>
0N/A <filename name="java/"/>
0N/A <filename name="javax/"/>
0N/A <filename name="org/ietf/jgss/"/>
0N/A <filename name="org/omg/"/>
0N/A <filename name="org/w3c/"/>
0N/A <filename name="org/xml/sax/"/>
0N/A </or>
0N/A </packageset>
0N/A </javadoc>
0N/A </target>
0N/A <target name="javadoc-nb" depends="javadoc" if="netbeans.home">
0N/A <nbbrowse file="${javadoc.dir}/index.html"/>
0N/A </target>
0N/A
0N/A</project>