|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <project name="SF-COMPILE" xmlns:hlm="http://www.nokia.com/helium"> |
|
3 |
|
4 <math result="sf.spec.sbs.numberofjobs" operand1="${env.NUMBER_OF_PROCESSORS}" operation="*" operand2="2" datatype="int"/> |
|
5 |
|
6 <!-- compile specified sysdef file. called from sf-compile target in sf-platform/build.xml --> |
|
7 <target name="sf-os-compile"> |
|
8 |
|
9 <antcall target="sf-do-compile" inheritAll="false" inheritRefs="true"> |
|
10 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" /> |
|
11 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" /> |
|
12 </antcall> |
|
13 </target> |
|
14 |
|
15 <!-- compile specified sysdef file. called from sf-compile target in sf-platform/build.xml --> |
|
16 <target name="sf-s60-compile"> |
|
17 <antcall target="sf-do-compile" inheritAll="false" inheritRefs="true"> |
|
18 <param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" /> |
|
19 <reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" /> |
|
20 </antcall> |
|
21 </target> |
|
22 |
|
23 <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first. |
|
24 note: must be called from sf-os/s60-compile targets, as sys model input needed --> |
|
25 <target name="sf-do-compile"> |
|
26 <echo message="INFO Using Helium 7 for sf-do-compile"/> |
|
27 <propertyregex property="sf.unpack.tools" override="true" input="${sf.spec.baseline.getenv_options}" regexp="-i tools" select="true" defaultValue="false" casesensitive="false"/> |
|
28 |
|
29 <if> <!-- If tools baseline unpack has not been specified, or its not a "fast" build then try to build them --> |
|
30 <or> |
|
31 <isfalse value="${sf.unpack.tools}"/> |
|
32 <isfalse value="${sf.spec.baseline.enable}"/> |
|
33 <isfalse value="${sf.os.compile.fast}"/> |
|
34 </or> |
|
35 <then> |
|
36 <echo message="INFO Building tools, unpack is not specified"/> |
|
37 |
|
38 <!-- sf.spec.sbs.tools.config param used. do-target-build will decide to build sequentially/together --> |
|
39 <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true"> |
|
40 <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.tools.config}" /> |
|
41 </antcall> |
|
42 </then> |
|
43 <else> |
|
44 <echo message="INFO Skipping tools build, tools were unpacked from ${sf.spec.baseline.location}"/> |
|
45 </else> |
|
46 </if> |
|
47 |
|
48 <!-- sf.spec.sbs.config param used. do-target-build will decide to build sequentially/together --> |
|
49 <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true"> |
|
50 <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.config}" /> |
|
51 </antcall> |
|
52 </target> |
|
53 |
|
54 |
|
55 <!-- compile sbs.config list of targets either sequentially or together --> |
|
56 <target name="sf-do-target-compile"> |
|
57 |
|
58 <if> |
|
59 <istrue value="${sf.os.compile.iterate}"/> |
|
60 <then> |
|
61 <for list="${i.sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig"> |
|
62 <sequential> |
|
63 <!-- define sbs args, log name etc --> |
|
64 <hlm:sbsinput id="sf.build"> |
|
65 <sbsOptions> |
|
66 <arg line="-c @{item.sbs.splitconfig}"/> |
|
67 <arg line="-k" /> |
|
68 <arg line="-j ${sf.spec.sbs.numberofjobs}"/> |
|
69 <arg line="-t ${sf.spec.sbs.retry.limit}"/> |
|
70 <arg line="${sf.spec.sbs.options}"/> |
|
71 <arg name="--filters" value=""${sf.spec.sbs.filter.list}""/> |
|
72 <arg name="--logfile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_compile.log" /> |
|
73 <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_Makefile" /> |
|
74 </sbsOptions> |
|
75 </hlm:sbsinput> |
|
76 |
|
77 <!-- call helium's compile-main target using the sbsInput args defined above --> |
|
78 <echo message="INFO Iterative compile building target: @{item.sbs.splitconfig}"/> |
|
79 <antcall target="compile-main" inheritAll="false" inheritRefs="true"> |
|
80 <param name="build.system" value="${sf.spec.build.system}" /> |
|
81 <param name="sbs.inputs.list" value="sf.build"/> |
|
82 </antcall> |
|
83 |
|
84 </sequential> |
|
85 </for> |
|
86 </then> |
|
87 <else> |
|
88 <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names --> |
|
89 <propertyregex property="i.sf.spec.sbs.config.expanded" override="true" input="${i.sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${i.sf.spec.sbs.config}" global="true" casesensitive="false"/> |
|
90 <propertyregex property="i.sf.spec.sbs.config.expanded.logname" override="true" input="${i.sf.spec.sbs.config}" regexp="(,)" replace="_" defaultValue="${i.sf.spec.sbs.config}" global="true" casesensitive="false"/> |
|
91 <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/> |
|
92 <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname}"/> |
|
93 |
|
94 <!-- TODO: Make this use above compile-main call --> |
|
95 |
|
96 <!-- define sbs args, log name etc --> |
|
97 <hlm:sbsinput id="sf.build"> |
|
98 <sbsOptions> |
|
99 <arg line="-c ${i.sf.spec.sbs.config.expanded}"/> |
|
100 <arg line="-k" /> |
|
101 <arg line="-j ${sf.spec.sbs.numberofjobs}"/> |
|
102 <arg line="-t ${sf.spec.sbs.retry.limit}"/> |
|
103 <arg line="${sf.spec.sbs.options}"/> |
|
104 <arg name="--filters" value=""${sf.spec.sbs.filter.list}""/> |
|
105 <arg name="--logfile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_compile.log" /> |
|
106 <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_Makefile" /> |
|
107 </sbsOptions> |
|
108 </hlm:sbsinput> |
|
109 |
|
110 <!-- call helium's compile-main target using the sbsInput args defined above --> |
|
111 <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/> |
|
112 <antcall target="compile-main" inheritAll="false" inheritRefs="true"> |
|
113 <param name="build.system" value="${sf.spec.build.system}" /> |
|
114 <param name="sbs.inputs.list" value="sf.build"/> |
|
115 </antcall> |
|
116 |
|
117 </else> |
|
118 </if> |
|
119 </target> |
|
120 |
|
121 </project> |
|
122 |