common/build.xml
changeset 397 3a9cb357ea5d
parent 396 178a6d6661b3
child 414 40b07ed8f169
equal deleted inserted replaced
396:178a6d6661b3 397:3a9cb357ea5d
   194         </copy>
   194         </copy>
   195         <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" todir="${build.log.dir}/BOM/"/>
   195         <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" todir="${build.log.dir}/BOM/"/>
   196         <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
   196         <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
   197     </target>
   197     </target>
   198 
   198 
   199     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-announce,sf-diamonds-tag-build,sf-record-proj-conf-bom">
   199     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-announce,sf-diamonds-tag-build,sf-record-proj-conf-bom,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
   200         <!-- tools baseline must come before epoc baseline to allow clean listing -->
       
   201         <if>
       
   202             <istrue value="${sf.spec.toolsbaseline.enable}" />
       
   203             <then>
       
   204 
       
   205                 <!-- record toolsbaseline information in BOM file -->
       
   206                 <delete file="${build.drive}/output/logs/BOM/toolsbaseline.txt" quiet="true"/>
       
   207                 <exec executable="cmd" output="${build.drive}/output/logs/BOM/toolsbaseline.txt">
       
   208                     <arg value="/c"/>
       
   209                     <arg value="echo"/>
       
   210                     <arg value="${sf.spec.toolsbaseline.location}"/>
       
   211                 </exec>
       
   212 
       
   213                 <!-- wrapper around preparation-getenv but with diff params -->
       
   214                 <runtarget target="sf-getenv-tools"/>
       
   215                 
       
   216                 <echo message="INFO Getting tools environment listing"/>
       
   217                 <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_toolsbaseline.log">
       
   218                     <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
       
   219                     <arg value="${build.drive}/epoc32"/>
       
   220                 </exec>
       
   221             </then>
       
   222             <else>
       
   223                 <!-- record fact that no tools baseline used. required by diamondize-bom  -->
       
   224                 <touch file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
       
   225             </else>
       
   226         </if>        
       
   227         <if>
       
   228             <istrue value="${sf.spec.baseline.enable}" />
       
   229             <then>
       
   230             
       
   231                 <!-- record baseline information in BOM file -->
       
   232                 <delete file="${build.drive}/output/logs/BOM/baseline.txt" quiet="true"/>
       
   233                 <exec executable="cmd" output="${build.drive}/output/logs/BOM/baseline.txt">
       
   234                     <arg value="/c"/>
       
   235                     <arg value="echo"/>
       
   236                     <arg value="${sf.spec.baseline.location}"/>
       
   237                 </exec>
       
   238                 
       
   239                 <!-- run internal target preparation-getenv -->
       
   240                 <runtarget target="preparation-getenv"/>
       
   241                 
       
   242             </then>
       
   243             <else>
       
   244                 <!-- record fact that no baseline used. required by diamondize-bom  -->
       
   245                 <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
       
   246             </else>
       
   247         </if>
       
   248 
       
   249         <if>
       
   250             <istrue value="${sf.spec.sourcesync.enable}" />
       
   251             <then>
       
   252                 <runtarget target="sf-get-source"/>                
       
   253                 <runtarget target="sf-package-source"/>                
       
   254                 <runtarget target="sf-unpack-rnd"/>
       
   255             </then>
       
   256             <else>
       
   257                 <!-- record fact that no sources.csv used. required by diamondize-bom  -->
       
   258                 <touch file="${build.log.dir}/BOM/sources.csv"/> 
       
   259             </else>
       
   260         </if>        
       
   261       <if>
       
   262         <istrue value="${sf.spec.publish.enable}"/>
       
   263         <then>
       
   264           <runtarget target="sf-diamondize-bom"/>
       
   265         </then>
       
   266       </if>
       
   267     </target>
       
   268     
   200     
   269     <target name="sf-prebuild-announce">
   201     <target name="sf-prebuild-announce">
   270         <echo>[SF-PREBUILD]</echo>
   202         <echo>[SF-PREBUILD]</echo>
   271     </target>
   203     </target>
   272 
   204 
   319         </exec>
   251         </exec>
   320         <echo message="dir ${sf.project.location} : revision ${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
   252         <echo message="dir ${sf.project.location} : revision ${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
   321 	<echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
   253 	<echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
   322     </target>
   254     </target>
   323 
   255 
       
   256     <target name="sf-getenvs">
       
   257         <!-- tools baseline must come before epoc baseline to allow clean listing -->
       
   258         <touch file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
       
   259         <if>
       
   260             <istrue value="${sf.spec.toolsbaseline.enable}" />
       
   261             <then>
       
   262 
       
   263                 <!-- record toolsbaseline information in BOM file -->
       
   264                 <echo message="${sf.spec.toolsbaseline.location}" file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
       
   265 
       
   266                 <!-- wrapper around preparation-getenv but with diff params -->
       
   267                 <runtarget target="sf-getenv-tools"/>
       
   268                 
       
   269                 <echo message="INFO Getting tools environment listing"/>
       
   270                 <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_toolsbaseline.log">
       
   271                     <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
       
   272                     <arg value="${build.drive}/epoc32"/>
       
   273                 </exec>
       
   274             </then>
       
   275         </if>        
       
   276 
       
   277         <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
       
   278         <if>
       
   279             <istrue value="${sf.spec.baseline.enable}" />
       
   280             <then>
       
   281                 <!-- record baseline information in BOM file -->
       
   282                 <echo message="${sf.spec.baseline.location}" file="${build.drive}/output/logs/BOM/baseline.txt"/>
       
   283                 
       
   284                 <!-- run internal target preparation-getenv -->
       
   285                 <runtarget target="preparation-getenv"/>
       
   286             </then>
       
   287         </if>
       
   288     </target>
       
   289 
   324     <target name="sf-getenv-tools">
   290     <target name="sf-getenv-tools">
   325         <antcall target="preparation-getenv" inheritAll="false">
   291         <antcall target="preparation-getenv" inheritAll="false">
   326             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
   292             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
   327             <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
   293             <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
   328         </antcall>
   294         </antcall>
       
   295     </target>
       
   296 
       
   297     <target name="sf-syncsource">
       
   298         <touch file="${build.log.dir}/BOM/sources.csv"/> 
       
   299         <if>
       
   300             <istrue value="${sf.spec.sourcesync.enable}" />
       
   301             <then>
       
   302                 <runtarget target="sf-get-source"/>                
       
   303                 <runtarget target="sf-package-source"/>                
       
   304                 <runtarget target="sf-unpack-rnd"/>
       
   305             </then>
       
   306         </if>        
   329     </target>
   307     </target>
   330 
   308 
   331     <!-- generate dir list using passed location and name 
   309     <!-- generate dir list using passed location and name 
   332     if a baseline list is available then generate deltas too -->
   310     if a baseline list is available then generate deltas too -->
   333 
   311 
   437     <target name="sf-get-source" depends="sf-generate-source-spec">
   415     <target name="sf-get-source" depends="sf-generate-source-spec">
   438         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
   416         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
   439     </target>
   417     </target>
   440     
   418     
   441     <target name="sf-diamondize-bom">
   419     <target name="sf-diamondize-bom">
   442         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   420         <if>
   443               outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   421             <istrue value="${sf.spec.publish.enable}"/>
   444             <data expandProperties="yes">
   422             <then>
   445                 ant: antProperties()
   423                 <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   446                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   424                       outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   447                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   425                     <data expandProperties="yes">
   448                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   426                         ant: antProperties()
   449                 toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
   427                         config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   450                 sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,type,rev,sysdef]})              
   428                         project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   451             </data>
   429                         baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   452         </fmpp>
   430                         toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
   453         <!-- Make a copy in BOM dir -->
   431                         sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,type,rev,sysdef]})              
   454         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   432                     </data>
       
   433                 </fmpp>
       
   434                 <!-- Make a copy in BOM dir -->
       
   435                 <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
       
   436             </then>
       
   437         </if>
   455     </target>
   438     </target>
   456 
   439 
   457     <target name="sf-preprocess-package-config">
   440     <target name="sf-preprocess-package-config">
   458         <mkdir dir="${sf.common.config.dir}/generated"/>
   441         <mkdir dir="${sf.common.config.dir}/generated"/>
   459             <if><istrue value="${sf.spec.package.src.enable}"/>
   442             <if><istrue value="${sf.spec.package.src.enable}"/>