blob: e8849504914d9475a0be54044767e0eb148e6105 [file] [log] [blame]
ndaib8cedc82005-09-13 18:00:32 +00001<?xml version="1.0"?>
2<!-- ======================================================================
3 Sep 8, 2005 4:18:21 PM
4
5 test
6 test dependencies
7
8 naci
9 ====================================================================== -->
10<project name="test" default="get">
11 <description>
12 test dependencies
13 </description>
14
15 <!-- =================================
16 target: get
17 ================================= -->
18 <property file="@dependencyProperties@" />
19
20
21 <!-- - - - - - - - - - - - - - - - - -
22 target: init
23 - - - - - - - - - - - - - - - - - -->
24 <target name="init">
25 <property name="dependency.name" value="${@dependencyGroupId@name}" />
26 <property name="dependency.description" value="${@dependencyGroupId@url}" />
27 <property name="dependency.url" value="${@dependencyGroupId@url}" />
ndaia04ffd52005-09-14 16:28:32 +000028 <property name="local.cache.dir" value="." />
ndaib8cedc82005-09-13 18:00:32 +000029
30 <condition property="dependency.file" value="${@dependencyGroupId@file}">
31 <not>
32 <or>
33 <isset property="@dependencyGroupId@file.linux-gtk-x86" />
ndai0c96ca62006-01-19 16:49:24 +000034 <isset property="@dependencyGroupId@file.linux-gtk-ppc" />
ndaib8cedc82005-09-13 18:00:32 +000035 <isset property="@dependencyGroupId@file.win32-win32-x86" />
ndaidab24cb2006-07-28 15:22:38 +000036 <isset property="@dependencyGroupId@file.macosx-carbon-ppc" />
ndaib8cedc82005-09-13 18:00:32 +000037 </or>
38 </not>
39 </condition>
40 <condition property="dependency.file" value="${@dependencyGroupId@file.win32-win32-x86}">
41 <and>
42 <isset property="@dependencyGroupId@file.win32-win32-x86" />
43 <equals arg1="win32" arg2="${baseos}" />
44 <equals arg1="win32" arg2="${basews}" />
45 <equals arg1="x86" arg2="${basearch}" />
46 </and>
47 </condition>
48 <condition property="dependency.file" value="${@dependencyGroupId@file.linux-gtk-x86}">
49 <and>
50 <isset property="@dependencyGroupId@file.linux-gtk-x86" />
51 <equals arg1="linux" arg2="${baseos}" />
52 <equals arg1="gtk" arg2="${basews}" />
53 <equals arg1="x86" arg2="${basearch}" />
54 </and>
55 </condition>
ndai0c96ca62006-01-19 16:49:24 +000056 <condition property="dependency.file" value="${@dependencyGroupId@file.linux-gtk-ppc}">
57 <and>
58 <isset property="@dependencyGroupId@file.linux-gtk-ppc" />
59 <equals arg1="linux" arg2="${baseos}" />
60 <equals arg1="gtk" arg2="${basews}" />
61 <equals arg1="ppc" arg2="${basearch}" />
62 </and>
63 </condition>
ndaidab24cb2006-07-28 15:22:38 +000064 <condition property="dependency.file" value="${@dependencyGroupId@file.macosx-carbon-ppc}">
65 <and>
66 <isset property="@dependencyGroupId@file.macosx-carbon-ppc" />
67 <equals arg1="macosx" arg2="${baseos}" />
68 <equals arg1="carbon" arg2="${basews}" />
69 <equals arg1="ppc" arg2="${basearch}" />
70 </and>
71 </condition>
ndaib8cedc82005-09-13 18:00:32 +000072 <condition property="dependency.autodownload" value="${@dependencyGroupId@autodownload}">
73 <isset property="@dependencyGroupId@autodownload" />
74 </condition>
75 <condition property="dependency.releng.url" value="${@dependencyGroupId@releng.url}">
76 <isset property="@dependencyGroupId@releng.url" />
77 </condition>
78 </target>
79
80
81 <target name="get" depends="init">
82
83 <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." />
84
85 <echo message="Getting ${dependency.file}" />
86 <echo message="Url: ${dependency.url}" />
87
88 <ant antfile="@dependencyDir@/build.xml" target="default" />
89
90 </target>
91
92
93 <!-- =================================
94 target: install
95 ================================= -->
96 <target name="install" depends="init">
97 <echo message="Installing ${dependency.file}" />
98 <echo message="destination: ${install.destination}" />
jeffliud0eb4a72005-09-28 14:58:59 +000099 <antcall target="cleanInstall"/>
ndaib8cedc82005-09-13 18:00:32 +0000100 <property file="${install.destination}/installmanifest.properties" />
101 <antcall target="callInstall" />
102 <echo message="${install.destination}/installmanifest.properties" />
103 <echo file="${install.destination}/installmanifest.properties" append="true">
104 @dependencyGroupId@.${dependency.file}.installed=true
105 </echo>
106 </target>
107
jeffliud0eb4a72005-09-28 14:58:59 +0000108 <target name="cleanInstall" if="clean">
109 <available file="${install.destination}/installmanifest.properties" property="installmanifest.exists"/>
110 <antcall target="cleanInstall2"/>
111 </target>
112
113 <target name="cleanInstall2" if="installmanifest.exists">
114 <replace file="${install.destination}/installmanifest.properties" token="@dependencyGroupId@.${dependency.file}.installed=true"/>
115 </target>
ndaib8cedc82005-09-13 18:00:32 +0000116
117 <target name="callInstall" unless="@dependencyGroupId@.${dependency.file}.installed">
118 <ant antfile="@dependencyDir@/build.xml" target="install" />
119 </target>
120
ndaidab24cb2006-07-28 15:22:38 +0000121</project>