blob: db4935eb6fa1b7e2e4001944d457be23f2578ed9 [file] [log] [blame]
<?xml version="1.0"?>
<!-- ======================================================================
Sep 8, 2005 4:18:21 PM
test
test dependencies
naci
====================================================================== -->
<project name="test" default="get">
<description>
test dependencies
</description>
<!-- =================================
target: get
================================= -->
<property file="@dependencyProperties@" />
<!-- - - - - - - - - - - - - - - - - -
target: init
- - - - - - - - - - - - - - - - - -->
<target name="init">
<property name="dependency.name" value="${@dependencyGroupId@name}" />
<property name="dependency.description" value="${@dependencyGroupId@url}" />
<property name="dependency.url" value="${@dependencyGroupId@url}" />
<property name="local.cache.dir" value="." />
<condition property="dependency.file" value="${@dependencyGroupId@file}">
<not>
<or>
<isset property="@dependencyGroupId@file.linux-gtk-x86" />
<isset property="@dependencyGroupId@file.win32-win32-x86" />
</or>
</not>
</condition>
<condition property="dependency.file" value="${@dependencyGroupId@file.win32-win32-x86}">
<and>
<isset property="@dependencyGroupId@file.win32-win32-x86" />
<equals arg1="win32" arg2="${baseos}" />
<equals arg1="win32" arg2="${basews}" />
<equals arg1="x86" arg2="${basearch}" />
</and>
</condition>
<condition property="dependency.file" value="${@dependencyGroupId@file.linux-gtk-x86}">
<and>
<isset property="@dependencyGroupId@file.linux-gtk-x86" />
<equals arg1="linux" arg2="${baseos}" />
<equals arg1="gtk" arg2="${basews}" />
<equals arg1="x86" arg2="${basearch}" />
</and>
</condition>
<condition property="dependency.autodownload" value="${@dependencyGroupId@autodownload}">
<isset property="@dependencyGroupId@autodownload" />
</condition>
<condition property="dependency.releng.url" value="${@dependencyGroupId@releng.url}">
<isset property="@dependencyGroupId@releng.url" />
</condition>
</target>
<target name="get" depends="init">
<fail unless="dependency.file" message="The dependent file ${dependency.name} is not a supported os-ws-arch. Did you set baseos, basews,baesarch and make use your dependency.file property matches it." />
<echo message="Getting ${dependency.file}" />
<echo message="Url: ${dependency.url}" />
<ant antfile="@dependencyDir@/build.xml" target="default" />
</target>
<!-- =================================
target: install
================================= -->
<target name="install" depends="init">
<echo message="Installing ${dependency.file}" />
<echo message="destination: ${install.destination}" />
<antcall target="cleanInstall"/>
<property file="${install.destination}/installmanifest.properties" />
<antcall target="callInstall" />
<echo message="${install.destination}/installmanifest.properties" />
<echo file="${install.destination}/installmanifest.properties" append="true">
@dependencyGroupId@.${dependency.file}.installed=true
</echo>
</target>
<target name="cleanInstall" if="clean">
<available file="${install.destination}/installmanifest.properties" property="installmanifest.exists"/>
<antcall target="cleanInstall2"/>
</target>
<target name="cleanInstall2" if="installmanifest.exists">
<replace file="${install.destination}/installmanifest.properties" token="@dependencyGroupId@.${dependency.file}.installed=true"/>
</target>
<target name="callInstall" unless="@dependencyGroupId@.${dependency.file}.installed">
<ant antfile="@dependencyDir@/build.xml" target="install" />
</target>
</project>