annotate agent/make/build.xml @ 0:a61af66fc99e

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
children 54499b980c23
rev   line source
duke@0 1 <?xml version="1.0" encoding="UTF-8"?>
duke@0 2 <!--
duke@0 3 Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
duke@0 5
duke@0 6 This code is free software; you can redistribute it and/or modify it
duke@0 7 under the terms of the GNU General Public License version 2 only, as
duke@0 8 published by the Free Software Foundation.
duke@0 9
duke@0 10 This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 13 version 2 for more details (a copy is included in the LICENSE file that
duke@0 14 accompanied this code).
duke@0 15
duke@0 16 You should have received a copy of the GNU General Public License version
duke@0 17 2 along with this work; if not, write to the Free Software Foundation,
duke@0 18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 19
duke@0 20 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 21 CA 95054 USA or visit if you need additional information or
duke@0 22 have any questions.
duke@0 23
duke@0 24 -->
duke@0 25
duke@0 26 <!-- This is an Ant project file. Ant is a build tool like make or gnumake which is not
duke@0 27 dependent on the underlying OS shell. For more information on Ant, please see
duke@0 28 -->
duke@0 29
duke@0 30 <!-- A "project" describes a set of targets that may be requested
duke@0 31 when Ant is executed. The "default" attribute defines the
duke@0 32 target which is executed if no specific target is requested,
duke@0 33 and the "basedir" attribute defines the current working directory
duke@0 34 from which Ant executes the requested task. This is normally
duke@0 35 set to the current working directory.
duke@0 36 -->
duke@0 37
duke@0 38
duke@0 39 <project name="HotSpot Serviceability Agent" default="all" basedir=".">
duke@0 40
duke@0 41 <!-- Property Definitions -->
duke@0 42
duke@0 43 <property name="" value="sa"/>
duke@0 44 <property name="dist.jar" value="${}.jar"/>
duke@0 45 <property name="libs" value="../src/share/lib"/>
duke@0 46 <property name="classes" value="../build/classes"/>
duke@0 47
duke@0 48 <!-- The "prepare" target is used to construct the deployment home
duke@0 49 directory structure (if necessary), and to copy in static files
duke@0 50 as required. In the example below, Ant is instructed to create
duke@0 51 the deployment directory, copy the contents of the "web/" source
duke@0 52 hierarchy, and set up the WEB-INF subdirectory appropriately.
duke@0 53 -->
duke@0 54
duke@0 55 <target name="prepare">
duke@0 56 <mkdir dir="${classes}"/>
duke@0 57 </target>
duke@0 58
duke@0 59
duke@0 60 <!-- The "clean" target removes the deployment home directory structure,
duke@0 61 so that the next time the "compile" target is requested, it will need
duke@0 62 to compile everything from scratch.
duke@0 63 -->
duke@0 64
duke@0 65 <target name="clean">
duke@0 66 <delete dir="${classes}"/>
duke@0 67 </target>
duke@0 68
duke@0 69
duke@0 70 <!-- The "compile" target is used to compile (or recompile) the Java classes
duke@0 71 that make up this web application. The recommended source code directory
duke@0 72 structure makes this very easy because the <javac> task automatically
duke@0 73 works its way down a source code hierarchy and compiles any class that
duke@0 74 has not yet been compiled, or where the source file is newer than the
duke@0 75 class file.
duke@0 76
duke@0 77 Feel free to adjust the compilation option parameters (debug,
duke@0 78 optimize, and deprecation) to suit your requirements. It is also
duke@0 79 possible to base them on properties, so that you can adjust this
duke@0 80 behavior at runtime.
duke@0 81
duke@0 82 The "compile" task depends on the "prepare" task, so the deployment
duke@0 83 home directory structure will be created if needed the first time.
duke@0 84 -->
duke@0 85
duke@0 86 <path id="javac.classpath">
duke@0 87 <pathelement path="${libs}/maf-1_0.jar" />
duke@0 88 <pathelement path="${libs}/jlfgr-1_0.jar" />
duke@0 89 </path>
duke@0 90
duke@0 91 <target name="compile" depends="prepare" description="Compiles the sources">
duke@0 92 <javac srcdir="../src/share/classes"
duke@0 93 destdir="${classes}"
duke@0 94 debug="on" deprecation="on"
duke@0 95 source="1.4">
duke@0 96 <classpath refid="javac.classpath" />
duke@0 97 </javac>
duke@0 98
duke@0 99 <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer"
duke@0 100 base="${classes}"/>
duke@0 101 </target>
duke@0 102
duke@0 103 <target name="deploy" depends="compile" description="Creates a deployment bundle">
duke@0 104 <delete file="${classes}/${dist.jar}" />
duke@0 105 <copy todir="${classes}/sun/jvm/hotspot/utilities/soql/">
duke@0 106 <fileset dir="../src/share/classes/sun/jvm/hotspot/utilities/soql" includes="*.js" />
duke@0 107 </copy>
duke@0 108
duke@0 109 <mkdir dir="${classes}/sun/jvm/hotspot/ui/resources" />
duke@0 110 <copy todir="${classes}/sun/jvm/hotspot/ui/resources">
duke@0 111 <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" />
duke@0 112 </copy>
duke@0 113
duke@0 114 <jar jarfile="${classes}/${dist.jar}"
duke@0 115 basedir="${classes}"/>
duke@0 116 </target>
duke@0 117
duke@0 118 <target name="all" depends="deploy" description="Builds sources and deployment jar"/>
duke@0 119
duke@0 120 </project>