217
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : build.xml
|
|
5 |
Part of : Helium AntLib
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<project name="helium-antlib" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib">
|
|
24 |
<!--
|
|
25 |
<property name="bin.dir" location="${build.dir}/bin" />
|
|
26 |
<property name="build.dir" location="${ant.file.helium-antlib}/../../build" />
|
|
27 |
<property name="helium.dir" location="${ant.file.helium-antlib}/../../build/helium" />
|
|
28 |
<property name="antlib.dir" location="${helium.dir}/external/antlib" />
|
|
29 |
<property name="ivy.dep.file" location="${ant.file.helium-antlib}/../../config/${config}/ivy.xml"/>
|
|
30 |
|
|
31 |
<target name="configure-ivy">
|
|
32 |
<ivy:settings file="${ant.file.helium-antlib}/../../config/${config}/ivysettings.xml" />
|
|
33 |
</target>
|
|
34 |
|
|
35 |
<target name="get-deps" depends="configure-ivy">
|
|
36 |
<mkdir dir="${helium.dir}" />
|
|
37 |
<mkdir dir="${antlib.dir}" />
|
|
38 |
<ivy:retrieve pattern="${antlib.dir}/[artifact]-[revision].[ext]"
|
|
39 |
ivypattern="${antlib.dir}/[artifact]-[revision].[ext]" conf="${config}" sync="true"/>
|
|
40 |
</target>
|
|
41 |
|
|
42 |
<target name="build-helium" depends="get-deps">
|
|
43 |
</target>
|
|
44 |
-->
|
|
45 |
<condition property="platform" value="win32" else="unix">
|
|
46 |
<os family="windows"/>
|
|
47 |
</condition>
|
|
48 |
<property name="helium.source.root.dir" location=".." />
|
|
49 |
<property name="build.temp.dir" location="${helium.source.root.dir}/build" />
|
|
50 |
<property name="sf.source.root.dir" location=".." />
|
|
51 |
<property name="component" value="*" />
|
|
52 |
<fileset id="ant.build.files" dir="${helium.source.root.dir}">
|
|
53 |
<include name="*/${component}/build.xml" />
|
|
54 |
<exclude name="builder/**" />
|
|
55 |
<exclude name="*/builder/**" />
|
|
56 |
</fileset>
|
|
57 |
|
|
58 |
<target name="get-build-list">
|
|
59 |
<ivy:buildlist reference="ivy.buildlist.path">
|
|
60 |
<fileset refid="ant.build.files"/>
|
|
61 |
</ivy:buildlist>
|
|
62 |
</target>
|
|
63 |
|
|
64 |
<target name="report" depends="get-build-list">
|
|
65 |
<subant target="report" buildpathref="ivy.buildlist.path">
|
|
66 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
67 |
</subant>
|
|
68 |
</target>
|
|
69 |
|
|
70 |
<target name="compile" depends="get-build-list">
|
|
71 |
<subant target="compile" buildpathref="ivy.buildlist.path">
|
|
72 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
73 |
<property name="helium.source.root.dir" value="${helium.source.root.dir}"/>
|
|
74 |
<property name="sf.source.root.dir" value="${sf.source.root.dir}"/>
|
|
75 |
</subant>
|
|
76 |
</target>
|
|
77 |
|
|
78 |
<target name="build" depends="get-build-list">
|
|
79 |
<subant target="package" buildpathref="ivy.buildlist.path">
|
|
80 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
81 |
<property name="helium.source.root.dir" value="${helium.source.root.dir}"/>
|
|
82 |
<property name="sf.source.root.dir" value="${sf.source.root.dir}"/>
|
|
83 |
<property name="platform" value="${platform}"/>
|
|
84 |
</subant>
|
|
85 |
</target>
|
|
86 |
|
|
87 |
<target name="clean" depends="get-build-list">
|
|
88 |
<subant target="clean" buildpathref="ivy.buildlist.path">
|
|
89 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
90 |
<property name="helium.source.root.dir" value="${helium.source.root.dir}"/>
|
|
91 |
<property name="sf.source.root.dir" value="${sf.source.root.dir}"/>
|
|
92 |
</subant>
|
|
93 |
</target>
|
|
94 |
|
|
95 |
<target name="test" depends="get-build-list,build">
|
|
96 |
<ac:for param="file" keepgoing="true">
|
|
97 |
<path refid="ivy.buildlist.path" />
|
|
98 |
<sequential>
|
|
99 |
<echo>Testing: @{file}</echo>
|
|
100 |
<ant antfile="@{file}" dir="@{file}/.." target="test" inheritAll="false">
|
|
101 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
102 |
</ant>
|
|
103 |
</sequential>
|
|
104 |
</ac:for>
|
|
105 |
</target>
|
|
106 |
<!-- TODO: remove after CI tools are cleaned up -->
|
|
107 |
<target name="unittest" depends="test"/>
|
|
108 |
|
|
109 |
<target name="junit" depends="get-build-list">
|
|
110 |
<subant target="junit" buildpathref="ivy.buildlist.path">
|
|
111 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
112 |
</subant>
|
|
113 |
</target>
|
|
114 |
|
|
115 |
<target name="antunit" depends="get-build-list">
|
|
116 |
<subant target="antunit" buildpathref="ivy.buildlist.path">
|
|
117 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
118 |
</subant>
|
|
119 |
</target>
|
|
120 |
|
|
121 |
<target name="quality" depends="get-build-list">
|
|
122 |
<ac:for param="file" keepgoing="true">
|
|
123 |
<path refid="ivy.buildlist.path" />
|
|
124 |
<sequential>
|
|
125 |
<echo>${ant.file.helium-antlib}</echo>
|
|
126 |
<ant antfile="@{file}" dir="@{file}/.." target="quality" inheritAll="false">
|
|
127 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
128 |
<property name="helium.source.root.dir" value="${helium.source.root.dir}"/>
|
|
129 |
<property name="sf.source.root.dir" value="${sf.source.root.dir}"/>
|
|
130 |
<property name="platform" value="${platform}"/>
|
|
131 |
</ant>
|
|
132 |
</sequential>
|
|
133 |
</ac:for>
|
|
134 |
</target>
|
|
135 |
|
|
136 |
<target name="checkstyle" depends="get-build-list">
|
|
137 |
<ac:for param="file" keepgoing="true">
|
|
138 |
<path refid="ivy.buildlist.path" />
|
|
139 |
<sequential>
|
|
140 |
<ant antfile="@{file}" dir="@{file}/.." target="checkstyle" inheritAll="false">
|
|
141 |
<property name="builder.dir" location="${ant.file.helium-antlib}/.." />
|
|
142 |
<property name="helium.source.root.dir" value="${helium.source.root.dir}"/>
|
|
143 |
<property name="sf.source.root.dir" value="${sf.source.root.dir}"/>
|
|
144 |
<property name="platform" value="${platform}"/>
|
|
145 |
</ant>
|
|
146 |
</sequential>
|
|
147 |
</ac:for>
|
|
148 |
</target>
|
|
149 |
|
|
150 |
<target name="textdoc">
|
|
151 |
<copy todir="${build.temp.dir}/doctmp" overwrite="true">
|
|
152 |
<fileset dir="${sf.source.root.dir}/doc/src"/>
|
|
153 |
</copy>
|
|
154 |
<copy todir="${build.temp.dir}/doctmp" overwrite="true" flatten="true">
|
|
155 |
<fileset dir="${sf.source.root.dir}" includes="**/*.rst"/>
|
|
156 |
</copy>
|
|
157 |
<rstMacro version="1.0" src="${build.temp.dir}/doctmp"/>
|
|
158 |
</target>
|
|
159 |
|
|
160 |
<!-- Macro to generate html docs from rst. -->
|
|
161 |
<macrodef name="rstMacro">
|
|
162 |
<attribute name="version"/>
|
|
163 |
<attribute name="src" default="${sf.source.root.dir}/doc/src"/>
|
|
164 |
<attribute name="output" default="${build.temp.dir}/doc"/>
|
|
165 |
<sequential>
|
|
166 |
<property name="sphinx.lib.dir" location="${sf.source.root.dir}/doc/tools/Sphinx-0.5.1-py2.5.egg/sphinx" />
|
|
167 |
<exec executable="python" failonerror="${failonerror}">
|
|
168 |
<env key="PYTHONPATH" path="${sf.source.root.dir}/doc/tools" />
|
|
169 |
<arg file="${sf.source.root.dir}/doc/tools/sphinx-build.py"/>
|
|
170 |
<arg value="-b" />
|
|
171 |
<arg value="html" />
|
|
172 |
<arg value="-D" />
|
|
173 |
<arg value="version=@{version}" />
|
|
174 |
<arg value="-D" />
|
|
175 |
<arg value="release=@{version}" />
|
|
176 |
<arg file="@{src}" />
|
|
177 |
<arg file="@{output}" />
|
|
178 |
</exec>
|
|
179 |
</sequential>
|
|
180 |
</macrodef>
|
|
181 |
</project>
|