1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/agent/make/build.xml Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,126 @@ 1.4 +<?xml version="1.0" encoding="UTF-8"?> 1.5 +<!-- 1.6 + Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. 1.7 + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 + 1.9 + This code is free software; you can redistribute it and/or modify it 1.10 + under the terms of the GNU General Public License version 2 only, as 1.11 + published by the Free Software Foundation. 1.12 + 1.13 + This code is distributed in the hope that it will be useful, but WITHOUT 1.14 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.15 + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.16 + version 2 for more details (a copy is included in the LICENSE file that 1.17 + accompanied this code). 1.18 + 1.19 + You should have received a copy of the GNU General Public License version 1.20 + 2 along with this work; if not, write to the Free Software Foundation, 1.21 + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.22 + 1.23 + Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.24 + or visit www.oracle.com if you need additional information or have any 1.25 + questions. 1.26 + 1.27 +--> 1.28 + 1.29 +<!-- This is an Ant project file. Ant is a build tool like make or gnumake which is not 1.30 + dependent on the underlying OS shell. For more information on Ant, please see 1.31 + http://ant.apache.org/ --> 1.32 + 1.33 +<!-- A "project" describes a set of targets that may be requested 1.34 + when Ant is executed. The "default" attribute defines the 1.35 + target which is executed if no specific target is requested, 1.36 + and the "basedir" attribute defines the current working directory 1.37 + from which Ant executes the requested task. This is normally 1.38 + set to the current working directory. 1.39 +--> 1.40 + 1.41 + 1.42 +<project name="HotSpot Serviceability Agent" default="all" basedir="."> 1.43 + 1.44 + <!-- Property Definitions --> 1.45 + 1.46 + <property name="app.name" value="sa"/> 1.47 + <property name="dist.jar" value="${app.name}.jar"/> 1.48 + <property name="classes" value="../build/classes"/> 1.49 + 1.50 +<!-- The "prepare" target is used to construct the deployment home 1.51 + directory structure (if necessary), and to copy in static files 1.52 + as required. In the example below, Ant is instructed to create 1.53 + the deployment directory, copy the contents of the "web/" source 1.54 + hierarchy, and set up the WEB-INF subdirectory appropriately. 1.55 +--> 1.56 + 1.57 + <target name="prepare"> 1.58 + <mkdir dir="${classes}"/> 1.59 + </target> 1.60 + 1.61 + 1.62 +<!-- The "clean" target removes the deployment home directory structure, 1.63 + so that the next time the "compile" target is requested, it will need 1.64 + to compile everything from scratch. 1.65 +--> 1.66 + 1.67 + <target name="clean"> 1.68 + <delete dir="${classes}"/> 1.69 + </target> 1.70 + 1.71 + 1.72 +<!-- The "compile" target is used to compile (or recompile) the Java classes 1.73 + that make up this web application. The recommended source code directory 1.74 + structure makes this very easy because the <javac> task automatically 1.75 + works its way down a source code hierarchy and compiles any class that 1.76 + has not yet been compiled, or where the source file is newer than the 1.77 + class file. 1.78 + 1.79 + Feel free to adjust the compilation option parameters (debug, 1.80 + optimize, and deprecation) to suit your requirements. It is also 1.81 + possible to base them on properties, so that you can adjust this 1.82 + behavior at runtime. 1.83 + 1.84 + The "compile" task depends on the "prepare" task, so the deployment 1.85 + home directory structure will be created if needed the first time. 1.86 +--> 1.87 + 1.88 + <target name="compile" depends="prepare" description="Compiles the sources"> 1.89 + <javac srcdir="../src/share/classes" 1.90 + destdir="${classes}" 1.91 + debug="on" deprecation="on" 1.92 + source="1.4"> 1.93 + <classpath refid="javac.classpath" /> 1.94 + </javac> 1.95 + 1.96 + <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer" 1.97 + base="${classes}"/> 1.98 + </target> 1.99 + 1.100 + <target name="deploy" depends="compile" description="Creates a deployment bundle"> 1.101 + <delete file="${classes}/${dist.jar}" /> 1.102 + <copy todir="${classes}/sun/jvm/hotspot/utilities/soql/"> 1.103 + <fileset dir="../src/share/classes/sun/jvm/hotspot/utilities/soql" includes="*.js" /> 1.104 + </copy> 1.105 + 1.106 + <mkdir dir="${classes}/sun/jvm/hotspot/ui/resources" /> 1.107 + <copy todir="${classes}/sun/jvm/hotspot/ui/resources"> 1.108 + <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" /> 1.109 + </copy> 1.110 + <copy todir="${classes}/toolbarButtonGraphics/development/"> 1.111 + <fileset dir="../src/share/classes/images/toolbarButtonGraphics/development/" includes="*.gif" /> 1.112 + </copy> 1.113 + <copy todir="${classes}/toolbarButtonGraphics/general/"> 1.114 + <fileset dir="../src/share/classes/images/toolbarButtonGraphics/general/" includes="*.gif" /> 1.115 + </copy> 1.116 + <copy todir="${classes}/toolbarButtonGraphics/navigation/"> 1.117 + <fileset dir="../src/share/classes/images/toolbarButtonGraphics/navigation/" includes="*.gif" /> 1.118 + </copy> 1.119 + <copy todir="${classes}/toolbarButtonGraphics/text/"> 1.120 + <fileset dir="../src/share/classes/images/toolbarButtonGraphics/text/" includes="*.gif" /> 1.121 + </copy> 1.122 + 1.123 + <jar jarfile="${classes}/${dist.jar}" 1.124 + basedir="${classes}"/> 1.125 + </target> 1.126 + 1.127 + <target name="all" depends="deploy" description="Builds sources and deployment jar"/> 1.128 + 1.129 +</project>