make/netbeans/common/shared.xml

Thu, 16 Oct 2008 18:07:37 +0100

author
mcimadamore
date
Thu, 16 Oct 2008 18:07:37 +0100
changeset 146
6fcc8de719f5
parent 1
9a66ca7c79fa
permissions
-rw-r--r--

6760226: test/tools/javap/T6622260.java fails with specific locale settings
Summary: Changed the regression test in order to make it more robust w.r.t. to locale settings
Reviewed-by: jjg

duke@1 1 <?xml version="1.0" encoding="UTF-8"?>
duke@1 2 <!--
duke@1 3 Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
duke@1 4
duke@1 5 Redistribution and use in source and binary forms, with or without
duke@1 6 modification, are permitted provided that the following conditions
duke@1 7 are met:
duke@1 8
duke@1 9 - Redistributions of source code must retain the above copyright
duke@1 10 notice, this list of conditions and the following disclaimer.
duke@1 11
duke@1 12 - Redistributions in binary form must reproduce the above copyright
duke@1 13 notice, this list of conditions and the following disclaimer in the
duke@1 14 documentation and/or other materials provided with the distribution.
duke@1 15
duke@1 16 - Neither the name of Sun Microsystems nor the names of its
duke@1 17 contributors may be used to endorse or promote products derived
duke@1 18 from this software without specific prior written permission.
duke@1 19
duke@1 20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
duke@1 21 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
duke@1 22 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
duke@1 23 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
duke@1 24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
duke@1 25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
duke@1 26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
duke@1 27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
duke@1 28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
duke@1 29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
duke@1 30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
duke@1 31 -->
duke@1 32
duke@1 33 <!--
duke@1 34 The file contains targets for NetBeans action that are shared across
duke@1 35 all langtools projects.
duke@1 36 -->
duke@1 37
duke@1 38 <project name="shared" default="build" basedir="../../..">
duke@1 39 <!--
duke@1 40 Instead of importing the main build file, we could call it when needed.
duke@1 41 That would reduce the list of Ant targets that get displayed for this
duke@1 42 file, but it also complicates the interface between the project build
duke@1 43 file and the main build file. For example, some imported targets
duke@1 44 would have to be reclared, properties would have to be restructured,
duke@1 45 and it would be harder to run results (e.g. in properties) from nested
duke@1 46 targets.
duke@1 47 -->
duke@1 48 <import file="../../build.xml"/>
duke@1 49
duke@1 50 <property name="tool.mainclass" value="com.sun.tools.${tool.name}.Main"/>
duke@1 51 <property name="tool.default.args" value="-version"/>
duke@1 52
duke@1 53 <!-- compile a single file -->
duke@1 54
duke@1 55 <!-- for compile-single, etc, we might want different targets for
duke@1 56 javac and not javac, because of bootstrap issues -->
duke@1 57 <target name="compile-single" depends="build-bootstrap-javac">
duke@1 58 <fail unless="includes">Must set property 'includes'</fail>
duke@1 59 <javac fork="true" executable="${build.bootstrap.dir}/bin/javac"
duke@1 60 srcdir="${src.classes.dir}"
duke@1 61 destdir="${build.classes.dir}"
duke@1 62 includes="${includes}"
duke@1 63 sourcepath=""
duke@1 64 includeAntRuntime="no"
duke@1 65 target="${target}"
duke@1 66 debug="${javac.debug}"
duke@1 67 debuglevel="${javac.debuglevel}"/>
duke@1 68 </target>
duke@1 69
duke@1 70 <!-- run tool -->
duke@1 71
duke@1 72 <target name="run" depends="build,-def-run" description="run ${tool.description}">
duke@1 73 <run/>
duke@1 74 </target>
duke@1 75
duke@1 76 <!-- run a selected class -->
duke@1 77
duke@1 78 <target name="run-single" depends="-def-run">
duke@1 79 <fail unless="run.classname">Must set property 'run.classname'</fail>
duke@1 80 <run name="${run.classname}" mainclass="${run.classname}" default.args=""/>
duke@1 81 </target>
duke@1 82
duke@1 83 <!-- run jtreg tests, and display results in NetBeans -->
duke@1 84
duke@1 85 <target name="-jtreg-nb" depends="-jtreg" if="netbeans.home" unless="jtreg.passed">
duke@1 86 <nbbrowse file="${jtreg.report}/report.html"/>
duke@1 87 <fail>Some tests failed; see report for details.</fail>
duke@1 88 </target>
duke@1 89
duke@1 90 <!-- debug tool in NetBeans -->
duke@1 91
duke@1 92 <target name="-debug-nb" depends="build,-def-run,-def-start-debugger" if="netbeans.home">
duke@1 93 <start-debugger/>
duke@1 94 <run jpda.jvmargs="${jpda.jvmargs}"/>
duke@1 95 </target>
duke@1 96
duke@1 97 <!-- debug a selected class -->
duke@1 98
duke@1 99 <target name="debug-single-nb" depends="-def-start-debugger,-def-run">
duke@1 100 <fail unless="debug.classname">Must set property 'debug.classname'</fail>
duke@1 101 <start-debugger/>
duke@1 102 <run name="${debug.classname}" mainclass="${debug.classname}" default.args=""
duke@1 103 jpda.jvmargs="${jpda.jvmargs}"/>
duke@1 104 </target>
duke@1 105
duke@1 106 <!-- debug a jtreg test -->
duke@1 107
duke@1 108 <target name="debug-jtreg-nb" depends="-def-start-debugger,-def-jtreg">
duke@1 109 <fail unless="jtreg.tests">Must set property 'jtreg.tests'</fail>
duke@1 110 <start-debugger/>
duke@1 111 <jtreg-tool name="${tool.name}" samevm="false" tests="${jtreg.tests}"
duke@1 112 jpda.jvmargs="${jpda.jvmargs}"/>
duke@1 113 </target>
duke@1 114
duke@1 115 <!-- update a class being debugged -->
duke@1 116
duke@1 117 <target name="debug-fix">
duke@1 118 <fail unless="class">Must set property 'class'</fail>
duke@1 119 <antcall target="compile-single">
duke@1 120 <param name="includes" value="${class}.java"/>
duke@1 121 </antcall>
duke@1 122 <nbjpdareload>
duke@1 123 <fileset dir="${build.classes.dir}">
duke@1 124 <include name="${class}.class"/>
duke@1 125 </fileset>
duke@1 126 </nbjpdareload>
duke@1 127 </target>
duke@1 128
duke@1 129
duke@1 130 <!-- create javadoc documentation -->
duke@1 131
duke@1 132 <target name="-javadoc-nb" depends="-javadoc" if="netbeans.home">
duke@1 133 <nbbrowse file="${build.javadoc.dir}/${tool.name}/index.html"/>
duke@1 134 </target>
duke@1 135
duke@1 136 <!-- default target for those projects that don't have public API docs;
duke@1 137 override as needed for projects with public API docs.-->
duke@1 138 <target name="-javadoc"/>
duke@1 139
duke@1 140 <!-- macro to run a tool or selected class - used by run* and debug* tasks -->
duke@1 141
duke@1 142 <target name="-def-run">
duke@1 143 <macrodef name="run">
duke@1 144 <attribute name="name" default="${tool.name}"/>
duke@1 145 <attribute name="mainclass" default="${tool.mainclass}"/>
duke@1 146 <attribute name="default.args" default="${tool.default.args}"/>
duke@1 147 <attribute name="jpda.jvmargs" default=""/>
duke@1 148 <sequential>
duke@1 149 <input addproperty="run.args" message="Run @{name} with options" defaultvalue="@{default.args}"/>
duke@1 150 <java fork="true" jvm="${target.java}" classname="@{mainclass}">
duke@1 151 <bootclasspath>
duke@1 152 <pathelement location="${build.classes.dir}"/>
duke@1 153 <pathelement location="${target.java.home}/jre/lib/rt.jar"/>
duke@1 154 </bootclasspath>
duke@1 155 <jvmarg line="@{jpda.jvmargs}"/>
duke@1 156 <arg line="${run.args}"/>
duke@1 157 </java>
duke@1 158 </sequential>
duke@1 159 </macrodef>
duke@1 160 </target>
duke@1 161
duke@1 162 <!-- macro to start the debugger and set a property containg the args needed by the run task -->
duke@1 163
duke@1 164 <target name="-def-start-debugger" if="netbeans.home">
duke@1 165 <macrodef name="start-debugger">
duke@1 166 <attribute name="jpda.jvmargs.property" default="jpda.jvmargs"/>
duke@1 167 <sequential>
duke@1 168 <nbjpdastart name="${ant.project.name}" addressproperty="jpda.address" transport="dt_socket">
duke@1 169 <bootclasspath>
duke@1 170 <pathelement location="${build.classes.dir}"/>
duke@1 171 <pathelement location="${target.java.home}/jre/lib/rt.jar"/>
duke@1 172 </bootclasspath>
duke@1 173 <sourcepath>
duke@1 174 <pathelement location="${src.classes.dir}"/>
duke@1 175 </sourcepath>
duke@1 176 </nbjpdastart>
duke@1 177 <property
duke@1 178 name="@{jpda.jvmargs.property}"
duke@1 179 value="-Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,address=${jpda.address}"
duke@1 180 />
duke@1 181 </sequential>
duke@1 182 </macrodef>
duke@1 183 </target>
duke@1 184
duke@1 185
duke@1 186 </project>

mercurial