common/build.xml
changeset 1121 82b232da6082
parent 1113 488afbbbaebd
child 1117 0006ed4e0b6d
equal deleted inserted replaced
1120:794ddd7e666a 1121:82b232da6082
    65     <!-- override helium 7 defaults to operate like helium 5.
    65     <!-- override helium 7 defaults to operate like helium 5.
    66        *.log.dir props dont exist yet so need to be set now, otherwise they 
    66        *.log.dir props dont exist yet so need to be set now, otherwise they 
    67        become immutable after helium.ant.xml import -->
    67        become immutable after helium.ant.xml import -->
    68       
    68       
    69     <property name="prep.log.dir"    value="${build.drive}/output/logs"/>
    69     <property name="prep.log.dir"    value="${build.drive}/output/logs"/>
    70     <property name="compile.log.dir" value="${build.drive}/output/logs"/>
    70     <!-- property name="compile.log.dir" value="${build.drive}/output/logs"/-->
    71     <property name="post.log.dir"    value="${build.drive}/output/logs"/>
    71     <property name="post.log.dir"    value="${build.drive}/output/logs"/>
    72     <property name="archive.log.dir"    value="${build.drive}/output/logs"/>
    72     <property name="archive.log.dir"    value="${build.drive}/output/logs"/>
    73     <property name="signals.log.dir"    value="${build.drive}/output/logs"/>
    73     <property name="signals.log.dir"    value="${build.drive}/output/logs"/>
    74      
    74      
    75     <if>
    75     <if>
    90     <!-- Import common references -->
    90     <!-- Import common references -->
    91     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    91     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    92              
    92              
    93     <!-- Import functionality distributed into other file(s) -->
    93     <!-- Import functionality distributed into other file(s) -->
    94     <import file="${sf.common.config.dir}/build.postbuild.xml"/>
    94     <import file="${sf.common.config.dir}/build.postbuild.xml"/>
    95 	
    95     
    96     <!-- Import test functionality distributed into other file(s) -->
    96     <!-- Import test functionality distributed into other file(s) -->
    97     <import file="${sf.common.config.dir}/build.test.xml"/>
    97     <import file="${sf.common.config.dir}/build.test.xml"/>
    98     
    98     
    99     <!-- helium 7+ compatability. needs to be defined -->
    99     <!-- helium 7+ compatability. needs to be defined -->
   100     <if>
   100     <if>
   117           </hlm:signalInput>
   117           </hlm:signalInput>
   118 
   118 
   119           <hlm:signalInput id="signalRunQMakeInput" failbuild="never">
   119           <hlm:signalInput id="signalRunQMakeInput" failbuild="never">
   120             <hlm:notifierListRef refid="defaultFailNotifier" />
   120             <hlm:notifierListRef refid="defaultFailNotifier" />
   121           </hlm:signalInput>
   121           </hlm:signalInput>
   122 
   122           
       
   123            <!-- allow use of a release_metadata.xml without all referenced files being present -->
       
   124           <hlm:signalInput id="getenvSignalInput" failbuild="never">
       
   125               <hlm:notifierListRef refid="defaultFailNotifier" />
       
   126           </hlm:signalInput>
   123       </then>
   127       </then>
   124     </if>
   128     </if>
   125     
   129     
   126     <!--
   130     <!--
   127       - END OF PROPERTY DEFINITIONS, TARGETS START HERE
   131       - END OF PROPERTY DEFINITIONS, TARGETS START HERE
   128       -->
   132       -->
   129     
   133     
   130     <target name="sf-prep" depends="sf-prep-announce,prep-drive,init-build-area,create-bom,log-build-env,sf-get-utils">
   134     <target name="sf-prep" depends="sf-prep-announce,prep-drive,init-build-area,create-bom,log-build-env,sf-get-utils">
   131         <!-- Test for the disk space we would like for this build -->
   135         <!-- Test for the disk space we would like for this build -->
   132 	<fail>
   136         <fail>
   133             <condition>
   137             <condition>
   134                 <not>
   138                 <not>
   135                     <or>
   139                     <or>
   136                         <isset property="sf.suppress.drive.space.check"/>
   140                         <isset property="sf.suppress.drive.space.check"/>
   137                         <hasfreespace partition="${build.drive}" needed="${sf.drive.space.needed}"/>
   141                         <hasfreespace partition="${build.drive}" needed="${sf.drive.space.needed}"/>
   142         </fail>
   146         </fail>
   143 
   147 
   144         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
   148         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
   145 
   149 
   146         <runtarget target="sf-check-env"/>
   150         <runtarget target="sf-check-env"/>
       
   151         
       
   152         <!-- create zips folder for use later -->
       
   153         <mkdir dir="${build.drive}/output/zips"/>
   147         <stopwatch name="sf-prep" action="elapsed"/>
   154         <stopwatch name="sf-prep" action="elapsed"/>
   148     </target>
   155     </target>
   149 
   156 
   150     <target name="sf-prep-announce">    
   157     <target name="sf-prep-announce">    
   151         <stopwatch name="sf-prep"/>
   158         <stopwatch name="sf-prep"/>
   153     </target>
   160     </target>
   154 
   161 
   155     <target name="sf-check-env">
   162     <target name="sf-check-env">
   156         <echo message="Create report on environment info"/>
   163         <echo message="Create report on environment info"/>
   157         <!-- Dario's environment dumper -->
   164         <!-- Dario's environment dumper -->
   158     	  <if>
   165         <if>
   159             <isset property="sf.spec.baseline.location"/>
   166             <isset property="sf.spec.baseline.location"/>
   160             <then>
   167             <then>
   161                 <exec executable="perl" dir="${build.drive}/utilities/envinfo">
   168                 <exec executable="perl" dir="${build.drive}/utilities/envinfo">
   162                     <arg value="envinfo.pl"/>
   169                     <arg value="envinfo.pl"/>
   163                     <arg value="-r"/>
   170                     <arg value="-r"/>
   174       </if>
   181       </if>
   175       <echo message="Translate \output\logs\envinfo.txt into a Diamonds file"/>
   182       <echo message="Translate \output\logs\envinfo.txt into a Diamonds file"/>
   176       <exec executable="perl" dir="${build.drive}">
   183       <exec executable="perl" dir="${build.drive}">
   177           <arg value="${sf.common.config.dir}/tools/envinfo2diamonds.pl"/>
   184           <arg value="${sf.common.config.dir}/tools/envinfo2diamonds.pl"/>
   178       </exec>
   185       </exec>
   179     	
   186         
   180         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
   187         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
   181         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
   188         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
   182             <then>
   189             <then>
   183                 <property name="sf.buildenv.location" value="${sf.project.location}"/>
   190                 <property name="sf.buildenv.location" value="${sf.project.location}"/>
   184             </then>
   191             </then>
   213             </condition>
   220             </condition>
   214 Build Environment Check failed (${sf.checkenv.exit}). To stop this failure aborting the build set property sf.suppress.buildenv.check to any value.
   221 Build Environment Check failed (${sf.checkenv.exit}). To stop this failure aborting the build set property sf.suppress.buildenv.check to any value.
   215         </fail>
   222         </fail>
   216     </target>
   223     </target>
   217 
   224 
   218     <target name="sf-summary" depends="">
       
   219         <echo>[SF-SUMMARY]</echo>
       
   220         <echo message="Generating build summary"/>
       
   221         <exec executable="perl" dir="${sf.common.config.dir}/tools/summary" failonerror="true">
       
   222           <arg value="brag_script.pl"/>
       
   223           <arg value="--buildid=${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
       
   224           <arg value="--basedir=${sf.spec.job.rootdir}"/>
       
   225         </exec>
       
   226     </target>
       
   227     
       
   228     <target name="sf-build-all" depends="sf-prebuild-noprep,sf-build-noprep,sf-postbuild">
       
   229         <echo>[SF-BUILD-ALL]</echo>
       
   230     </target>
       
   231     
       
   232     <target name="sf-build-and-pack" depends="sf-build-noprep,sf-postbuild">
       
   233         <echo>[SF-BUILD-AND-PACK]</echo>
       
   234     </target>
       
   235 
       
   236     <target name="sf-build" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
       
   237         <echo>[SF-BUILD]</echo>
       
   238     </target>
       
   239     
       
   240     <target name="sf-scrub-build" description="Cleans up everything left behind after a build. Danger!">
       
   241         <if>
       
   242             <available file="${sf.spec.job.drive}/"/>
       
   243             <then>
       
   244                 <!-- Un-subst the drive -->
       
   245                 <hlm:unsubst drive="${sf.spec.job.drive}"/>
       
   246             </then>
       
   247         </if>
       
   248         <!-- Delete build directory -->
       
   249         <delete dir="${prep.build.dir}"/>
       
   250     </target>
       
   251     
       
   252     <!-- Note: Not used from Helium 7 onwards -->
   225     <!-- Note: Not used from Helium 7 onwards -->
   253     <target name="generate-layers">
   226     <target name="generate-layers">
   254        <echo message="canno-file:${canonical.sysdef.file}"/>
   227        <echo message="canno-file:${canonical.sysdef.file}"/>
   255        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   228        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   256 
   229 
   265             </linecontainsregexp>
   238             </linecontainsregexp>
   266         </filterchain>
   239         </filterchain>
   267         </copy>
   240         </copy>
   268         <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" todir="${build.log.dir}/BOM/"/>
   241         <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" todir="${build.log.dir}/BOM/"/>
   269         <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
   242         <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
       
   243     </target>
       
   244 
       
   245     <target name="sf-summary" depends="">
       
   246         <echo>[SF-SUMMARY]</echo>
       
   247         <echo message="Generating build summary"/>
       
   248         <exec executable="perl" dir="${sf.common.config.dir}/tools/summary" failonerror="true">
       
   249           <arg value="brag_script.pl"/>
       
   250           <arg value="--buildid=${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
       
   251           <arg value="--basedir=${sf.spec.job.rootdir}"/>
       
   252         </exec>
       
   253     </target>
       
   254     
       
   255     <target name="sf-build-all" depends="sf-prebuild-noprep,sf-build-noprep,sf-postbuild">
       
   256         <echo>[SF-BUILD-ALL]</echo>
       
   257     </target>
       
   258     
       
   259     <target name="sf-build-and-pack" depends="sf-build-noprep,sf-postbuild">
       
   260         <echo>[SF-BUILD-AND-PACK]</echo>
       
   261     </target>
       
   262 
       
   263     <target name="sf-build" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
       
   264         <echo>[SF-BUILD]</echo>
       
   265     </target>
       
   266     
       
   267     <target name="sf-scrub-build" description="Cleans up everything left behind after a build. Danger!">
       
   268         <if>
       
   269             <available file="${sf.spec.job.drive}/"/>
       
   270             <then>
       
   271                 <!-- Un-subst the drive -->
       
   272                 <hlm:unsubst drive="${sf.spec.job.drive}"/>
       
   273             </then>
       
   274         </if>
       
   275         <!-- Delete build directory -->
       
   276         <delete dir="${prep.build.dir}"/>
   270     </target>
   277     </target>
   271 
   278 
   272     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
   279     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
   273     <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-envinfo,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom">
   280     <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-envinfo,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom">
   274         <stopwatch name="sf-prebuild" action="elapsed"/>
   281         <stopwatch name="sf-prebuild" action="elapsed"/>
   296         <istrue value="${sf.spec.publish.enable}"/>
   303         <istrue value="${sf.spec.publish.enable}"/>
   297         <then>
   304         <then>
   298           <echo>[SF-DIAMONDS-ENVINFO]</echo>
   305           <echo>[SF-DIAMONDS-ENVINFO]</echo>
   299           <echo message="Send ${build.log.dir}/diamonds_envinfo.xml to Diamonds"/>
   306           <echo message="Send ${build.log.dir}/diamonds_envinfo.xml to Diamonds"/>
   300           <exec executable="python">
   307           <exec executable="python">
   301 		    <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
   308             <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
   302 		    <arg value="-u"/>
   309             <arg value="-u"/>
   303 		    <arg value="http://${diamonds.host}${diamonds.build.id}"/>
   310             <arg value="http://${diamonds.host}${diamonds.build.id}"/>
   304 		    <arg value="-f"/>
   311             <arg value="-f"/>
   305 		    <arg value="${build.log.dir}/diamonds_envinfo.xml"/>
   312             <arg value="${build.log.dir}/diamonds_envinfo.xml"/>
   306 		  </exec>
   313           </exec>
   307         </then>
   314         </then>
   308       </if>
   315       </if>
   309     </target>
   316     </target>
   310 
   317 
   311     <target name="sf-diamonds-tag-build">
   318     <target name="sf-diamonds-tag-build">
   346         <propertyregex input="${sf.job.bom.project.repo}" regexp="\\" replace="/" global="true" property="sf.job.bom.project.repo" override="true"/>
   353         <propertyregex input="${sf.job.bom.project.repo}" regexp="\\" replace="/" global="true" property="sf.job.bom.project.repo" override="true"/>
   347         <exec executable="hg" dir="${sf.project.location}" outputproperty="sf.job.bom.project.checksum">
   354         <exec executable="hg" dir="${sf.project.location}" outputproperty="sf.job.bom.project.checksum">
   348             <arg value="identify"/>
   355             <arg value="identify"/>
   349             <arg value="-i"/>
   356             <arg value="-i"/>
   350         </exec>
   357         </exec>
   351 	<echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
   358         <echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
   352     </target>
   359     </target>
   353     
   360     
   354     <target name="sf-get-utils">
   361     <target name="sf-get-utils">
   355     	<stopwatch name="sf-get-utils"/>
   362       <stopwatch name="sf-get-utils"/>
   356         <echo message="Cloning utilities repository to ${build.drive}/utilities"/>
   363         <echo message="Cloning utilities repository to ${build.drive}/utilities"/>
   357         <exec executable="hg">
   364         <exec executable="hg">
   358             <arg value="clone"/>
   365             <arg value="clone"/>
   359             <arg value="--updaterev"/>
   366             <arg value="--updaterev"/>
   360             <arg value="default"/>
   367             <arg value="default"/>
   361             <arg value="http://developer.symbian.org/oss/MCL/sftools/fbf/utilities"/>
   368             <arg value="http://developer.symbian.org/oss/MCL/sftools/fbf/utilities"/>
   362             <arg value="${build.drive}/utilities"/>
   369             <arg value="${build.drive}/utilities"/>
   363         </exec>
   370         </exec>
   364     	<stopwatch name="sf-get-utils" action="elapsed"/>
   371       <stopwatch name="sf-get-utils" action="elapsed"/>
   365     </target>
   372     </target>
   366 
   373 
   367     <target name="sf-getenvs">
   374     <target name="sf-getenvs">
   368         <stopwatch name="sf-getenvs"/>
   375         <stopwatch name="sf-getenvs"/>
   369         <!-- create BOM dir -->
   376         <!-- create BOM dir -->
   398                 <stopwatch name="sf-getenvs (baseline)"/>
   405                 <stopwatch name="sf-getenvs (baseline)"/>
   399                 <!-- record baseline information in BOM file -->
   406                 <!-- record baseline information in BOM file -->
   400                 <echo message="${sf.spec.baseline.location}" file="${build.drive}/output/logs/BOM/baseline.txt"/>
   407                 <echo message="${sf.spec.baseline.location}" file="${build.drive}/output/logs/BOM/baseline.txt"/>
   401                 
   408                 
   402                 <!-- run internal target preparation-getenv -->
   409                 <!-- run internal target preparation-getenv -->
       
   410                 <delete file="${build.drive}/currentRelease.xml"/>        
   403                 <runtarget target="preparation-getenv"/>
   411                 <runtarget target="preparation-getenv"/>
   404                 <stopwatch name="sf-getenvs (baseline)" action="elapsed"/>
   412                 <stopwatch name="sf-getenvs (baseline)" action="elapsed"/>
   405             </then>
   413             </then>
   406         </if>
   414         </if>
   407         <stopwatch name="sf-getenvs" action="elapsed"/>
   415         <stopwatch name="sf-getenvs" action="elapsed"/>
   429     </target>
   437     </target>
   430     
   438     
   431     <target name="sf-get-source" depends="sf-generate-source-spec">
   439     <target name="sf-get-source" depends="sf-generate-source-spec">
   432         <stopwatch name="sf-get-source"/>
   440         <stopwatch name="sf-get-source"/>
   433         <!-- Get test manifest, and move resolved csv so that it doesnt conflict with source-spec.ant.xml -->
   441         <!-- Get test manifest, and move resolved csv so that it doesnt conflict with source-spec.ant.xml -->
   434         <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
   442         <if>
   435         <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
   443             <istrue value="${sf.spec.smoketest.enable}"/>
       
   444             <then>
       
   445                 <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
       
   446                 <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
       
   447             </then>
       
   448         </if>
       
   449 
       
   450 
       
   451         <if><available file="${temp.build.dir}/source-rnd-spec.ant.xml"/>
       
   452           <then>
       
   453               <ant antfile="${temp.build.dir}/source-rnd-spec.ant.xml" />
       
   454               <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_rnd.csv"/>
       
   455           </then>
       
   456         </if>
       
   457         
   436         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
   458         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
   437         <stopwatch name="sf-get-source" action="elapsed"/>
   459         <stopwatch name="sf-get-source" action="elapsed"/>
   438     </target>
   460     </target>
   439     
   461     
   440     <target name="sf-generate-source-spec">
   462     <target name="sf-generate-source-spec">
   479         
   501         
   480         <if>
   502         <if>
   481             <istrue value="${sf.spec.sourcesync.enable}" />
   503             <istrue value="${sf.spec.sourcesync.enable}" />
   482             <then>
   504             <then>
   483                 <property name="sf.source.csv.file" value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   505                 <property name="sf.source.csv.file" value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   484             </then>
   506                 <property name="sf.source_rnd.csv.file" value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile.rnd}"/>
   485         </if>
   507             </then>
   486         <property name="sf.source.csv.file" value="nul:"/>
   508         </if>
       
   509         <property name="sf.source.csv.file"     value="nul:"/>
       
   510         <property name="sf.source_rnd.csv.file" value="nul:"/>
   487 
   511 
   488         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   512         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   489               outputFile="${temp.build.dir}/source-spec.ant.xml">
   513               outputFile="${temp.build.dir}/source-spec.ant.xml">
   490               <data expandProperties="yes">
   514               <data expandProperties="yes">
   491                     ant: antProperties()
   515                     ant: antProperties()
   492                     data: [
   516                     data: [
   493                         csv(${sf.source.csv.file}, {separator:','})
   517                         csv(${sf.source.csv.file}, {separator:','})
   494                     ]
   518                     ]
   495               </data>
   519               </data>
   496         </fmpp>
   520         </fmpp>
   497         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   521 		
   498               outputFile="${temp.build.dir}/source-test-spec.ant.xml">
   522         <if><available file="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile.rnd}"/>
   499               <data expandProperties="yes">
   523           <then>
   500                     ant: antProperties()
   524             <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   501                     data: [
   525                   outputFile="${temp.build.dir}/source-rnd-spec.ant.xml">
   502                         csv(${sf.test.csv.file}, {separator:','})
   526                   <data expandProperties="yes">
   503                     ]
   527                         ant: antProperties()
   504               </data>
   528                         data: [
   505         </fmpp>
   529                             csv(${sf.source_rnd.csv.file}, {separator:','})
       
   530                         ]
       
   531                   </data>
       
   532             </fmpp>
       
   533           </then>
       
   534         </if>
       
   535         <if>
       
   536             <istrue value="${sf.spec.smoketest.enable}"/>
       
   537             <then>
       
   538             <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
       
   539                   outputFile="${temp.build.dir}/source-test-spec.ant.xml">
       
   540                   <data expandProperties="yes">
       
   541                         ant: antProperties()
       
   542                         data: [
       
   543                             csv(${sf.test.csv.file}, {separator:','})
       
   544                         ]
       
   545                   </data>
       
   546             </fmpp>
       
   547             </then>
       
   548         </if>
   506     </target>
   549     </target>
   507     
   550     
   508     <!-- generate dir list using passed location and name 
   551     <!-- generate dir list using passed location and name 
   509     if a baseline list is available then generate deltas too -->
   552     if a baseline list is available then generate deltas too -->
   510 
   553 
   623                 ant: antProperties()
   666                 ant: antProperties()
   624                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   667                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   625                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   668                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   626                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   669                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   627                 toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
   670                 toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
   628                 sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,type,rev,sysdef]})              
   671                 sources: csv(${build.drive}/output/logs/BOM/sources.csv, {separator:',',headers:[loc,dst,type,rev,sysdef]})
   629             </data>
   672             </data>
   630         </fmpp>
   673         </fmpp>
   631         <!-- Make a copy in BOM dir -->
   674         <!-- Make a copy in BOM dir -->
   632         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   675         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   633     </target>
   676     </target>
   634 
   677 
   635     <target name="sf-preprocess-package-config">
   678     <target name="sf-preprocess-package-config">
   636 	<echo message="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   679     <echo message="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   637         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   680         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   638             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   681             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   639             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   682             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   640             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   683             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   641             <arg value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   684             <arg value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   724         </if>
   767         </if>
   725     </target>
   768     </target>
   726     
   769     
   727     <!-- Unpack the rnd zips ready to be used in the build -->
   770     <!-- Unpack the rnd zips ready to be used in the build -->
   728     <target name="sf-unpack-rnd">
   771     <target name="sf-unpack-rnd">
   729         <echo message="Unpacking any available RnD binaries"/>
   772         <echo message="INFO Unpacking any available RnD binaries"/>
   730         <for param="rndZip">
   773         <for param="rndZip">
   731             <fileset dir="${build.drive}/output/zips/">
   774             <fileset dir="${build.drive}/output/zips/">
   732                 <include name="binaries_*.zip"/> <!-- Internal rnd bins -->
   775                 <include name="binaries_*.zip"/> <!-- Internal rnd bins -->
   733                 <include name="release/bin_*.zip"/> <!-- Releaseable rnd bins -->
   776                 <include name="release/bin_*.zip"/> <!-- Releaseable rnd bins -->
   734             </fileset>
   777             </fileset>
   738                     <arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF -->
   781                     <arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF -->
   739                     <arg value="-i!epoc32\*"/> <!-- Only unzip items into the epoc32 tree -->
   782                     <arg value="-i!epoc32\*"/> <!-- Only unzip items into the epoc32 tree -->
   740                     <arg value="@{rndZip}"/>
   783                     <arg value="@{rndZip}"/>
   741                 </exec>
   784                 </exec>
   742             </sequential>
   785             </sequential>
   743 	</for>
   786         </for>
       
   787 
       
   788         <if><istrue value="${sf.spec.baseline.enable}"/>
       
   789         <then>
       
   790 
       
   791         <!-- also unpack any rnd bins from baseline location. may collide with package build getenv -->
       
   792         <delete file="${build.drive}/currentRelease.xml"/>        
       
   793         <antcall target="preparation-getenv" inheritAll="false">
       
   794             <param name="base_release.path"           value="${sf.spec.baseline.location}"/>
       
   795             <param name="base_release.getenv_options" value="-i rnd -k"/>
       
   796         </antcall>
       
   797         </then>
       
   798         </if>
   744     </target>
   799     </target>
   745 
   800 
   746   <target name="sf-compile-options">  
   801   <target name="sf-compile-options">  
   747     <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options"/>
   802     <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options"/>
   748     <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options"/>
   803     <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options"/>
   752     <target name="sf-log-to-brag">
   807     <target name="sf-log-to-brag">
   753         <mkdir dir="${build.log.dir}/summary"/>
   808         <mkdir dir="${build.log.dir}/summary"/>
   754         <echo message="Generating ${sf.brag.id}_BRAG.xml from ${sf.brag.log}"/>
   809         <echo message="Generating ${sf.brag.id}_BRAG.xml from ${sf.brag.log}"/>
   755         <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/${sf.brag.id}_BRAG.xml" logError="true">
   810         <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/${sf.brag.id}_BRAG.xml" logError="true">
   756             <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
   811             <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
   757 	    <arg value="--phase=${sf.brag.phase}"/>
   812         <arg value="--phase=${sf.brag.phase}"/>
   758             <arg value="--step=${sf.brag.step}"/>
   813             <arg value="--step=${sf.brag.step}"/>
   759             <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.${sf.brag.id}.tsv"/>
   814             <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.${sf.brag.id}.tsv"/>
   760             <arg value="${sf.brag.log}"/>
   815             <arg value="${sf.brag.log}"/>
   761         </exec>
   816         </exec>
   762         <!-- And copy the XSL so the output can be transformed by a browser -->
   817         <!-- And copy the XSL so the output can be transformed by a browser -->