common/build.xml
changeset 168 bf91a7e3c25b
parent 167 87306c6a6632
parent 166 32693583e769
child 207 6d9dd19b6949
equal deleted inserted replaced
167:87306c6a6632 168:bf91a7e3c25b
    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">
   434         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
   459         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
   435         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
   460         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
   436               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
   461               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
   437             <data expandProperties="yes">
   462             <data expandProperties="yes">
   438                 ant: antProperties()
   463                 ant: antProperties()
   439                 data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   464                 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   440             </data>
   465             </data>
   441         </fmpp>
   466         </fmpp>
   442         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   467         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   443     </target>
   468     </target>
   444     
   469     
   457 
   482 
   458     <target name="sf-preprocess-package-config">
   483     <target name="sf-preprocess-package-config">
   459         <mkdir dir="${sf.common.config.dir}/generated"/>
   484         <mkdir dir="${sf.common.config.dir}/generated"/>
   460         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   485         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   461             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   486             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   462             <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
   487             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   463             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   488             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   464             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   489             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   465         </exec>
   490         </exec>
   466     </target>
   491     </target>
   467     
   492     
   660             <arg value="${build.drive}/output/zips/postbuild/bin_rnd_internal_initial.zip"/>
   685             <arg value="${build.drive}/output/zips/postbuild/bin_rnd_internal_initial.zip"/>
   661         </exec>
   686         </exec>
   662 
   687 
   663         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
   688         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
   664             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
   689             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
   665             <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
   690             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   666             <arg value="${build.id}_what_results.csv_results.csv"/>
   691             <arg value="${build.id}_what_results.csv_results.csv"/>
   667             <arg value="${sf.project.location}/sysdefs/system_model_os_contributed.xml"/>
   692             <arg value="${sf.project.location}/sysdefs/system_model_os_contributed.xml"/>
   668             <arg value="${sf.project.location}/sysdefs/system_model_s60_contributed.xml"/>
   693             <arg value="${sf.project.location}/sysdefs/system_model_s60_contributed.xml"/>
   669         </exec>
   694         </exec>
   670 
   695