|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : rombuild.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 <!--* @package rombuild --> |
|
24 <project name="rombuild" xmlns:hlm="http://www.nokia.com/helium"> |
|
25 <description> |
|
26 ROM image creation using iMaker. |
|
27 Flash config file generation. |
|
28 </description> |
|
29 <import file="imaker.ant.xml" /> |
|
30 |
|
31 <!--* @property ee.rom.output.dir |
|
32 /output/development_flash_images/engineering_english/logs |
|
33 @type string |
|
34 @editable required |
|
35 @scope public |
|
36 --> |
|
37 |
|
38 <!--* @property core.rom.output.dir |
|
39 /output/release_flash_images/rnd/core |
|
40 @type string |
|
41 @editable required |
|
42 @scope public |
|
43 --> |
|
44 |
|
45 <!-- should be overriden - default configuration --> |
|
46 <!-- The path to the iMaker executable file. |
|
47 @type string |
|
48 @scope private |
|
49 --> |
|
50 <property name="imaker.command" location="${build.drive}\epoc32\tools\imaker.cmd" /> |
|
51 |
|
52 |
|
53 <!-- |
|
54 Creates subcon certified rom images. |
|
55 The build will be based on the hlm:imakerconfigurationset referenced |
|
56 as 'imaker.subcon.rom.config'. |
|
57 --> |
|
58 <target name="subcon-roms"> |
|
59 <if> |
|
60 <isreference refid="imaker.subcon.rom.config" /> |
|
61 <then> |
|
62 <antcall target="build-roms"> |
|
63 <param name="imaker.rom.name" value="_subcon_roms" /> |
|
64 <reference refid="imaker.subcon.rom.config" torefid="imaker.rom.config"/> |
|
65 </antcall> |
|
66 </then> |
|
67 <else> |
|
68 <echo>Configuration 'imaker.subcon.rom.config' not defined. Skipping subcon-roms build.</echo> |
|
69 </else> |
|
70 </if> |
|
71 </target> |
|
72 |
|
73 <!-- Internal target to export iMaker Helium additions. @scope private--> |
|
74 <target name="rombuild-export-features"> |
|
75 <copy todir="${build.drive}/epoc32/rom/config" overwrite="true"> |
|
76 <fileset dir="${helium.dir}/tools/rombuild/features" casesensitive="false"> |
|
77 <include name="*.mk" /> |
|
78 </fileset> |
|
79 </copy> |
|
80 </target> |
|
81 |
|
82 |
|
83 <!-- |
|
84 Creates trace rom images. |
|
85 The build will be based on the hlm:imakerconfigurationset referenced |
|
86 as 'imaker.trace.rom.config'. |
|
87 --> |
|
88 <target name="trace-roms"> |
|
89 <if> |
|
90 <isreference refid="imaker.trace.rom.config" /> |
|
91 <then> |
|
92 <antcall target="build-roms"> |
|
93 <param name="imaker.rom.name" value="_trace_roms" /> |
|
94 <reference refid="imaker.trace.rom.config" torefid="imaker.rom.config"/> |
|
95 </antcall> |
|
96 </then> |
|
97 <else> |
|
98 <echo>Configuration 'imaker.trace.rom.config' not defined. Skipping trace-roms build.</echo> |
|
99 </else> |
|
100 </if> |
|
101 </target> |
|
102 |
|
103 |
|
104 <!-- Internal iMaker macro. @scope private --> |
|
105 <macrodef name="internalImakerMacro" uri="http://www.nokia.com/helium"> |
|
106 <attribute name="product" /> |
|
107 <attribute name="target" /> |
|
108 <attribute name="makefile" default="" /> |
|
109 <attribute name="cmd" default="" /> |
|
110 <sequential> |
|
111 <var name="rom.product.path" unset="true" /> |
|
112 <script language="jython" setbeans="false"> |
|
113 <![CDATA[ |
|
114 import imaker |
|
115 import os |
|
116 os.chdir(project.getProperty('build.drive') + os.sep) |
|
117 project.setProperty('rom.product.path', imaker.get_product_dir(r'@{product}')) |
|
118 ]]> |
|
119 </script> |
|
120 <if> |
|
121 <equals arg1="@{makefile}" arg2="" /> |
|
122 <then> |
|
123 <var name="var.makefile" value="" /> |
|
124 </then> |
|
125 <else> |
|
126 <var name="var.makefile" value="-f ${rom.product.path}/@{makefile}" /> |
|
127 </else> |
|
128 </if> |
|
129 <exec executable="${imaker.command}" dir="${build.drive}/" failonerror="${failonerror}"> |
|
130 <arg line="-p@{product} @{cmd}" /> |
|
131 <arg line="${var.makefile}" /> |
|
132 <arg line="@{cmd}" /> |
|
133 <arg value="@{target}" /> |
|
134 </exec> |
|
135 </sequential> |
|
136 </macrodef> |
|
137 |
|
138 </project> |