build/utilities.xml
branchRCL_3
changeset 77 7cee158cb8cd
parent 24 0fd27995241b
child 83 26b2b12093af
child 87 1627c337e51e
equal deleted inserted replaced
71:d5e927d5853b 77:7cee158cb8cd
    10 # Initial Contributors:
    10 # Initial Contributors:
    11 # Nokia Corporation - initial contribution.
    11 # Nokia Corporation - initial contribution.
    12 #
    12 #
    13 # Contributors:
    13 # Contributors:
    14 #
    14 #
    15 # Description: 
    15 # Description:
    16 #
    16 #
    17 -->
    17 -->
    18 
    18 
    19 <project name="Utilities">
    19 <project name="Utilities">
    20 
    20 
    22   This file contains common utilities for each build.xml file.
    22   This file contains common utilities for each build.xml file.
    23   Following properties are mandatory for a basic build process. Most of the
    23   Following properties are mandatory for a basic build process. Most of the
    24   APIs can use default values, but if some property is not suitable, it can
    24   APIs can use default values, but if some property is not suitable, it can
    25   be overridden.
    25   be overridden.
    26 
    26 
    27     java.src.paths    The source path. If there are more than one source path 
    27     java.src.paths    The source path. If there are more than one source path
    28                       concatenate the paths using ':' as separator. Default is
    28                       concatenate the paths using ':' as separator. Default is
    29                       '../javasrc
    29                       '../javasrc
    30 
    30 
    31     java.src.second.paths    The source path for the second phase compilation. 
    31     java.src.second.paths    The source path for the second phase compilation.
    32                       If there are more than one source path concatenate the 
    32                       If there are more than one source path concatenate the
    33                       paths using ':' as separator. Default is '../javasrc.cdc
    33                       paths using ':' as separator. Default is '../javasrc.cdc
    34 
    34 
    35     bootclasspath     The bootclasspath used for compile time. Default is CLDC
    35     bootclasspath     The bootclasspath used for compile time. Default is CLDC
    36 
    36 
    37     bootclasspath.second     The bootclasspath used for the second phase 
    37     bootclasspath.second     The bootclasspath used for the second phase
    38                       compilation.. Default is CDC
    38                       compilation.. Default is CDC
    39 
    39 
    40     native.dll.name   The name of the dll (without extension) which will 
    40     native.dll.name   The name of the dll (without extension) which will
    41                       contain the rommized byte code. The default value is the 
    41                       contain the rommized byte code. The default value is the
    42                       name of the ant project.
    42                       name of the ant project.
    43   
    43 
    44   
    44 
    45   Following properties are optionals:
    45   Following properties are optionals:
    46 
    46 
    47     javah.classnames        A list of classes using ',' as separator to be 
    47     javah.classnames        A list of classes using ',' as separator to be
    48                             "javah"ed.
    48                             "javah"ed.
    49 
    49 
    50 -->
    50 -->
    51 
    51 
    52 
    52 
    53   <import file="properties.xml"/>
    53   <import file="properties.xml"/>
    54 
    54 
    55   
    55 
    56   <!--Importing platform specific utilities. This might seem quite complex,
    56   <!--Importing platform specific utilities. This might seem quite complex,
    57       since we need to import a default one (utilities.fake.xml), because
    57       since we need to import a default one (utilities.fake.xml), because
    58       the property ${platform.utilities.xml.file} need to have some meaningful
    58       the property ${platform.utilities.xml.file} need to have some meaningful
    59       value when the utilities.xml is used for the first time. The default one 
    59       value when the utilities.xml is used for the first time. The default one
    60       isn't used at all, instead the platform dependent xml file is defined 
    60       isn't used at all, instead the platform dependent xml file is defined
    61       using additional antcall after the dynamic properties have been defined.
    61       using additional antcall after the dynamic properties have been defined.
    62       See targets deploy and deploy.dual-->
    62       See targets deploy and deploy.dual-->
    63   <import file="${platform.utilities.xml.file}"/>
    63   <import file="${platform.utilities.xml.file}"/>
    64 
    64 
    65 
    65 
    76 
    76 
    77 
    77 
    78 <!--STARTING POINTS START-->
    78 <!--STARTING POINTS START-->
    79 
    79 
    80   <!--The start point of the component's build when there are classes that can
    80   <!--The start point of the component's build when there are classes that can
    81       be compiled against same configuration (cldc, cdc, etc). This is the 
    81       be compiled against same configuration (cldc, cdc, etc). This is the
    82       normal case for the most of the components-->
    82       normal case for the most of the components-->
    83   <target name="deploy" depends="init.properties, make.target.dirs">
    83   <target name="deploy" depends="init.properties, make.target.dirs, component.init">
    84     <antcall target="deploy.internal">
    84     <antcall target="deploy.internal">
    85       <param name="platform.utilities.xml.file" 
    85       <param name="platform.utilities.xml.file"
    86              value="${dyn.platform.utilities.xml.file}"/>
    86              value="${dyn.platform.utilities.xml.file}"/>
    87     </antcall>
    87     </antcall>
    88   </target>
    88   </target>
    89 
    89 
    90   <!--The start point of the component's build when there are classes from two
    90   <!--The start point of the component's build when there are classes from two
    91       different configurations (cldc, cdc, etc). The default order is that cldc
    91       different configurations (cldc, cdc, etc). The default order is that cldc
    92       is compiled in first phase and cdc in the second, but the component is 
    92       is compiled in first phase and cdc in the second, but the component is
    93       able to variate the behavior.
    93       able to variate the behavior.
    94   -->
    94   -->
    95   <target name="deploy.dual" depends="init.properties, make.target.dirs">
    95   <target name="deploy.dual" depends="init.properties, make.target.dirs, component.init">
    96     <antcall target="deploy.dual.internal">
    96     <antcall target="deploy.dual.internal">
    97       <param name="platform.utilities.xml.file" value="${dyn.platform.utilities.xml.file}"/>
    97       <param name="platform.utilities.xml.file" value="${dyn.platform.utilities.xml.file}"/>
    98     </antcall>
    98     </antcall>
    99   </target>
    99   </target>
   100 
   100 
       
   101   <!--For overriding by the build.xml of the component-->
       
   102   <target name="component.init">
       
   103   </target>
       
   104 
   101 <!--STARTING POINTS END-->
   105 <!--STARTING POINTS END-->
   102 
   106 
   103 
   107 
   104 
   108 
   105 
   109 
   112 
   116 
   113 <!--TARGETS FOR THE FIRST PHASE COMPILATION START-->
   117 <!--TARGETS FOR THE FIRST PHASE COMPILATION START-->
   114 
   118 
   115 
   119 
   116   <!--An internal target to be called using antcall in order to import correct
   120   <!--An internal target to be called using antcall in order to import correct
   117       platform specific helper xml file for the first phase compilation. 
   121       platform specific helper xml file for the first phase compilation.
   118       This targe assumes that the antcall to this target (or target that 
   122       This targe assumes that the antcall to this target (or target that
   119       depends on this) defines following property:
   123       depends on this) defines following property:
   120          * platform.utilities.xml.file   A file containg platform specific 
   124          * platform.utilities.xml.file   A file containg platform specific
   121                                          implementations of certain common
   125                                          implementations of certain common
   122                                          targets
   126                                          targets
   123   -->
   127   -->
   124   <target name="deploy.internal" depends="do.export, deploy.first, finalize">
   128   <target name="deploy.internal" depends="do.export, deploy.first, finalize">
   125   </target>
   129   </target>
   126 
   130 
   127 
   131 
   128   <!--Target that launches the first phase compilation. After this target
   132   <!--Target that launches the first phase compilation. After this target
   129       classes are compiled into classes/first directory, copied to 
   133       classes are compiled into classes/first directory, copied to
   130       classes/collection directory, finetuned (platform specific) and
   134       classes/collection directory, finetuned (platform specific) and
   131       copied into jar containig all the classes of the different components.-->
   135       copied into jar containig all the classes of the different components.-->
   132   <target name="deploy.first" depends="do.export">
   136   <target name="deploy.first" depends="do.export">
   133 
   137 
   134     <!--If the platform specific directory exists, it is added to the 
   138     <!--If the platform specific directory exists, it is added to the
   135         source path -->
   139         source path -->
   136     <condition property="additional.java.src.path.first"
   140     <condition property="additional.java.src.path.first"
   137                value=";${javasrc.platform.specific}"
   141                value=";${javasrc.platform.specific}"
   138                else="">
   142                else="">
   139       <isset property="javasrc.platform.specific.present" />
   143       <isset property="javasrc.platform.specific.present" />
   142     <!--Start the job described above using antcall -->
   146     <!--Start the job described above using antcall -->
   143     <antcall target="do.java.compile">
   147     <antcall target="do.java.compile">
   144       <param name="compile.target" value="compile"/>
   148       <param name="compile.target" value="compile"/>
   145       <param name="int.bcp" value=""/>
   149       <param name="int.bcp" value=""/>
   146       <param name="bcp" value="${bootclasspath}"/>
   150       <param name="bcp" value="${bootclasspath}"/>
   147       <param name="jsrc" 
   151       <param name="jsrc"
   148              value="${java.src.paths}${additional.java.src.path.first}"/>
   152              value="${java.src.paths}${additional.java.src.path.first}"/>
   149       <param name="dst.dir" value="${classes.first.dir}"/>
   153       <param name="dst.dir" value="${classes.first.dir}"/>
   150     </antcall>
   154     </antcall>
   151   </target>
   155   </target>
   152 
   156 
   166   -->
   170   -->
   167   <target name="deploy.dual.internal" depends="deploy.second, finalize">
   171   <target name="deploy.dual.internal" depends="deploy.second, finalize">
   168   </target>
   172   </target>
   169 
   173 
   170   <!--Target that launches the second phase compilation. After this target
   174   <!--Target that launches the second phase compilation. After this target
   171       classes are compiled into classes/second directory, copied to 
   175       classes are compiled into classes/second directory, copied to
   172       classes/collection directory, finetuned (platform specific) and
   176       classes/collection directory, finetuned (platform specific) and
   173       copied into jar containig all the classes of the different components.-->
   177       copied into jar containig all the classes of the different components.-->
   174   <target name="deploy.second" depends="deploy.first, init.second.phase">
   178   <target name="deploy.second" depends="deploy.first, init.second.phase">
   175 
   179 
   176     <!--If the platform specific cdc directory exists, it is added to the 
   180     <!--If the platform specific cdc directory exists, it is added to the
   177         source path -->
   181         source path -->
   178     <condition property="additional.java.src.path.second"
   182     <condition property="additional.java.src.path.second"
   179                value=";${javasrc.platform.specific.cdc}"
   183                value=";${javasrc.platform.specific.cdc}"
   180                else="">
   184                else="">
   181       <isset property="javasrc.platform.specific.cdc.present" />
   185       <isset property="javasrc.platform.specific.cdc.present" />
   184     <!--Start the job described above using antcall -->
   188     <!--Start the job described above using antcall -->
   185     <antcall target="do.java.compile">
   189     <antcall target="do.java.compile">
   186       <param name="compile.target" value="compile.second"/>
   190       <param name="compile.target" value="compile.second"/>
   187       <param name="int.bcp" value="${classes.first.dir}"/>
   191       <param name="int.bcp" value="${classes.first.dir}"/>
   188       <param name="bcp" value="${bootclasspath.second}"/>
   192       <param name="bcp" value="${bootclasspath.second}"/>
   189       <param name="jsrc" 
   193       <param name="jsrc"
   190            value="${java.src.second.paths}${additional.java.src.path.second}"/>
   194            value="${java.src.second.paths}${additional.java.src.path.second}"/>
   191       <param name="dst.dir" value="${classes.second.dir}"/>
   195       <param name="dst.dir" value="${classes.second.dir}"/>
   192     </antcall>
   196     </antcall>
   193   </target>
   197   </target>
   194 
   198 
   227     <ant target="${compile.target}"/>
   231     <ant target="${compile.target}"/>
   228     <ant target="finetune.classes"/>
   232     <ant target="finetune.classes"/>
   229     <ant target="emma.instr"/>
   233     <ant target="emma.instr"/>
   230     <ant target="add.classes.to.collection.jar"/>
   234     <ant target="add.classes.to.collection.jar"/>
   231     <ant target="collect.localisation.files"/>
   235     <ant target="collect.localisation.files"/>
   232     
   236 
   233     <!--Copy only changed classes into collection dir -->
   237     <!--Copy only changed classes into collection dir -->
   234     <copy todir="${classes.collection.dir}">
   238     <copy todir="${classes.collection.dir}">
   235       <fileset dir="${dst.dir}" includes="**/*.class">
   239       <fileset dir="${dst.dir}" includes="**/*.class">
   236         <depend targetdir="${classes.collection.dir}"/>
   240         <depend targetdir="${classes.collection.dir}"/>
   237       </fileset>
   241       </fileset>
   239   </target>
   243   </target>
   240 
   244 
   241 
   245 
   242   <!--Target that does the pre rpocessing of the java code. This is not done
   246   <!--Target that does the pre rpocessing of the java code. This is not done
   243       by default - it is done only if property java.cpp.defines has been
   247       by default - it is done only if property java.cpp.defines has been
   244       defined by the component. Java source files are pre processed into 
   248       defined by the component. Java source files are pre processed into
   245       component's classes/firstjavacpp (or classes/secondjavacpp in case of
   249       component's classes/firstjavacpp (or classes/secondjavacpp in case of
   246        second phase compilation) directory
   250        second phase compilation) directory
   247   -->
   251   -->
   248   <target name="do.java.preprocessing" if="java.cpp.defines">
   252   <target name="do.java.preprocessing" if="java.cpp.defines">
   249     <property name="java.cpp.tmp.dir" location="${dst.dir}javacpp"/>
   253     <property name="java.cpp.tmp.dir" location="${dst.dir}javacpp"/>
   251     <exec executable="python" failonerror="true">
   255     <exec executable="python" failonerror="true">
   252       <arg value="${java.src.root}/build/buildutils/javacpp.py"/>
   256       <arg value="${java.src.root}/build/buildutils/javacpp.py"/>
   253       <arg value="${jsrc}"/>
   257       <arg value="${jsrc}"/>
   254       <arg value="${java.cpp.tmp.dir}"/>
   258       <arg value="${java.cpp.tmp.dir}"/>
   255     </exec>
   259     </exec>
   256     
   260 
   257   </target>
   261   </target>
   258 
   262 
   259   <!--Groups a set of functionalities that are done after java code has
   263   <!--Groups a set of functionalities that are done after java code has
   260       been compiled ad finetuned -->
   264       been compiled ad finetuned -->
   261   <target name="finalize" depends="create.internal.api.jar, 
   265   <target name="finalize" depends="create.internal.api.jar,
   262                                    create.public.api.jar, javah, generate.odc,
   266                                    create.public.api.jar, javah, generate.odc,
   263                                    rommize.classes, jni.utils">
   267                                    rommize.classes, jni.utils">
   264   </target>
   268   </target>
   265 
   269 
   266 <!--COMPILE AND FINALIZE END-->
   270 <!--COMPILE AND FINALIZE END-->
   290     <mkdir dir="${classes.second.dir}"/>
   294     <mkdir dir="${classes.second.dir}"/>
   291   </target>
   295   </target>
   292 
   296 
   293   <!--Target for making component specific initalizations depending on
   297   <!--Target for making component specific initalizations depending on
   294       the values of dynamic properties (e.g. Target platform).
   298       the values of dynamic properties (e.g. Target platform).
   295       The default implementation of this target is empty and the component 
   299       The default implementation of this target is empty and the component
   296       should override this if it provides public APIs -->
   300       should override this if it provides public APIs -->
   297   <target name="init.target">
   301   <target name="init.target">
   298   </target>
   302   </target>
   299 
   303 
   300 <!--INITIALIZATIONS END-->
   304 <!--INITIALIZATIONS END-->
   302 
   306 
   303 
   307 
   304 
   308 
   305 <!--JAVAC START-->
   309 <!--JAVAC START-->
   306 
   310 
   307   <!--Javac 
   311   <!--Javac
   308        TODO: bootclasspath should look like this:
   312        TODO: bootclasspath should look like this:
   309       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}">
   313       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}">
   310   -->
   314   -->
   311   <presetdef name="omj.javac">
   315   <presetdef name="omj.javac">
   312     <javac 
   316     <javac
   313       source="${javac.source}" 
   317       source="${javac.source}"
   314       target="${javac.target}"
   318       target="${javac.target}"
   315       destdir="${dst.dir}"
   319       destdir="${dst.dir}"
   316       debug="${javac.debug.on}"
   320       debug="${javac.debug.on}"
   317       debuglevel="lines,vars,source"
   321       debuglevel="lines,vars,source"
   318       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}${eswt.jar}">
   322       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}${eswt.jar}">
   319       
   323 
   320    <!-- Uncomment the following line if you want to see Javac warnings. -->      
   324    <!-- Uncomment the following line if you want to see Javac warnings. -->
   321    <!--   <compilerarg value="-Xlint"/> -->
   325    <!--   <compilerarg value="-Xlint"/> -->
   322 
   326 
   323       <src path="${jsrc.for.javac}"/>
   327       <src path="${jsrc.for.javac}"/>
   324     </javac>
   328     </javac>
   325   </presetdef>
   329   </presetdef>
   368 
   372 
   369 
   373 
   370 <!--ODC FILE START-->
   374 <!--ODC FILE START-->
   371 
   375 
   372   <!--Generate the odc files -->
   376   <!--Generate the odc files -->
   373   <target name="generate.odc" depends="system.properties">
   377   <target name="generate.odc" depends="system.properties" unless="no.rommizing">
   374     <exec executable="python" failonerror="true">
   378     <exec executable="python" failonerror="true">
   375       <arg value="${java.src.root}/build/buildutils/generateOdcFile.py"/>
   379       <arg value="${java.src.root}/build/buildutils/generateOdcFile.py"/>
   376       <arg value="${component.root.dir}/${odc.file.name}.odc"/>
   380       <arg value="${component.root.dir}/${odc.file.name}.odc"/>
   377       <arg value="${native.dll.name}"/>
   381       <arg value="${native.dll.name}"/>
   378       <arg value="${classes.collection.dir}"/>
   382       <arg value="${classes.collection.dir}"/>
   379       <arg value="${component.root.dir}/properties.txt"/>
   383       <arg value="${component.root.dir}/properties.txt"/>
   380     </exec>
   384     </exec>
   381 
   385 
   382     <!--Copy the odc file into location where the VM can find it -->
   386     <!--Copy the odc file into location where the VM can find it -->
   383     <copy file="${component.root.dir}/${odc.file.name}.odc" 
   387     <copy file="${component.root.dir}/${odc.file.name}.odc"
   384           todir="${bcp.dest.directory}"/>
   388           todir="${bcp.dest.directory}"/>
   385   </target>
   389   </target>
   386 
   390 
   387 <!--ODC FILE END-->
   391 <!--ODC FILE END-->
   388 
   392 
   394      <jar destfile="${platform.api.jar}"
   398      <jar destfile="${platform.api.jar}"
   395            basedir="${classes.collection.dir}"
   399            basedir="${classes.collection.dir}"
   396            update="true"/>
   400            update="true"/>
   397   </presetdef>
   401   </presetdef>
   398 
   402 
   399   <!--Create an internal API jar file into directory containig all the 
   403   <!--Create an internal API jar file into directory containig all the
   400       internal API jar files. The default implementation of this target is 
   404       internal API jar files. The default implementation of this target is
   401       empty and the component should override this if it provides internal 
   405       empty and the component should override this if it provides internal
   402       APIs -->
   406       APIs -->
   403   <target name="create.internal.api.jar">
   407   <target name="create.internal.api.jar">
   404   </target>
   408   </target>
   405 
   409 
   406   <!--Public APIs -->
   410   <!--Public APIs -->
   409            basedir="${classes.collection.dir}"
   413            basedir="${classes.collection.dir}"
   410            update="true"
   414            update="true"
   411       />
   415       />
   412   </presetdef>
   416   </presetdef>
   413 
   417 
   414   <!--Create a public API jar file into directory containig all the 
   418   <!--Create a public API jar file into directory containig all the
   415       public API jar files. The default implementation of this target is 
   419       public API jar files. The default implementation of this target is
   416       empty and the component should override this if it provides public 
   420       empty and the component should override this if it provides public
   417       APIs -->
   421       APIs -->
   418   <target name="create.public.api.jar">
   422   <target name="create.public.api.jar">
   419   </target>
   423   </target>
   420 
   424 
   421   <!--Updated the classes into the common jar file. If the Java code contains
   425   <!--Updated the classes into the common jar file. If the Java code contains
   422       cldc compilable code it is put into jar file ${impl.cldc.jar} otherwise
   426       cldc compilable code it is put into jar file ${impl.cldc.jar} otherwise
   423       ${impl.cdc.jar} is updated.-->
   427       ${impl.cdc.jar} is updated.-->
   424   <target name="add.classes.to.collection.jar">
   428   <target name="add.classes.to.collection.jar" unless="no.collection.update">
   425       <condition property="collection.target.jar"
   429       <condition property="collection.target.jar"
   426                value="${impl.cdc.jar}"
   430                value="${impl.cdc.jar}"
   427                else="${impl.cldc.jar}">
   431                else="${impl.cldc.jar}">
   428         <equals arg1="${bcp}" arg2="${bootclasspath.cdc}"/>
   432         <equals arg1="${bcp}" arg2="${bootclasspath.cdc}"/>
   429       </condition>
   433       </condition>
   444 
   448 
   445   <!--Run the javah if needed. Javah results goes to temp directory and
   449   <!--Run the javah if needed. Javah results goes to temp directory and
   446       if they have changed, then they are copied into a directory that
   450       if they have changed, then they are copied into a directory that
   447       is included to the component's makefile -->
   451       is included to the component's makefile -->
   448   <target name="javah" if="javah.classnames">
   452   <target name="javah" if="javah.classnames">
   449     <javah destdir="${temp.javah.dir}" force="yes" 
   453     <javah destdir="${temp.javah.dir}" force="yes"
   450        classpath="${classes.collection.dir}:${platform.api.jar}:${public.api.jar}"
   454        classpath="${classes.collection.dir}:${platform.api.jar}:${public.api.jar}"
   451        class = "${javah.classnames}">
   455        class = "${javah.classnames}">
   452     </javah>
   456     </javah>
   453     <!--Copy the files if they are changed-->
   457     <!--Copy the files if they are changed-->
   454     <copy todir="${javah.dir}">
   458     <copy todir="${javah.dir}">
   466 <!--EXPORT START-->
   470 <!--EXPORT START-->
   467   <!--Start the do.export using antcall. The usage of ant call is needed
   471   <!--Start the do.export using antcall. The usage of ant call is needed
   468       in order to include platform specific utility xml file.-->
   472       in order to include platform specific utility xml file.-->
   469   <target name="export" depends="init.properties, make.target.dirs">
   473   <target name="export" depends="init.properties, make.target.dirs">
   470     <antcall target="do.export">
   474     <antcall target="do.export">
   471       <param name="platform.utilities.xml.file" 
   475       <param name="platform.utilities.xml.file"
   472              value="${dyn.platform.utilities.xml.file}"/>
   476              value="${dyn.platform.utilities.xml.file}"/>
   473     </antcall>
   477     </antcall>
   474   </target>
   478   </target>
   475 <!--EXPORT START-->
   479 <!--EXPORT START-->
   476 
   480 
   516 <!--LOCALISATION END-->
   520 <!--LOCALISATION END-->
   517 
   521 
   518 
   522 
   519 
   523 
   520 <!--CLEANING START-->
   524 <!--CLEANING START-->
       
   525 
       
   526   <target name="clean" depends="clean.impl, component.clean">
       
   527   </target>
       
   528 
       
   529   <!--For overriding by the build.xml of the component-->
       
   530   <target name="component.clean">
       
   531   </target>
       
   532 
   521   <!--Do the cleaning-->
   533   <!--Do the cleaning-->
   522   <target name="clean" depends="init.properties, emma.clean">
   534   <target name="clean.impl" depends="init.properties, clean.from.collection.jars,
       
   535                                      emma.clean">
   523     <!--
   536     <!--
   524     <echo message = "target.platform = ${target.platform}"/>
   537     <echo message = "target.platform = ${target.platform}"/>
   525     <echo message = "target.cfg = ${target.cfg}"/>
   538     <echo message = "target.cfg = ${target.cfg}"/>
   526     <echo message = "bootclasspath = ${bootclasspath}"/>
   539     <echo message = "bootclasspath = ${bootclasspath}"/>
   527     -->
   540     -->
   537     <delete dir="${component.root.dir}"/>
   550     <delete dir="${component.root.dir}"/>
   538     <delete file="${bcp.dest.directory}/${jar.filename}"/>
   551     <delete file="${bcp.dest.directory}/${jar.filename}"/>
   539     <delete file="${bcp.dest.directory}/${odc.file.name}.odc"/>
   552     <delete file="${bcp.dest.directory}/${odc.file.name}.odc"/>
   540   </target>
   553   </target>
   541 
   554 
       
   555     <!--
       
   556     This target will remove the classes of the component from
       
   557     the collection jar files. It is quite time consuming so at the moment
       
   558     this is not done by default unless the component specifies
       
   559     collection.clean propert.
       
   560     -->
       
   561   <target name="clean.from.collection.jars" if="collection.clean">
       
   562     <antcall target="clean.from.jar">
       
   563       <param name="source.jar.file" value="${platform.api.jar}"/>
       
   564       <param name="source.src.dir" value="${classes.collection.dir}"/>
       
   565     </antcall>
       
   566 
       
   567     <antcall target="clean.from.jar">
       
   568       <param name="source.jar.file" value="${public.api.jar}"/>
       
   569       <param name="source.src.dir" value="${classes.first.dir}"/>
       
   570     </antcall>
       
   571 
       
   572     <antcall target="clean.from.jar">
       
   573       <param name="source.jar.file" value="${impl.cldc.jar}"/>
       
   574       <param name="source.src.dir" value="${classes.first.dir}"/>
       
   575     </antcall>
       
   576 
       
   577     <antcall target="clean.from.jar">
       
   578       <param name="source.jar.file" value="${impl.cdc.jar}"/>
       
   579       <param name="source.src.dir" value="${classes.second.dir}"/>
       
   580     </antcall>
       
   581   </target>
       
   582 
       
   583 
       
   584   <target name="existence.check">
       
   585     <available file="${source.jar.file}" property="cleaning.jar.present"/>
       
   586   </target>
       
   587 
       
   588   <target name="clean.from.jar" depends="existence.check" if="cleaning.jar.present">
       
   589     <property name="clean.tmp" location="${component.root.dir}/cleantmp"/>
       
   590     <mkdir dir="${clean.tmp}"/>
       
   591     <unzip src="${source.jar.file}" dest="${clean.tmp}/"/>
       
   592     <delete file="${source.jar.file}"/>
       
   593     <jar destfile="${source.jar.file}">
       
   594       <fileset dir="${clean.tmp}">
       
   595         <present present="srconly" targetdir="${source.src.dir}"/>
       
   596       </fileset>
       
   597     </jar>
       
   598     <delete dir="${clean.tmp}"/>
       
   599   </target>
   542 
   600 
   543   <!--Do the cleaning-->
   601   <!--Do the cleaning-->
   544   <target name="clean.api.jars" depends="init.properties">
   602   <target name="clean.api.jars" depends="init.properties">
   545     <delete file="${platform.api.jar}"/>
   603     <delete file="${platform.api.jar}"/>
   546     <delete file="${public.api.jar}"/>
   604     <delete file="${public.api.jar}"/>
   553 <!--CLEANING END-->
   611 <!--CLEANING END-->
   554 
   612 
   555 
   613 
   556   <!--Generate signature jar file-->
   614   <!--Generate signature jar file-->
   557   <target name="generate.signature.jars" depends="init.properties">
   615   <target name="generate.signature.jars" depends="init.properties">
   558    <zip destfile="${signature.jar}">  
   616    <zip destfile="${signature.jar}">
   559      <zipfileset src="${bootclasspath.cldc}"/>  
   617      <zipfileset src="${bootclasspath.cldc}"/>
   560      <zipfileset src="${impl.cldc.jar}"/>  
   618      <zipfileset src="${impl.cldc.jar}"/>
   561    </zip>  
   619    </zip>
   562   </target>
   620   </target>
   563 
   621 
   564 
   622 
   565 
   623 
   566 <!--GENERATE JAVADOC START-->
   624 <!--GENERATE JAVADOC START-->
   573 			  windowtitle="Runtime API">
   631 			  windowtitle="Runtime API">
   574 
   632 
   575 	   <fileset dir="${java.src.root}/javacommons/" defaultexcludes="yes">
   633 	   <fileset dir="${java.src.root}/javacommons/" defaultexcludes="yes">
   576 		 <include name="utils/javasrc/com/nokia/mj/impl/rt/support/*.java"/>
   634 		 <include name="utils/javasrc/com/nokia/mj/impl/rt/support/*.java"/>
   577 		 <include name="utils/javasrc/com/nokia/mj/impl/utils/**/*.java"/>
   635 		 <include name="utils/javasrc/com/nokia/mj/impl/utils/**/*.java"/>
       
   636 		 <include name="utils/javasrc/com/nokia/mj/impl/rt/ui/**/*.java"/>
   578 		 <include name="fileutils/javasrc/**/*.java"/>
   637 		 <include name="fileutils/javasrc/**/*.java"/>
   579   	     <include name="comms/javasrc/**/*.java"/>
   638   	     <include name="comms/javasrc/**/*.java"/>
   580 		 <include name="javastorage/javasrc/**/*.java"/>
   639 		 <include name="javastorage/javasrc/**/*.java"/>
   581 	   </fileset>
   640 	   </fileset>
   582 
   641