WALA/com.ibm.wala.cast.java.poly.../build.xml

78 lines
3.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="com.ibm.wala.cast.java.polyglot" default="getJars" basedir=".">
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<!-- Compiler settings. -->
<property name="javacFailOnError" value="true"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="false"/>
<property name="logExtension" value=".log"/>
<property name="compilerArg" value=""/>
<property name="javacSource" value="1.5"/>
<property name="javacTarget" value="1.5"/>
<!-- This property has been updated to correspond to the paths used by the latest Java update
on Mac OS X 10.6 (Java version 1.6.0_22). If you are not using this version of Mac OS X or Java,
try changing the value of the property to "${java.home}/../../../Classes" -->
<condition property="dir_bootclasspath" value="${java.home}/../Classes">
<os family="mac"/>
</condition>
<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="PolyglotPresent" depends="init">
<available file="${plugin.destination}/lib/polyglot.jar" property="polyglot.present"/>
</target>
<target name="fetchPolyglot" depends="PolyglotPresent" unless="polyglot.present">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<echo message="Getting polyglot from svn; may take a few minutes"/>
<exec executable="svn"
dir="${temp.folder}">
<arg value="--quiet"/>
<arg value="checkout"/>
<arg value="http://polyglot-compiler.googlecode.com/svn/trunk/"/>
<arg value="polyglot-compiler-read-only"/>
</exec>
<ant target="jar" inheritAll="false" dir="${temp.folder}/polyglot-compiler-read-only/polyglot/" />
<copy file="${temp.folder}/polyglot-compiler-read-only/polyglot/lib/polyglot.jar" tofile="${plugin.destination}/lib/polyglot.jar" />
<copy file="${temp.folder}/polyglot-compiler-read-only/polyglot/lib/java_cup.jar" tofile="${plugin.destination}/lib/java_cup.jar" />
<delete dir="${temp.folder}"/>
</target>
<target name="getJars" depends="fetchPolyglot" />
<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins">
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/com.ibm.wala.core.testdata">
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
</project>