sf-platform/build.xml
changeset 348 bf437da77ab4
parent 311 7d60f71b6a78
child 357 881cbdd44910
equal deleted inserted replaced
347:94b4a136d800 348:bf437da77ab4
     6   <!--
     6   <!--
     7   * Property defaults
     7   * Property defaults
     8    -->
     8    -->
     9 
     9 
    10   <!-- workaround until GenXML can merge v2.0.0 fragments -->
    10   <!-- workaround until GenXML can merge v2.0.0 fragments -->
       
    11   <!--
       
    12     This target is effectively a callback, called from compile-main.
       
    13     Its responsibility is to convert the set of peices in ref "system.definition.files" into one sys def with absolute paths
       
    14 
       
    15     However, in our builds, we know that there will only be one sysdef peice passed in, so that makes things a lot simpler
       
    16   -->
    11   <target name="create-canonical-sysdef-file">
    17   <target name="create-canonical-sysdef-file">
    12 
    18     <fail message="Symbian builds create a canonical system definition from exactly one peice">
    13     <runtarget target="preprocess-sysdef-files"/>
    19       <condition>
    14     <echo message="Exporting preprocessed System Definition"/>
    20         <resourcecount refid="system.definition.files" when="ne" count="1"/>
    15     <if><istrue value="${sf.spec.splitbuild}"/>
    21       </condition>
    16        <then>
    22     </fail>
    17        <if><istrue value="${sf.spec.os.skipbuild}" />
    23 
    18             <then><echo message="Skipping OS sysdef creation"/></then>
    24     <!-- Locate the first/only item referenced -->
    19        <else>
    25     <for param="file">
    20             <!-- TODO use better method to export or wait for GenXML fix?-->
    26       <resources refid="system.definition.files"/>
    21             <copy file="${build.output.dir}\build\input\0000000000000001_system_model_os.xml"
    27       <sequential>
    22             tofile="${canonical.sysdef.file}" failonerror="false" verbose="true"/>
    28         <echo message="@{file}"/>
    23        </else>
    29         <!-- Once a property is set, it stays set - bingo! -->
    24        </if>
    30         <property name="sf.first.system.definition" value="@{file}"/>
    25 
    31       </sequential>
    26        <if><istrue value="${sf.spec.s60.skipbuild}" />
    32     </for>
    27             <then><echo message="Skipping S60 sysdef creation"/></then>
    33 
    28        <else>
    34     <!-- Having located the file, copy it to the final desired location, absoluting tha paths as we go -->
    29             <!-- TODO use better method to export or wait for GenXML fix?-->
    35     <copy tofile="${canonical.sysdef.file}" file="${sf.first.system.definition}" overwrite="true" verbose="true">
    30             <copy file="${build.output.dir}\build\input\0000000000000001_system_model_s60.xml"
    36       <filterchain>
    31             tofile="${canonical.sysdef.file}" failonerror="false" verbose="true"/>
    37         <replaceregex pattern="bldFile=&quot;os" replace="bldFile=&quot;/sf/os" flags="gi"/>
    32 	   </else>
    38         <replaceregex pattern="mrp=&quot;os" replace="mrp=&quot;/sf/os" flags="gi"/>
    33 	   </if>
    39         <replaceregex pattern="bldFile=&quot;mw" replace="bldFile=&quot;/sf/mw" flags="gi"/>
    34 	   </then>
    40         <replaceregex pattern="mrp=&quot;mw" replace="mrp=&quot;/sf/mw" flags="gi"/>
    35 	
    41         <replaceregex pattern="bldFile=&quot;app" replace="bldFile=&quot;/sf/app" flags="gi"/>
    36 	<else>
    42         <replaceregex pattern="mrp=&quot;app" replace="mrp=&quot;/sf/app" flags="gi"/>
    37 	    <!-- TODO use better method to export or wait for GenXML fix?-->
    43         <replaceregex pattern="bldFile=&quot;tools" replace="bldFile=&quot;/sf/tools" flags="gi"/>
    38         <copy file="${build.output.dir}\build\input\0000000000000001_system_model.xml"
    44         <replaceregex pattern="mrp=&quot;tools" replace="mrp=&quot;/sf/tools" flags="gi"/>
    39         tofile="${canonical.sysdef.file}" failonerror="false" verbose="true"/>
    45         <replaceregex pattern="bldFile=&quot;adaptation" replace="bldFile=&quot;/sf/adaptation" flags="gi"/>
    40 
    46         <replaceregex pattern="mrp=&quot;adaptation" replace="mrp=&quot;/sf/adaptation" flags="gi"/>
    41 	</else>
    47         <expandproperties/>
    42         </if>
    48       </filterchain>
    43 
    49     </copy>
    44   </target>
    50 
    45 
    51  </target>
    46   <!--
       
    47     == Name: PREPROCESS-SYSDEF-FILES
       
    48     ==
       
    49     == Desc: Override of default target in order to deal with symbian os
       
    50     ==       system_definition.xml that does not have /sf source prefix
       
    51     ==
       
    52     ==       TODO get this moved as a Helium core target?
       
    53     -->
       
    54   <target name="preprocess-sysdef-files">
       
    55         <mkdir dir="${build.output.dir}/build/input"/>
       
    56         <delete verbose="true">
       
    57             <fileset dir="${build.output.dir}/build/input/" includes="**"/>
       
    58         </delete>
       
    59 
       
    60         <for param="file">
       
    61             <resources refid="system.definition.files"/>
       
    62             <sequential>
       
    63                 <copy todir="${build.output.dir}/build/input" verbose="true">
       
    64                     <fileset file="@{file}"/>
       
    65                     <filterchain>
       
    66                         <replaceregex pattern="bldFile=&quot;os" replace="bldFile=&quot;sf\\\\os" flags="gi"/>
       
    67                         <replaceregex pattern="mrp=&quot;os" replace="mrp=&quot;sf\\\\os" flags="gi"/>
       
    68                         <replaceregex pattern="bldFile=&quot;mw" replace="bldFile=&quot;sf\\\\mw" flags="gi"/>
       
    69                         <replaceregex pattern="mrp=&quot;mw" replace="mrp=&quot;sf\\\\mw" flags="gi"/>
       
    70                         <replaceregex pattern="bldFile=&quot;app" replace="bldFile=&quot;sf\\\\app" flags="gi"/>
       
    71                         <replaceregex pattern="mrp=&quot;app" replace="mrp=&quot;sf\\\\app" flags="gi"/>
       
    72                         <replaceregex pattern="bldFile=&quot;tools" replace="bldFile=&quot;sf\\\\tools" flags="gi"/>
       
    73                         <replaceregex pattern="mrp=&quot;tools" replace="mrp=&quot;sf\\\\tools" flags="gi"/>
       
    74                         <replaceregex pattern="bldFile=&quot;adaptation" replace="bldFile=&quot;sf\\\\adaptation" flags="gi"/>
       
    75                         <replaceregex pattern="mrp=&quot;adaptation" replace="mrp=&quot;sf\\\\adaptation" flags="gi"/>
       
    76                         
       
    77                         <expandproperties/>
       
    78                     </filterchain>
       
    79                     <mapper>
       
    80                         <scriptmapper language="jep" src="${helium.dir}/tools/common/jep/unique_filename.jep"/>
       
    81                     </mapper>
       
    82                 </copy>
       
    83             </sequential>
       
    84         </for>
       
    85     </target>
       
    86 
    52 
    87   <!--
    53   <!--
    88     == Name: SF-COMPILE
    54     == Name: SF-COMPILE
    89     ==
    55     ==
    90     == Desc: Override of common sf-compile target defined in
    56     == Desc: Override of common sf-compile target defined in