common/build.xml
changeset 313 52d855dfda13
parent 310 8337c2afc41f
child 346 f9ce0418735b
child 350 1e8f54745323
equal deleted inserted replaced
312:97c01977a87b 313:52d855dfda13
    96         </if>
    96         </if>
    97 
    97 
    98         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
    98         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
    99         for multiple package builds, this needs to be linked with package name. -->
    99         for multiple package builds, this needs to be linked with package name. -->
   100         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
   100         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
       
   101         <delete file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
   101         
   102         
   102         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   103         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   103               outputFile="${sf.common.config.dir}/generated/source-spec.ant.xml">
   104               outputFile="${sf.common.config.dir}/generated/source-spec.ant.xml">
   104               <data expandProperties="yes">
   105               <data expandProperties="yes">
   105                     ant: antProperties()
   106                     ant: antProperties()
   327         </if>
   328         </if>
   328 
   329 
   329         <if>
   330         <if>
   330             <istrue value="${sf.spec.sourcesync.enable}" />
   331             <istrue value="${sf.spec.sourcesync.enable}" />
   331             <then>
   332             <then>
   332                 <runtarget target="sf-get-source"/>
   333                 <runtarget target="sf-get-source"/>                
   333                 
   334                 <runtarget target="sf-package-source"/>                
   334                 <if><istrue value="${sf.spec.package.src.enable}"/>
       
   335                 <then>
       
   336                     <echo message="INFO Packaging Source"/>
       
   337                     <runtarget target="sf-package-source"/>
       
   338                 </then>
       
   339                 </if>
       
   340                 
       
   341                 <runtarget target="sf-unpack-rnd"/>
   335                 <runtarget target="sf-unpack-rnd"/>
   342             </then>
   336             </then>
   343             <else>
   337             <else>
   344                 <!-- record fact that no sources.csv used. required by diamondize-bom  -->
   338                 <!-- record fact that no sources.csv used. required by diamondize-bom  -->
   345                 <touch file="${build.log.dir}/BOM/sources.csv"/> 
   339                 <touch file="${build.log.dir}/BOM/sources.csv"/> 
   407         <!-- PUBLISH LOGS/REPORTS -->
   401         <!-- PUBLISH LOGS/REPORTS -->
   408         <if>
   402         <if>
   409             <istrue value="${sf.spec.publish.enable}" />
   403             <istrue value="${sf.spec.publish.enable}" />
   410             <then>
   404             <then>
   411                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   405                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   412                 <runtarget target="publish"/>
   406                 <runtarget target="sf-publish"/>
   413             </then>
   407             </then>
   414         </if>
   408         </if>
       
   409     </target>
       
   410 
       
   411     <target name="sf-publish" depends="prep-publish">
       
   412         <copy todir="${publish.dir}" preservelastmodified="true" failonerror="false">
       
   413            <fileset dir="${build.log.dir}"><include name="*.zip"/></fileset>
       
   414         </copy>
   415     </target>
   415     </target>
   416 
   416 
   417     <target name="sf-getenv-tools">
   417     <target name="sf-getenv-tools">
   418         <antcall target="preparation-getenv" inheritAll="false">
   418         <antcall target="preparation-getenv" inheritAll="false">
   419             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
   419             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
   589         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   589         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   590     </target>
   590     </target>
   591 
   591 
   592     <target name="sf-preprocess-package-config">
   592     <target name="sf-preprocess-package-config">
   593         <mkdir dir="${sf.common.config.dir}/generated"/>
   593         <mkdir dir="${sf.common.config.dir}/generated"/>
       
   594             <if><istrue value="${sf.spec.package.src.enable}"/>
       
   595             <then>
       
   596                 <echo message="INFO Packaging Source Repos"/>
       
   597                 <property name="sf-preprocess-package-config.arg" value=""/>
       
   598             </then>
       
   599             <else>
       
   600                 <echo message="INFO Packaging: Ignoring Source Repos"/>
       
   601                 <property name="sf-preprocess-package-config.arg" value="--nosource"/>
       
   602             </else>
       
   603             </if>
       
   604 
   594         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   605         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   595             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   606             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   596             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   607             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   597             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   608             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   598             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   609             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   599             <arg value="${build.log.dir}/rnd_excludefile.txt"/>
   610             <arg value="${build.log.dir}/rnd_excludefile.txt"/>
       
   611             <arg value="${sf-preprocess-package-config.arg}"/>
   600         </exec>
   612         </exec>
   601     </target>
   613     </target>
   602     
   614     
   603     <target name="sf-zip-content" depends="preprocess-zip-config">
   615     <target name="sf-zip-content" depends="preprocess-zip-config">
   604         <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" />
   616         <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" />
   772           <runtarget target="sf-run-analysis-ant"/>
   784           <runtarget target="sf-run-analysis-ant"/>
   773           <runtarget target="sf-run-analysis-raptor"/>
   785           <runtarget target="sf-run-analysis-raptor"/>
   774           <runtarget target="sf-run-analysis-yarp"/>
   786           <runtarget target="sf-run-analysis-yarp"/>
   775           <runtarget target="sf-run-analysis-whatlog-summary"/>
   787           <runtarget target="sf-run-analysis-whatlog-summary"/>
   776         </parallel>
   788         </parallel>
   777         <runtarget target="sf-run-analysis-diamonds"/>
   789         <if>
       
   790           <istrue value="${sf.spec.publish.enable}"/>
       
   791             <then>
       
   792             <runtarget target="sf-run-analysis-diamonds"/>
       
   793             </then>
       
   794         </if>    
   778     </target>
   795     </target>
   779 
   796 
   780     <target name="sf-run-analysis-ant">    
   797     <target name="sf-run-analysis-ant">    
   781         <echo message="Running source analysis of ANT output"/>
   798         <echo message="Running source analysis of ANT output"/>
   782         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
   799         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
  1076         <echo message="INFO Packaging MD5s"/>
  1093         <echo message="INFO Packaging MD5s"/>
  1077         <zip destfile="${temp.md5.zip}">
  1094         <zip destfile="${temp.md5.zip}">
  1078             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
  1095             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
  1079         </zip>
  1096         </zip>
  1080         <move file="${temp.md5.zip}" todir="${build.log.dir}" failonerror="false"/>
  1097         <move file="${temp.md5.zip}" todir="${build.log.dir}" failonerror="false"/>
  1081     </target>
  1098     </target>    
  1082 </project>
  1099 </project>
  1083 
  1100