|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : cmaker.ant.xml |
|
5 Part of : Helium |
|
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="compile.cmaker" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 cMaker support. |
|
26 </description> |
|
27 |
|
28 <property name="cmaker.component.dir" location="${build.drive}/tools/cmaker"/> |
|
29 <property name="cmaker.config.dir" location="${build.drive}/config"/> |
|
30 <property name="cmaker.pp.version" value=""/> |
|
31 <property name="cmaker.s60.version" value=""/> |
|
32 <property name="cmaker.log.label" value=""/> |
|
33 |
|
34 <!-- |
|
35 The cmakerMacro enables the user to run cmaker commands directly from Ant. |
|
36 To configure it just provide NCP and S60 version and the action you want to run. |
|
37 Default action is WHAT. |
|
38 |
|
39 e.g |
|
40 <pre> |
|
41 <hlm:cmakerMacro ncp="53" s60="32" action="export"/> |
|
42 </pre> |
|
43 --> |
|
44 <macrodef name="cmakerMacro" uri="http://www.nokia.com/helium"> |
|
45 <attribute name="ncp" default=""/> |
|
46 <attribute name="s60" default=""/> |
|
47 <attribute name="action" default="what"/> |
|
48 <sequential> |
|
49 <var name="temp.cmaker.arg1" value="NCP="/> |
|
50 <var name="temp.cmaker.arg2" value="S60="/> |
|
51 <if> |
|
52 <not> |
|
53 <equals arg1="@{ncp}" arg2="" /> |
|
54 </not> |
|
55 <then> |
|
56 <var name="temp.cmaker.arg1" value="NCP=@{ncp}"/> |
|
57 </then> |
|
58 </if> |
|
59 <if> |
|
60 <not> |
|
61 <equals arg1="@{s60}" arg2="" /> |
|
62 </not> |
|
63 <then> |
|
64 <var name="temp.cmaker.arg2" value="S60=@{s60}"/> |
|
65 </then> |
|
66 </if> |
|
67 <hlm:symbianLogHeaderMacro command="cmaker ${temp.cmaker.arg1} ${temp.cmaker.arg2} ACTION=@{action}" |
|
68 config="CMAKER_@{action}" dir="${cmaker.config.dir}"/> |
|
69 <exec executable="${build.drive}/epoc32/tools/cmaker.cmd" dir="${cmaker.config.dir}"> |
|
70 <arg line="${temp.cmaker.arg1}" /> |
|
71 <arg line="${temp.cmaker.arg2}" /> |
|
72 <arg value="ACTION=@{action}" /> |
|
73 </exec> |
|
74 <hlm:symbianLogFooterMacro/> |
|
75 </sequential> |
|
76 </macrodef> |
|
77 |
|
78 <!-- Installing CMaker. --> |
|
79 <target name="cmaker-install"> |
|
80 <hlm:recordStartMacro name="${build.id}_install.cmaker.log" emacsmode="true"/> |
|
81 <exec executable="${build.drive}/epoc32/tools/make.exe" dir="${cmaker.component.dir}"> |
|
82 <arg line="install"/> |
|
83 </exec> |
|
84 <hlm:recordStopMacro name="${build.id}_install.cmaker.log"/> |
|
85 <!-- Blocks packaging configuration generation. --> |
|
86 <if> |
|
87 <istrue value="${blocks.enabled}" /> |
|
88 <then> |
|
89 <mkdir dir="${blocks.config.dir}" /> |
|
90 <exec executable="python"> |
|
91 <arg value="-m"/> |
|
92 <arg value="packager.cli"/> |
|
93 <arg value="--epocroot=${build.drive}/" /> |
|
94 <arg value="--config=${blocks.config.dir}" /> |
|
95 <arg value="--datasource=cmaker" /> |
|
96 <arg value="-Dwhatlog=${build.log.dir}/${build.id}_install.cmaker.log" /> |
|
97 <arg value="-Dconfigdir=${cmaker.component.dir}" /> |
|
98 <arg value="--updateData" /> |
|
99 </exec> |
|
100 </then> |
|
101 </if> |
|
102 </target> |
|
103 |
|
104 <!-- CMaker export configuration. --> |
|
105 <target name="cmaker-export" depends="cmaker-install" if="enable.cmaker"> |
|
106 <hlm:recordStartMacro name="${build.id}${cmaker.log.label}.export.cmaker.log" emacsmode="true"/> |
|
107 <hlm:cmakerMacro ncp="${cmaker.pp.version}" |
|
108 s60="${cmaker.s60.version}" |
|
109 action="export"/> |
|
110 <hlm:recordStopMacro name="${build.id}${cmaker.log.label}.export.cmaker.log"/> |
|
111 <hlm:metadatarecord database="${metadata.dbfile}"> |
|
112 <hlm:abldmetadatainput> |
|
113 <fileset casesensitive="false" file="${build.log.dir}/${build.id}${cmaker.log.label}.export.cmaker.log" /> |
|
114 <metadatafilterset refid="filterset.compile" /> |
|
115 </hlm:abldmetadatainput> |
|
116 </hlm:metadatarecord> |
|
117 </target> |
|
118 |
|
119 <!-- CMaker cleanup exported configuration. --> |
|
120 <target name="cmaker-clean" depends="cmaker-install" if="enable.cmaker"> |
|
121 <hlm:recordStartMacro name="${build.id}${cmaker.log.label}.clean.cmaker.log" emacsmode="true"/> |
|
122 <hlm:cmakerMacro ncp="${cmaker.pp.version}" |
|
123 s60="${cmaker.s60.version}" |
|
124 action="clean"/> |
|
125 <hlm:recordStopMacro name="${build.id}${cmaker.log.label}.clean.cmaker.log"/> |
|
126 <hlm:metadatarecord database="${metadata.dbfile}"> |
|
127 <hlm:abldmetadatainput> |
|
128 <fileset casesensitive="false" file="${build.log.dir}/${build.id}${cmaker.log.label}.clean.cmaker.log" /> |
|
129 <metadatafilterset refid="filterset.compile" /> |
|
130 </hlm:abldmetadatainput> |
|
131 </hlm:metadatarecord> |
|
132 </target> |
|
133 |
|
134 <!-- CMaker list the final destination of what will be exported. --> |
|
135 <target name="cmaker-what" depends="cmaker-install" if="enable.cmaker"> |
|
136 <hlm:recordStartMacro name="${build.id}${cmaker.log.label}.what.cmaker.log" emacsmode="true"/> |
|
137 <hlm:cmakerMacro ncp="${cmaker.pp.version}" |
|
138 s60="${cmaker.s60.version}" |
|
139 action="what"/> |
|
140 <hlm:recordStopMacro name="${build.id}${cmaker.log.label}.what.cmaker.log"/> |
|
141 <hlm:metadatarecord database="${metadata.dbfile}"> |
|
142 <hlm:abldmetadatainput> |
|
143 <fileset casesensitive="false" file="${build.log.dir}/${build.id}${cmaker.log.label}.what.cmaker.log" /> |
|
144 <metadatafilterset refid="filterset.compile" /> |
|
145 </hlm:abldmetadatainput> |
|
146 </hlm:metadatarecord> |
|
147 |
|
148 <!-- Blocks packaging configuration generation. --> |
|
149 <if> |
|
150 <istrue value="${blocks.enabled}" /> |
|
151 <then> |
|
152 <mkdir dir="${blocks.config.dir}" /> |
|
153 <exec executable="python"> |
|
154 <arg value="-m"/> |
|
155 <arg value="packager.cli"/> |
|
156 <arg value="--epocroot=${build.drive}/" /> |
|
157 <arg value="--config=${blocks.config.dir}" /> |
|
158 <arg value="--datasource=cmaker" /> |
|
159 <arg value="-Dwhatlog=${build.log.dir}/${build.id}${cmaker.log.label}.what.cmaker.log" /> |
|
160 <arg value="-Dconfigdir=${cmaker.config.dir}" /> |
|
161 <!--arg value="-Dname=${cmaker.log.label}"--> |
|
162 <arg value="--updateData" /> |
|
163 </exec> |
|
164 </then> |
|
165 </if> |
|
166 </target> |
|
167 |
|
168 <!-- CMaker list the source files what will be exported. --> |
|
169 <target name="cmaker-whatdeps" depends="cmaker-install" if="enable.cmaker"> |
|
170 <hlm:recordStartMacro name="${build.id}${cmaker.log.label}.whatdeps.cmaker.log" emacsmode="true"/> |
|
171 <hlm:cmakerMacro ncp="${cmaker.pp.version}" |
|
172 s60="${cmaker.s60.version}" |
|
173 action="what_deps"/> |
|
174 <hlm:recordStopMacro name="${build.id}${cmaker.log.label}.whatdeps.cmaker.log"/> |
|
175 <hlm:metadatarecord database="${metadata.dbfile}"> |
|
176 <hlm:abldmetadatainput> |
|
177 <fileset casesensitive="false" file="${build.log.dir}/${build.id}${cmaker.log.label}.whatdeps.cmaker.log" /> |
|
178 <metadatafilterset refid="filterset.compile" /> |
|
179 </hlm:abldmetadatainput> |
|
180 </hlm:metadatarecord> |
|
181 </target> |
|
182 </project> |
|
183 |