|
1 <!--**************************************************************************** |
|
2 * Configuration tool main build file |
|
3 * This ant build.xml will compile all Configuration tool plugins |
|
4 ****************************************************************************--> |
|
5 |
|
6 <project name="ConfigurationTool" default="build"> |
|
7 <import file="generatedoc-build.xml"/> |
|
8 |
|
9 <!-- import common properties for this plugin --> |
|
10 <property file="common.properties"/> |
|
11 <property file="install.properties"/> |
|
12 <property file="version.properties"/> |
|
13 <property file="test.properties"/> |
|
14 |
|
15 <!-- Gets the svnversion with the svnversion command and stores the output to svnrevision. |
|
16 The target is executed only if the svnrevision has not been set. |
|
17 --> |
|
18 <target name="get-svnversion" unless="svnrevision"> |
|
19 <echo message="build.xml get-svnversion" level="debug"/> |
|
20 <exec dir="." executable="svnversion" outputproperty="svnrevision" /> |
|
21 <echo message="svnrevision ${svnrevision}" level="debug"/> |
|
22 </target> |
|
23 |
|
24 <!-- generate a build property file --> |
|
25 <target name="update-properties" depends="get-svnversion"> |
|
26 <echo message="build.xml update-properties" level="debug"/> |
|
27 <tstamp prefix="build"/> |
|
28 <echo file="${common.buildproperties}"> |
|
29 common.builddate =${build.DSTAMP} |
|
30 common.svnversion =${svnrevision} |
|
31 common.releaseversion =${releaseversion} |
|
32 </echo> <!-- common.releaseversion =${version} --> |
|
33 <!-- replace the possible : characters because the do not work in filenames--> |
|
34 <replace file="${common.buildproperties}" token=":"/> |
|
35 <echo message="wrote ${common.buildproperties}." /> |
|
36 <property file="${common.buildproperties}"/> |
|
37 </target> |
|
38 |
|
39 <!-- All target will perform cleanbuild, test, install--> |
|
40 <target name="all" depends="clean-install, cleanbuild, install, pack, test"> |
|
41 <echo message="build.xml all" level="debug"/> |
|
42 <iterate target="all" /> |
|
43 </target> |
|
44 |
|
45 <!-- All target will clean and then commit all the build steps--> |
|
46 <target name="cleanbuild" depends="clean, init"> |
|
47 <echo message="build.xml cleanbuild" level="debug"/> |
|
48 <iterate target="build" /> |
|
49 </target> |
|
50 |
|
51 <!-- Build target will commit all the build steps and can be used for incremental |
|
52 building, because ant recognized changed files --> |
|
53 <target name="build" depends="info"> |
|
54 <echo message="build.xml build" level="debug"/> |
|
55 <iterate target="build" /> |
|
56 </target> |
|
57 |
|
58 <target name="info" depends="update-properties"> |
|
59 <echo message="build.xml info" level="debug"/> |
|
60 <echoproperties/> |
|
61 </target> |
|
62 |
|
63 <target name="clean"> |
|
64 <echo message="build.xml clean" level="debug"/> |
|
65 <delete dir="${common.dist}" quiet="true" /> |
|
66 <delete file="${common.buildproperties}" quiet="true" /> |
|
67 <iterate target="clean"/> |
|
68 </target> |
|
69 |
|
70 <target name="init" depends="info"> |
|
71 <echo message="build.xml init" level="debug"/> |
|
72 <mkdir dir="${common.dist}"/> |
|
73 <iterate target="init"/> |
|
74 </target> |
|
75 |
|
76 <target name="resource"> |
|
77 <echo message="build.xml resource" level="debug"/> |
|
78 <iterate target="resource"/> |
|
79 </target> |
|
80 |
|
81 <target name="compile"> |
|
82 <echo message="build.xml compile" level="debug"/> |
|
83 <iterate target="compile"/> |
|
84 </target> |
|
85 |
|
86 <target name="jar"> |
|
87 <echo message="build.xml jar" level="debug"/> |
|
88 <iterate target="jar"/> |
|
89 </target> |
|
90 |
|
91 <!-- perform test step of install --> |
|
92 <target name="test"> |
|
93 <echo message="build.xml test" level="debug"/> |
|
94 <iterate target="test"/> |
|
95 </target> |
|
96 |
|
97 <!-- perform test step of install --> |
|
98 <target name="perltest"> |
|
99 <echo message="build.xml perltest" level="debug"/> |
|
100 <subant target="perltest"> |
|
101 <filelist |
|
102 dir="."> |
|
103 <file name ="perltests/build.xml"/> |
|
104 </filelist> |
|
105 </subant> |
|
106 </target> |
|
107 |
|
108 |
|
109 <!-- iterate the target command through the subfolders that have build.xml --> |
|
110 <macrodef name="iterate"> |
|
111 <attribute name="target"/> |
|
112 <sequential> |
|
113 <subant target="@{target}"> |
|
114 <filelist |
|
115 id="plugins" |
|
116 dir="."> |
|
117 <file name="com.nokia.tools.s60ct.javaversionchecker/build.xml"/> |
|
118 <file name="com.nokia.S60CT.common/build.xml"/> |
|
119 <file name="com.nokia.S60CT/build.xml"/> |
|
120 <file name="com.nokia.S60CT.generate/build.xml"/> |
|
121 <file name="com.nokia.S60CT.CenRep/build.xml"/> |
|
122 <file name="com.nokia.S60CT.CenRep.edit/build.xml"/> |
|
123 <file name="com.nokia.S60CT.genconfml/build.xml"/> |
|
124 <file name="com.nokia.S60CT.iby/build.xml"/> |
|
125 <file name="com.nokia.S60CT.edit/build.xml"/> |
|
126 <file name="com.nokia.S60CT.CenRep.gui/build.xml"/> |
|
127 <file name="com.nokia.S60CT.CLI/build.xml"/> |
|
128 <file name="com.nokia.S60CT.gui/build.xml"/> |
|
129 <file name="com.nokia.S60CT.validation/build.xml"/> |
|
130 <file name="com.nokia.S60CT.search/build.xml"/> |
|
131 |
|
132 <!-- tests --> |
|
133 <file name="tests/build.xml"/> |
|
134 |
|
135 <!-- could not compile ? <file name="com.nokia.S60CT.generate.test/build.xml"/> --> |
|
136 <!-- could not compile ? <file name="com.nokia.S60CT.CenRep.tests/build.xml"/> --> |
|
137 </filelist> |
|
138 </subant> |
|
139 </sequential> |
|
140 </macrodef> |
|
141 |
|
142 <macrodef name="unittest"> |
|
143 <attribute name="target"/> |
|
144 <sequential> |
|
145 <subant target="@{target}"> |
|
146 <filelist id="plugins" dir="."> |
|
147 <file name="com.nokia.tools.s60ct.javaversionchecker/build.xml"/> |
|
148 <file name="com.nokia.S60CT/build.xml"/> |
|
149 <!--<file name="com.nokia.S60CT.generate/build.xml"/>--> |
|
150 <file name="com.nokia.S60CT.CenRep/build.xml"/> |
|
151 <!--<file name="com.nokia.S60CT.iby/build.xml"/>--> |
|
152 <file name="com.nokia.S60CT.edit/build.xml"/> |
|
153 <file name="com.nokia.S60CT.CLI/build.xml"/> |
|
154 <file name="com.nokia.S60CT.gui/build.xml"/> |
|
155 <file name="com.nokia.S60CT.validation/build.xml"/> |
|
156 |
|
157 <!--<file name="tests/build.xml"/>--> |
|
158 </filelist> |
|
159 </subant> |
|
160 </sequential> |
|
161 </macrodef> |
|
162 |
|
163 |
|
164 <!-- perform install, wchich means copying created files to --> |
|
165 <target name="install" depends=""> |
|
166 <echo message="build.xml install" level="debug"/> |
|
167 <mkdir dir="${install.dir}/${install.pluginsdir}"/> |
|
168 <!-- First copy all preinstall data and binaries --> |
|
169 <copy todir="${install.dir}"> |
|
170 <fileset id="install.preinstallfiles" dir="${install.src.preinstall}" includes="**/*"/> |
|
171 </copy> |
|
172 <!-- Second copy all lib and built java archives --> |
|
173 <copy todir="${install.dir}/${install.pluginsdir}"> |
|
174 <fileset id="install.ownpluginfiles" dir="${common.dist}" includes="${install.src.ownplugins}"/> |
|
175 <fileset id="install.libpluginfiles" dir="${common.lib}" includes="${install.src.libplugins}"/> |
|
176 </copy> |
|
177 </target> |
|
178 |
|
179 <!-- perform clean step of install --> |
|
180 <target name="clean-install" depends=""> |
|
181 <echo message="build.xml clean-install" level="debug"/> |
|
182 <delete dir="${install.dir}"/> |
|
183 </target> |
|
184 |
|
185 <!-- perform package step of install --> |
|
186 <target name="pack"> |
|
187 <echo message="build.xml pack" level="debug"/> |
|
188 <zip destfile="${install.zip.outfile}_${releaseversion}-${common.builddate}-${common.svnversion}.zip" basedir="${install.dir}"/> |
|
189 </target> |
|
190 |
|
191 </project> |