6958391: add vizant support to langtools build

Reviewed-by: mcimadamore
This commit is contained in:
Jonathan Gibbons 2010-06-04 14:54:54 -07:00
parent da823fbf44
commit c8cce21323
2 changed files with 43 additions and 5 deletions

View File

@ -76,17 +76,27 @@ javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Languag
javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:"
# jtreg, used to run the JDK regression tests
# See http://openjdk.java.net/jtreg/
# Override this path as needed, either on the command line or in
# one of the standard user build.properties files (see build.xml)
# jtreg.home = /opt/jtreg/3.2.2_02
# jtreg.home = /opt/jtreg/4.1
# findbugs
# See http://findbugs.sourceforge.net/
# Override this path as needed, either on the command line or in
# one of the standard user build.properties files (see build.xml)
# findbugs.home = /opt/findbugs/1.2.1
# vizant (graph visualization tool for Ant)
# See http://vizant.sourceforge.net/
# Override this path as needed, either on the command line or in
# one of the standard user build.properties files (see build.xml)
# vizant.jar = /opt/vizant/0.1.2/vizant-0.1.2.jar
# dot = dot
#------------------------------------------------------------
# The following properties define the packages for each of the tools.

View File

@ -136,6 +136,19 @@
<echo message="import.jdk.jar: ${import.jdk.jar}"/>
<echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
</target>
<target name="vizant" depends="-def-vizant">
<mkdir dir="${build.dir}"/>
<echo message="Generating ${build.dir}/build.dot"/>
<vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/>
<echo message="Generating ${build.dir}/build.png"/>
<exec executable="${dot}" >
<arg value="-Tpng"/>
<arg value="-o"/>
<arg file="${build.dir}/build.png"/>
<arg file="${build.dir}/build.dot"/>
</exec>
</target>
<!-- Standard target to build deliverables for JDK build. -->
@ -459,6 +472,11 @@
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
</target>
<target name="-check-vizant" depends="-def-check">
<check name="vizant" property="vizant.jar"/>
<check name="dot" property="dot"/>
</target>
<!-- Ant macro and preset defs -->
<target name="-def-build-tool">
@ -765,12 +783,17 @@
</macrodef>
<property name="findbugs.defined" value="true"/>
</target>
<target name="-def-vizant" unless="vizant.defined" depends="-check-vizant">
<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/>
<property name="vizant.defined" value="true"/>
</target>
<target name="-def-check">
<macrodef name="check">
<attribute name="name"/>
<attribute name="property"/>
<attribute name="marker"/>
<attribute name="marker" default=""/>
<sequential>
<fail message="Cannot locate @{name}: please set @{property} to its location">
<condition>
@ -781,9 +804,14 @@
</fail>
<fail message="@{name} is not installed in ${@{property}}">
<condition>
<not>
<available file="${@{property}}/@{marker}"/>
</not>
<and>
<not>
<equals arg1="@{marker}" arg2=""/>
</not>
<not>
<available file="${@{property}}/@{marker}"/>
</not>
</and>
</condition>
</fail>
</sequential>