diff agent/make/build.xml @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 54499b980c23
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/make/build.xml	Sat Dec 01 00:00:00 2007 +0000
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ CA 95054 USA or visit www.sun.com if you need additional information or
+ have any questions.
+  
+-->
+
+<!-- This is an Ant project file. Ant is a build tool like make or gnumake which is not
+     dependent on the underlying OS shell. For more information on Ant, please see
+     http://ant.apache.org/ -->
+
+<!-- A "project" describes a set of targets that may be requested
+     when Ant is executed.  The "default" attribute defines the
+     target which is executed if no specific target is requested,
+     and the "basedir" attribute defines the current working directory
+     from which Ant executes the requested task.  This is normally
+     set to the current working directory.
+-->
+
+
+<project name="HotSpot Serviceability Agent" default="all" basedir=".">
+
+  <!-- Property Definitions -->
+
+  <property name="app.name" value="sa"/>
+  <property name="dist.jar" value="${app.name}.jar"/>
+  <property name="libs"     value="../src/share/lib"/>
+  <property name="classes"  value="../build/classes"/>
+
+<!-- The "prepare" target is used to construct the deployment home
+     directory structure (if necessary), and to copy in static files
+     as required.  In the example below, Ant is instructed to create
+     the deployment directory, copy the contents of the "web/" source
+     hierarchy, and set up the WEB-INF subdirectory appropriately.
+-->
+
+  <target name="prepare">
+    <mkdir dir="${classes}"/>
+  </target>
+
+
+<!-- The "clean" target removes the deployment home directory structure,
+     so that the next time the "compile" target is requested, it will need
+     to compile everything from scratch.
+-->
+
+  <target name="clean">
+     <delete dir="${classes}"/>
+  </target>
+
+
+<!-- The "compile" target is used to compile (or recompile) the Java classes
+     that make up this web application.  The recommended source code directory
+     structure makes this very easy because the <javac> task automatically
+     works its way down a source code hierarchy and compiles any class that
+     has not yet been compiled, or where the source file is newer than the
+     class file.
+
+     Feel free to adjust the compilation option parameters (debug,
+     optimize, and deprecation) to suit your requirements.  It is also
+     possible to base them on properties, so that you can adjust this
+     behavior at runtime.
+
+     The "compile" task depends on the "prepare" task, so the deployment
+     home directory structure will be created if needed the first time.
+-->
+
+  <path id="javac.classpath">
+    <pathelement path="${libs}/maf-1_0.jar" />
+    <pathelement path="${libs}/jlfgr-1_0.jar" />
+  </path>
+
+  <target name="compile" depends="prepare" description="Compiles the sources">
+    <javac srcdir="../src/share/classes" 
+           destdir="${classes}"
+           debug="on" deprecation="on"
+           source="1.4">
+      <classpath refid="javac.classpath" />
+    </javac>
+
+    <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer"
+	  base="${classes}"/>
+  </target>
+
+  <target name="deploy" depends="compile" description="Creates a deployment bundle">
+    <delete file="${classes}/${dist.jar}" />
+    <copy todir="${classes}/sun/jvm/hotspot/utilities/soql/">
+      <fileset dir="../src/share/classes/sun/jvm/hotspot/utilities/soql" includes="*.js" />
+    </copy>
+
+    <mkdir dir="${classes}/sun/jvm/hotspot/ui/resources" />
+    <copy todir="${classes}/sun/jvm/hotspot/ui/resources">
+      <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" />
+    </copy>
+
+    <jar jarfile="${classes}/${dist.jar}"
+         basedir="${classes}"/>
+  </target>
+
+  <target name="all" depends="deploy" description="Builds sources and deployment jar"/>
+
+</project>