make/jdk/netbeans/common/shared.xml
author sundar
Tue, 20 Feb 2018 15:25:40 +0530
changeset 48917 37beaca49e63
parent 47216 71c04702a3d5
permissions -rw-r--r--
8194922: jlink --exclude-resources should never exclude module-info.class Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
<!--
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 18163
diff changeset
     4
 Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 Redistribution and use in source and binary forms, with or without
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 modification, are permitted provided that the following conditions
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 are met:
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
   - Redistributions of source code must retain the above copyright
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
     notice, this list of conditions and the following disclaimer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
   - Redistributions in binary form must reproduce the above copyright
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
     notice, this list of conditions and the following disclaimer in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
     documentation and/or other materials provided with the distribution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    17
   - Neither the name of Oracle nor the names of its
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
     contributors may be used to endorse or promote products derived
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
     from this software without specific prior written permission.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
-->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
<project name="shared" basedir="..">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    <import file="make.xml"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    <target name="-tstamp">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
        <tstamp>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
            <format property="build.time" pattern="MM/dd/yyyy hh:mm aa"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
            <format property="build.fullversion.time" pattern="MM/dd/yyyy_HH_mm"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
        </tstamp>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    <target name="-first-init" depends="-tstamp">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
        <mkdir dir="${user.home}/.openjdk"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        <property name="workspace-user-build.properties" location="nbproject/private/build.properties"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        <property file="${workspace-user-build.properties}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        <property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        <property name="user-build.properties" location="${user.home}/.openjdk/build.properties"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        <property file="${user-build.properties}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        <property file="${basedir}/build.properties"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        <property environment="env."/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    <target name="-warn-about-bootstrap.jdk" depends="-first-init" unless="bootstrap.jdk">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        <property name="fallback.jdk" location="${java.home}/.."/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        <echo level="warning">Warning: falling back to building against ${fallback.jdk}</echo>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        <echo level="warning">Please define bootstrap.jdk=.../recent/jdk7/snapshot in ${user-build.properties} or ${workspace-user-build.properties}</echo>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    <target name="-pre-init">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        <!-- Invoked before -first-init. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        <!-- Empty placeholder for easier customization. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        <!-- You can override this target in the ../build.xml file. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    <target name="-post-init">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        <!-- Invoked after -project-init. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        <!-- Empty placeholder for easier customization. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        <!-- You can override this target in the ../build.xml file. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    <target name="-init" description="Initial configuration used by everything else." depends="-pre-init,-first-init,-project-init,-post-init"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    <target name="-project-init" depends="-warn-about-bootstrap.jdk">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        <property name="root" location="../../.."/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        <property file="../common/architectures/name-${os.name}.properties"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        <property name="platform" value="windows"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        <property file="../common/architectures/arch-${os.arch}.properties"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        <property name="arch" value="${os.arch}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        <echo level="verbose">System configuration claims architecture is ${platform}-${arch}</echo>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        <property name="build.dir" location="${root}/build/${platform}-${arch}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        <property name="bin.dir" location="${build.dir}/bin"/>
18163
c0b32e884b70 8016213: Convert j2se NetBeans project to use top-level make targets
mduigou
parents: 17171
diff changeset
    80
        <property name="make.dir" location="${root}/make"/> <!-- this is old build make files! -->
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        <property name="gensrc.dir" location="${build.dir}/gensrc"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        <property name="classes.dir" location="${build.dir}/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        <property name="jtreg.dir" location="${build.dir}/jtreg/${ant.project.name}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        <property name="dist.dir" value="${root}/dist"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        <property name="includes" value="(nothing)"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        <property name="excludes" value=""/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        <property name="javadoc.dir" location="${build.dir}/javadoc/${ant.project.name}"/>
15517
588eec59872b 8006709: Add minimal support of MacOSX platform for NetBeans Projects
mduigou
parents: 5506
diff changeset
    88
        <condition property="os.macosx">
588eec59872b 8006709: Add minimal support of MacOSX platform for NetBeans Projects
mduigou
parents: 5506
diff changeset
    89
            <os family="mac"/>
588eec59872b 8006709: Add minimal support of MacOSX platform for NetBeans Projects
mduigou
parents: 5506
diff changeset
    90
        </condition>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        <condition property="os.linux">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            <os name="linux"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        <condition property="os.solaris">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            <os name="SunOS"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        <condition property="osfamily.unix">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            <os family="unix"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        <condition property="os.windows">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            <os family="windows"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        <condition property="platform.src.dir" value="${root}/src/solaris/classes">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
            <os family="unix"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        <condition property="platform.src.dir" value="${root}/src/windows/classes">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            <os family="windows"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        <property name="share.src.dir" value="${root}/src/share/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        <property name="bootstrap.jdk" location="${fallback.jdk}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        <!-- XXX ensure that bootstrap.jdk meets some minimum version requirements (TBD) -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        <condition property="bootstrap.javac" value="${bootstrap.jdk}/bin/javac">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            <available file="${bootstrap.jdk}/bin/javac"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        <condition property="bootstrap.javac" value="${bootstrap.jdk}\bin\javac.exe">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            <available file="${bootstrap.jdk}\bin\javac.exe"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        <fail unless="bootstrap.javac">${bootstrap.jdk} does not appear to be a functional JDK; no javac found.</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        <property name="javac.options" value="-Xlint"/> <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        <property name="javac.debug" value="true"/>  <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        <property name="javac.debuglevel" value="lines,vars,source"/>  <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        <macrodef name="jdk-javac">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            <attribute name="srcdir"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            <attribute name="includes" default="${includes}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            <attribute name="excludes" default="${excludes}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            <attribute name="classesdir" default="${classes.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            <sequential>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
                <mkdir dir="@{classesdir}"/>
18163
c0b32e884b70 8016213: Convert j2se NetBeans project to use top-level make targets
mduigou
parents: 17171
diff changeset
   129
                <javac srcdir="@{srcdir}" includes="@{includes}" excludes="@{excludes}" sourcepath=""
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
                    destdir="@{classesdir}" fork="true" executable="${bootstrap.javac}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                    debug="${javac.debug}" debuglevel="${javac.debuglevel}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                    <!-- Mandatory for compiling partial JDK sources against a snapshot; should NEVER be used for any other purpose: -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                    <compilerarg value="-XDignore.symbol.file=true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                    <compilerarg line="${javac.options}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                </javac>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            </sequential>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        </macrodef>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        <available property="have.closed.src" file="${root}/src/closed/share/classes" type="dir"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    <target name="-pre-compile">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        <!-- Empty placeholder for easier customization. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        <!-- You can override this target in the ../build.xml file. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    <target name="-post-compile">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        <!-- Empty placeholder for easier customization. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        <!-- You can override this target in the ../build.xml file. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    </target>
18163
c0b32e884b70 8016213: Convert j2se NetBeans project to use top-level make targets
mduigou
parents: 17171
diff changeset
   149
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    <target name="build" depends="-init,-pre-compile,-build-ant,-build-make,-post-compile" description="Build sources."/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    <target name="-do-build-ant">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        <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}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        <mkdir dir="${gensrc.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        <jdk-javac srcdir="${share.src.dir}:${platform.src.dir}:${gensrc.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        <property name="copy.excludes" value="**/*.java,**/package.html,**/doc-files/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        <copy todir="${classes.dir}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
            <fileset dir="${share.src.dir}" includes="${includes}" excludes="${excludes},${copy.excludes}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
            <fileset dir="${platform.src.dir}" includes="${includes}" excludes="${excludes},${copy.excludes}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        </copy>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        <antcall target="-maybe-do-build-ant-closed"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    <target name="-maybe-do-build-ant-closed" if="have.closed.src">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        <jdk-javac srcdir="${root}/src/closed/share/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        <copy todir="${classes.dir}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
            <fileset dir="${root}/src/closed/share/classes" includes="${includes}" excludes="${excludes},${copy.excludes}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        </copy>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    <target name="-build-ant" depends="-init" unless="use.make">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        <antcall target="-do-build-ant"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    <target name="-build-make" depends="-init" if="use.make"> <!-- override me to call <make-run> -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        <echo level="info">No make target defined for this project; falling back to simple Java build</echo>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
        <antcall target="-do-build-ant"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    <target name="clean" depends="-init,-clean-docs-tests,-clean-ant,-clean-make" description="Clean build products."/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    <target name="-do-clean-ant">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        <!-- XXX first s/\.java/.class/g in includes and excludes! -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        <delete dir="${classes.dir}" includes="${includes}" excludes="${excludes}" includeemptydirs="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        <delete dir="${gensrc.dir}" includes="${includes}" excludes="${excludes}" includeemptydirs="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        <delete dir="${build.dir}/depcache"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    <target name="-clean-docs-tests">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        <delete dir="${javadoc.dir}" includeemptydirs="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        <delete dir="${jtreg.dir}" includeemptydirs="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    <target name="-clean-ant" depends="-init" unless="use.make">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        <antcall target="-do-clean-ant"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    <target name="-clean-make" depends="-init" if="use.make"> <!-- override me to call <make-run> -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        <echo level="info">No make clean target defined for this project; falling back to simple Java clean</echo>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        <antcall target="-do-clean-ant"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    <target name="compile-single" depends="-init">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        <fail unless="srcdir">Must set property 'srcdir'</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        <fail unless="includes">Must set property 'includes'</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        <jdk-javac srcdir="${srcdir}" includes="${includes}" excludes=""/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    <target name="debug-fix" depends="-init" if="netbeans.home">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        <fail unless="class">Must set property 'class'</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        <antcall target="compile-single">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            <param name="includes" value="${class}.java"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        </antcall>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        <nbjpdareload>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
            <fileset dir="${classes.dir}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                <include name="${class}.class"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
            </fileset>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        </nbjpdareload>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    <target name="-taskdef-jtreg" depends="-init" unless="jtreg.defined">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        <fail message="Cannot locate jtreg: please set jtreg.home to its location">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
            <condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                <not>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                    <isset property="jtreg.home"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                </not>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
            </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        </fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        <fail message="jtreg is not installed in ${jtreg.home}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
            <condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                <not>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
                    <and>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
                        <available file="${jtreg.home}/lib/jtreg.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
                        <available file="${jtreg.home}/lib/javatest.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                    </and>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
                </not>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
            </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        </fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
            <classpath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
                <pathelement location="${jtreg.home}/lib/jtreg.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
                <pathelement location="${jtreg.home}/lib/javatest.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
            </classpath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        </taskdef>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        <property name="jtreg.defined" value="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    <target name="-check-tests-defined" unless="jtreg.tests">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
        <fail>You must define jtreg.tests to select some tests to run.</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    <target name="-jtreg-setup">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
        <property name="jtreg.vm.options" value=""/> <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        <property name="jtreg.options" value=""/> <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        <property name="jtreg.samevm" value="false"/>  <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    <target name="-jtreg-ant" unless="use.make">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
        <jtreg dir="${root}/test" samevm="${jtreg.samevm}" verbose="summary"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
               jdk="${bootstrap.jdk}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
               failonerror="false" resultproperty="jtreg.result"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
               javacoptions="-g"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
               vmoptions="-Xbootclasspath/p:${classes.dir} ${jtreg.vm.options}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
               reportDir="${jtreg.dir}/JTreport"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
               workDir="${jtreg.dir}/JTwork"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
               includes="${jtreg.tests}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
            <arg line="${jtreg.options}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
        </jtreg>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    <target name="-jtreg-make" if="use.make">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
        <jtreg dir="${root}/test" samevm="${jtreg.samevm}" verbose="summary"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
               failonerror="false" resultproperty="jtreg.result"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
               jdk="${build.dir}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
               vmoptions="${jtreg.vm.options}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
               javacoptions="-g"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
               reportDir="${jtreg.dir}/JTreport"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
               workDir="${jtreg.dir}/JTwork"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
               includes="${jtreg.tests}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
            <arg line="${jtreg.options}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
        </jtreg>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    <target name="-pre-jtreg">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
        <!-- Empty placeholder for easier customization. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
        <!-- You can override this target in the ../build.xml file. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
    <target name="-post-jtreg">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
        <!-- Empty placeholder for easier customization. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
        <!-- You can override this target in the ../build.xml file. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    <target name="-jtreg" depends="-init,-pre-jtreg,-taskdef-jtreg,-check-tests-defined,-jtreg-setup,-jtreg-make,-jtreg-ant,-post-jtreg">
17171
2b182642a97a 8011620: adding free form netbeans project for jdbc to jdk/make/netbeans
lancea
parents: 15517
diff changeset
   279
        <property name="jtreg.report" location="${jtreg.dir}/JTreport/html/report.html"/>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
        <condition property="jtreg.passed">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
            <equals arg1="${jtreg.result}" arg2="0"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
        </condition>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
    <target name="test" depends="jtreg"/> <!-- Allow use of existing finger muscle memory from command line. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    <target name="jtreg" depends="-jtreg" description="Run jtreg-based tests." unless="jtreg.passed">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
        <fail>${jtreg.report}: some tests failed.</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
    <target name="jtreg-nb" depends="-jtreg" if="netbeans.home" unless="jtreg.passed">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
        <makeurl file="${jtreg.report}" property="jtreg.report.url"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
        <nbbrowse url="${jtreg.report.url}#Results"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
        <fail>Some tests failed; see report for details.</fail>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
    <target name="jtreg-debug-nb" depends="-init" if="netbeans.home">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
        <!-- No package decls -> "source root" is immediately containing dir -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
        <dirname file="${root}/test/${jtreg.tests}" property="test.dir"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
        <nbjpdastart addressproperty="jpda.address" name="${ant.project.name}" transport="dt_socket">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
            <bootclasspath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
                <pathelement location="${classes.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
                <pathelement location="${bootstrap.jdk}/jre/lib/rt.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
            </bootclasspath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
            <classpath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
                <pathelement location="${jtreg.dir}/JTwork/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
            </classpath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
            <sourcepath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
                <pathelement location="${share.src.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
                <pathelement location="${platform.src.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
                <pathelement location="${root}/src/closed/share/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
                <pathelement location="${test.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
            </sourcepath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
        </nbjpdastart>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
        <antcall target="-jtreg">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
            <param name="jtreg.vm.options" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        </antcall>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
    </target>
18163
c0b32e884b70 8016213: Convert j2se NetBeans project to use top-level make targets
mduigou
parents: 17171
diff changeset
   315
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
    <target name="debug" depends="-init" if="netbeans.home">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
        <!-- No package decls -> "source root" is immediately containing dir -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
        <dirname file="${root}/test/${jtreg.tests}" property="test.dir"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
        <nbjpdastart addressproperty="jpda.address" name="${ant.project.name}" transport="dt_socket">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
            <bootclasspath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
                <pathelement location="${classes.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
                <pathelement location="${bootstrap.jdk}/jre/lib/rt.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
            </bootclasspath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
            <sourcepath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
                <pathelement location="${share.src.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
                <pathelement location="${platform.src.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
                <pathelement location="${root}/src/closed/share/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
                <pathelement location="${test.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
            </sourcepath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
        </nbjpdastart>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
        <antcall target="run">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
            <param name="jvm.args" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
        </antcall>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
    <target name="javadoc" depends="-init" description="Build basic Javadoc for public packages.">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
        <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
        <!-- Note: even with this default value, includes/excludes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
         from share.src.dir get javadoc'd; see packageset below -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
        <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
17171
2b182642a97a 8011620: adding free form netbeans project for jdbc to jdk/make/netbeans
lancea
parents: 15517
diff changeset
   341
        <javadoc destdir="${javadoc.dir}" source="1.8"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
            windowtitle="UNOFFICIAL" failonerror="true" use="true"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
            author="false" version="false"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
            packagenames="${javadoc.packagenames}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
            <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
            <arg line="${javadoc.options}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
            <bootclasspath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
                <path location="${bootstrap.jdk}/jre/lib/rt.jar"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
                <path location="${classes.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
            </bootclasspath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
            <sourcepath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
                <pathelement location="${share.src.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
                <pathelement location="${platform.src.dir}"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
                <pathelement location="${root}/src/closed/share/classes"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
                <pathelement location="${root}/src/share/doc/stub"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
            </sourcepath>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
            <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
            <!-- means that {@link some.package} will not work, which is no good. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
            <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
            <!-- which also causes duplicates in the class index for included files.) -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
            <packageset dir="${share.src.dir}" includes="${includes}" excludes="${excludes}">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
                <or>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
                    <filename name="java/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
                    <filename name="javax/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
                    <filename name="org/ietf/jgss/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
                    <filename name="org/omg/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
                    <filename name="org/w3c/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
                    <filename name="org/xml/sax/"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
                </or>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
            </packageset>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
        </javadoc>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
    <target name="javadoc-nb" depends="javadoc" if="netbeans.home">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
        <nbbrowse file="${javadoc.dir}/index.html"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
    </target>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
</project>