common/build.xml
changeset 206 32693583e769
parent 201 9f98eafcf480
child 208 bf91a7e3c25b
equal deleted inserted replaced
205:25e06db2f72b 206:32693583e769
    22     <property name="publish" value="${sf.spec.publish.enable}"/>
    22     <property name="publish" value="${sf.spec.publish.enable}"/>
    23     <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
    23     <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
    24     <property name="build.system" value="${sf.spec.build.system}"/>
    24     <property name="build.system" value="${sf.spec.build.system}"/>
    25     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    25     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    27 
    27 	
       
    28 	
    28     <!-- import all core HELIUM targets -->
    29     <!-- import all core HELIUM targets -->
    29     <import file="${helium.dir}/helium.ant.xml" />
    30     <import file="${helium.dir}/helium.ant.xml" />
    30     
    31     
    31     <!-- import common references -->
    32     <!-- import common references -->
    32     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    33     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    33              
    34              
       
    35 	<!-- setup conditional Helium internal properties -->
       
    36 	<if><istrue value="${sf.spec.sourcesync.usecache}"/>
       
    37 		<then>
       
    38 			<property name="sf.spec.sourcesync.sourcespecdir" value="${sf.common.config.dir}/generated"/>
       
    39 		</then>
       
    40 		<else>
       
    41 			<property name="sf.spec.sourcesync.sourcespecdir" value="${sf.project.location}"/>
       
    42 		</else>
       
    43 	</if>
       
    44 
    34     <!-- conditional import of generated source spec if available -->
    45     <!-- conditional import of generated source spec if available -->
    35     <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
    46     <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
    36         <then>
    47         <then>
    37             <echo message="Generated source spec found, importing..." />
    48             <echo message="Generated source spec found, importing..." />
    38             <import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
    49             <import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
    39         </then>
    50         </then>
    40     </if>
    51     </if>
    41      
    52      
    42     
    53     
    43     <target name="sf-prep" depends="sf-generate-source-spec,prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
    54     <target name="sf-prep" depends="prep-drive,init-build-area,sf-generate-source-spec,check-tool-dependencies,create-bom,log-build-env">
    44         <echo>[SF-PREP]</echo>
    55         <echo>[SF-PREP]</echo>
    45         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
    56         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
    46     </target>
    57     </target>
    47         
    58         
    48     <target name="sf-build-all" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
    59     <target name="sf-build-all" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
    49         <echo>[SF-BUILD-ALL]</echo>
    60         <echo>[SF-BUILD-ALL]</echo>
    50     </target>
    61     </target>
    51 
    62     
    52     <target name="sf-build-and-pack" depends="sf-build-noprep,sf-postbuild">
    63     <target name="sf-build-and-pack" depends="sf-build-noprep,sf-postbuild">
    53         <echo>[SF-BUILD-AND-PACK]</echo>
    64         <echo>[SF-BUILD-AND-PACK]</echo>
    54     </target>
    65     </target>
    55 
    66 
    56     <target name="sf-build" depends="sf-prep,sf-prebuild,sf-build-noprep,sf-postbuild">
    67     <target name="sf-build" depends="sf-prep,sf-prebuild,sf-build-noprep,sf-postbuild">
    62     used by the builds. -->
    73     used by the builds. -->
    63         <echo message="Parse the project configuration" />
    74         <echo message="Parse the project configuration" />
    64     </target>
    75     </target>
    65     
    76     
    66     <target name="sf-generate-source-spec" depends="sf-parse-project-config">
    77     <target name="sf-generate-source-spec" depends="sf-parse-project-config">
       
    78 	
       
    79 		<!-- Generate the sources.csv if hg cache is activated -->
       
    80 		<if><istrue value="${sf.spec.sourcesync.usecache}"/>
       
    81 			<then>
       
    82 				<echo message="Generating Hg local cache..." />
       
    83 				<exec executable="perl" dir="${build.log.dir}" failonerror="true" output="${build.log.dir}/${build.id}_hgcache.log">
       
    84 					<arg value="${sf.common.config.dir}/tools/cachefiles.pl"/>
       
    85 					<arg value="${sf.spec.job.rootdir}/hgcache"/>
       
    86 					<arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
       
    87 					<arg value="${sf.common.config.dir}/generated/${sf.spec.sourcesync.sourcespecfile}"/>
       
    88 				</exec>
       
    89 			</then>
       
    90 		</if>
       
    91 		
    67         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
    92         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
    68         for multiple package builds, this needs to be linked with package name. -->
    93         for multiple package builds, this needs to be linked with package name. -->
    69         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
    94         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
    70         
    95         
    71         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
    96         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
    72               outputFile="${sf.common.config.dir}/generated/source-spec.ant.xml">
    97               outputFile="${sf.common.config.dir}/generated/source-spec.ant.xml">
    73               <data expandProperties="yes">
    98               <data expandProperties="yes">
    74                     ant: antProperties()
    99                     ant: antProperties()
    75                     data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   100                     data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
    76               </data>
   101               </data>
    77         </fmpp>
   102         </fmpp>
    78     </target>
   103     </target>
    79     
   104     
    80     <target name="sf-bc-check">
   105     <target name="sf-bc-check">
   433         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
   458         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
   434         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
   459         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
   435               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
   460               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
   436             <data expandProperties="yes">
   461             <data expandProperties="yes">
   437                 ant: antProperties()
   462                 ant: antProperties()
   438                 data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   463                 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   439             </data>
   464             </data>
   440         </fmpp>
   465         </fmpp>
   441         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   466         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   442     </target>
   467     </target>
   443     
   468     
   456 
   481 
   457     <target name="sf-preprocess-package-config">
   482     <target name="sf-preprocess-package-config">
   458         <mkdir dir="${sf.common.config.dir}/generated"/>
   483         <mkdir dir="${sf.common.config.dir}/generated"/>
   459         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   484         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   460             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   485             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   461             <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
   486             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   462             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   487             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   463             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   488             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   464         </exec>
   489         </exec>
   465     </target>
   490     </target>
   466     
   491     
   639             <arg value="${build.drive}/output/zips/postbuild/bin_rnd_internal_initial.zip"/>
   664             <arg value="${build.drive}/output/zips/postbuild/bin_rnd_internal_initial.zip"/>
   640         </exec>
   665         </exec>
   641 
   666 
   642         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
   667         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
   643             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
   668             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
   644             <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
   669             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   645             <arg value="${build.id}_what_results.csv_results.csv"/>
   670             <arg value="${build.id}_what_results.csv_results.csv"/>
   646             <arg value="${sf.project.location}/sysdefs/system_model_os_contributed.xml"/>
   671             <arg value="${sf.project.location}/sysdefs/system_model_os_contributed.xml"/>
   647             <arg value="${sf.project.location}/sysdefs/system_model_s60_contributed.xml"/>
   672             <arg value="${sf.project.location}/sysdefs/system_model_s60_contributed.xml"/>
   648         </exec>
   673         </exec>
   649 
   674