src/demo/share/java2d/J2DBench/build.xml
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 26353 jdk/src/demo/share/java2d/J2DBench/build.xml@b5e3b7fbf56d
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse

<!--
 Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:

   - Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

   - Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.

   - Neither the name of Oracle nor the names of its
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<project name="J2DBench" default="dist" basedir=".">
    <description>
        simple example build file
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="build" location="build"/>
  <property name="dist"  location="dist"/>
  <property name="resources"  location="resources"/>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init"
        description="compile the source " >
    <!-- Compile the java code from ${src} into ${build} -->
    <javac debug="off" source="1.6" target="1.6" srcdir="${src}" destdir="${build}"/>
  </target>

  <target name="run" depends="dist"
    description="run J2DBench" >
    <java jar="${dist}/J2DBench.jar"
       fork="true"
    >
    </java>
  </target>

  <target name="analyze" depends="dist"
    description="run J2DAnalyzer" >
    <java jar="${dist}/J2DAnalyzer.jar"
       fork="true"
    >
    </java>
  </target>

  <target name="resources" depends="init"
        description="copy resources into build dir" >
    <!-- Copy the resource files from ${resources} into ${build}/ -->
    <mkdir dir="${dist}"/>
    <mkdir dir="${build}/j2dbench/tests/text/textdata"/>
    <copy todir="${build}/j2dbench/tests/text/textdata">
      <fileset dir="${resources}/textdata" />
    </copy>
    <mkdir dir="${build}/j2dbench/tests/iio/images"/>
    <copy todir="${build}/j2dbench/tests/iio/images">
      <fileset dir="${resources}/images" />
    </copy>
    <mkdir dir="${build}/j2dbench/tests/cmm/images"/>
    <copy todir="${build}/j2dbench/tests/cmm/images">
      <fileset dir="${resources}/cmm_images" />
    </copy>
  </target>

  <target name="dist" depends="compile, resources"
        description="generate the distribution" >
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}"/>

    <!-- Put everything in ${build} into the J2DBench.jar file -->
    <jar jarfile="${dist}/J2DBench.jar" basedir="${build}"
        excludes="j2dbench/report/**" >
      <manifest>
        <attribute name="Built-By" value="${user.name}"/>
	<attribute name="Main-Class" value="j2dbench.J2DBench"/>
      </manifest>
    </jar>
    <jar jarfile="${dist}/J2DAnalyzer.jar" basedir="${build}"
        includes="j2dbench/report/**" >
      <manifest>
        <attribute name="Built-By" value="${user.name}"/>
	<attribute name="Main-Class" value="j2dbench.report.J2DAnalyzer"/>
      </manifest>
    </jar>
  </target>

  <target name="clean"
        description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
  </target>
</project>