build/utilities.xml
branchRCL_3
changeset 83 26b2b12093af
parent 77 7cee158cb8cd
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
    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, component.init">
    83   <target name="deploy" depends="init.properties, make.target.dirs">
    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, component.init">
    95   <target name="deploy.dual" depends="init.properties, make.target.dirs">
    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 
       
   105 <!--STARTING POINTS END-->
   101 <!--STARTING POINTS END-->
   106 
   102 
   107 
   103 
   108 
   104 
   109 
   105 
   116 
   112 
   117 <!--TARGETS FOR THE FIRST PHASE COMPILATION START-->
   113 <!--TARGETS FOR THE FIRST PHASE COMPILATION START-->
   118 
   114 
   119 
   115 
   120   <!--An internal target to be called using antcall in order to import correct
   116   <!--An internal target to be called using antcall in order to import correct
   121       platform specific helper xml file for the first phase compilation.
   117       platform specific helper xml file for the first phase compilation. 
   122       This targe assumes that the antcall to this target (or target that
   118       This targe assumes that the antcall to this target (or target that 
   123       depends on this) defines following property:
   119       depends on this) defines following property:
   124          * platform.utilities.xml.file   A file containg platform specific
   120          * platform.utilities.xml.file   A file containg platform specific 
   125                                          implementations of certain common
   121                                          implementations of certain common
   126                                          targets
   122                                          targets
   127   -->
   123   -->
   128   <target name="deploy.internal" depends="do.export, deploy.first, finalize">
   124   <target name="deploy.internal" depends="do.export, deploy.first, finalize">
   129   </target>
   125   </target>
   130 
   126 
   131 
   127 
   132   <!--Target that launches the first phase compilation. After this target
   128   <!--Target that launches the first phase compilation. After this target
   133       classes are compiled into classes/first directory, copied to
   129       classes are compiled into classes/first directory, copied to 
   134       classes/collection directory, finetuned (platform specific) and
   130       classes/collection directory, finetuned (platform specific) and
   135       copied into jar containig all the classes of the different components.-->
   131       copied into jar containig all the classes of the different components.-->
   136   <target name="deploy.first" depends="do.export">
   132   <target name="deploy.first" depends="do.export">
   137 
   133 
   138     <!--If the platform specific directory exists, it is added to the
   134     <!--If the platform specific directory exists, it is added to the 
   139         source path -->
   135         source path -->
   140     <condition property="additional.java.src.path.first"
   136     <condition property="additional.java.src.path.first"
   141                value=";${javasrc.platform.specific}"
   137                value=";${javasrc.platform.specific}"
   142                else="">
   138                else="">
   143       <isset property="javasrc.platform.specific.present" />
   139       <isset property="javasrc.platform.specific.present" />
   146     <!--Start the job described above using antcall -->
   142     <!--Start the job described above using antcall -->
   147     <antcall target="do.java.compile">
   143     <antcall target="do.java.compile">
   148       <param name="compile.target" value="compile"/>
   144       <param name="compile.target" value="compile"/>
   149       <param name="int.bcp" value=""/>
   145       <param name="int.bcp" value=""/>
   150       <param name="bcp" value="${bootclasspath}"/>
   146       <param name="bcp" value="${bootclasspath}"/>
   151       <param name="jsrc"
   147       <param name="jsrc" 
   152              value="${java.src.paths}${additional.java.src.path.first}"/>
   148              value="${java.src.paths}${additional.java.src.path.first}"/>
   153       <param name="dst.dir" value="${classes.first.dir}"/>
   149       <param name="dst.dir" value="${classes.first.dir}"/>
   154     </antcall>
   150     </antcall>
   155   </target>
   151   </target>
   156 
   152 
   170   -->
   166   -->
   171   <target name="deploy.dual.internal" depends="deploy.second, finalize">
   167   <target name="deploy.dual.internal" depends="deploy.second, finalize">
   172   </target>
   168   </target>
   173 
   169 
   174   <!--Target that launches the second phase compilation. After this target
   170   <!--Target that launches the second phase compilation. After this target
   175       classes are compiled into classes/second directory, copied to
   171       classes are compiled into classes/second directory, copied to 
   176       classes/collection directory, finetuned (platform specific) and
   172       classes/collection directory, finetuned (platform specific) and
   177       copied into jar containig all the classes of the different components.-->
   173       copied into jar containig all the classes of the different components.-->
   178   <target name="deploy.second" depends="deploy.first, init.second.phase">
   174   <target name="deploy.second" depends="deploy.first, init.second.phase">
   179 
   175 
   180     <!--If the platform specific cdc directory exists, it is added to the
   176     <!--If the platform specific cdc directory exists, it is added to the 
   181         source path -->
   177         source path -->
   182     <condition property="additional.java.src.path.second"
   178     <condition property="additional.java.src.path.second"
   183                value=";${javasrc.platform.specific.cdc}"
   179                value=";${javasrc.platform.specific.cdc}"
   184                else="">
   180                else="">
   185       <isset property="javasrc.platform.specific.cdc.present" />
   181       <isset property="javasrc.platform.specific.cdc.present" />
   188     <!--Start the job described above using antcall -->
   184     <!--Start the job described above using antcall -->
   189     <antcall target="do.java.compile">
   185     <antcall target="do.java.compile">
   190       <param name="compile.target" value="compile.second"/>
   186       <param name="compile.target" value="compile.second"/>
   191       <param name="int.bcp" value="${classes.first.dir}"/>
   187       <param name="int.bcp" value="${classes.first.dir}"/>
   192       <param name="bcp" value="${bootclasspath.second}"/>
   188       <param name="bcp" value="${bootclasspath.second}"/>
   193       <param name="jsrc"
   189       <param name="jsrc" 
   194            value="${java.src.second.paths}${additional.java.src.path.second}"/>
   190            value="${java.src.second.paths}${additional.java.src.path.second}"/>
   195       <param name="dst.dir" value="${classes.second.dir}"/>
   191       <param name="dst.dir" value="${classes.second.dir}"/>
   196     </antcall>
   192     </antcall>
   197   </target>
   193   </target>
   198 
   194 
   231     <ant target="${compile.target}"/>
   227     <ant target="${compile.target}"/>
   232     <ant target="finetune.classes"/>
   228     <ant target="finetune.classes"/>
   233     <ant target="emma.instr"/>
   229     <ant target="emma.instr"/>
   234     <ant target="add.classes.to.collection.jar"/>
   230     <ant target="add.classes.to.collection.jar"/>
   235     <ant target="collect.localisation.files"/>
   231     <ant target="collect.localisation.files"/>
   236 
   232     
   237     <!--Copy only changed classes into collection dir -->
   233     <!--Copy only changed classes into collection dir -->
   238     <copy todir="${classes.collection.dir}">
   234     <copy todir="${classes.collection.dir}">
   239       <fileset dir="${dst.dir}" includes="**/*.class">
   235       <fileset dir="${dst.dir}" includes="**/*.class">
   240         <depend targetdir="${classes.collection.dir}"/>
   236         <depend targetdir="${classes.collection.dir}"/>
   241       </fileset>
   237       </fileset>
   243   </target>
   239   </target>
   244 
   240 
   245 
   241 
   246   <!--Target that does the pre rpocessing of the java code. This is not done
   242   <!--Target that does the pre rpocessing of the java code. This is not done
   247       by default - it is done only if property java.cpp.defines has been
   243       by default - it is done only if property java.cpp.defines has been
   248       defined by the component. Java source files are pre processed into
   244       defined by the component. Java source files are pre processed into 
   249       component's classes/firstjavacpp (or classes/secondjavacpp in case of
   245       component's classes/firstjavacpp (or classes/secondjavacpp in case of
   250        second phase compilation) directory
   246        second phase compilation) directory
   251   -->
   247   -->
   252   <target name="do.java.preprocessing" if="java.cpp.defines">
   248   <target name="do.java.preprocessing" if="java.cpp.defines">
   253     <property name="java.cpp.tmp.dir" location="${dst.dir}javacpp"/>
   249     <property name="java.cpp.tmp.dir" location="${dst.dir}javacpp"/>
   255     <exec executable="python" failonerror="true">
   251     <exec executable="python" failonerror="true">
   256       <arg value="${java.src.root}/build/buildutils/javacpp.py"/>
   252       <arg value="${java.src.root}/build/buildutils/javacpp.py"/>
   257       <arg value="${jsrc}"/>
   253       <arg value="${jsrc}"/>
   258       <arg value="${java.cpp.tmp.dir}"/>
   254       <arg value="${java.cpp.tmp.dir}"/>
   259     </exec>
   255     </exec>
   260 
   256     
   261   </target>
   257   </target>
   262 
   258 
   263   <!--Groups a set of functionalities that are done after java code has
   259   <!--Groups a set of functionalities that are done after java code has
   264       been compiled ad finetuned -->
   260       been compiled ad finetuned -->
   265   <target name="finalize" depends="create.internal.api.jar,
   261   <target name="finalize" depends="create.internal.api.jar, 
   266                                    create.public.api.jar, javah, generate.odc,
   262                                    create.public.api.jar, javah, generate.odc,
   267                                    rommize.classes, jni.utils">
   263                                    rommize.classes, jni.utils">
   268   </target>
   264   </target>
   269 
   265 
   270 <!--COMPILE AND FINALIZE END-->
   266 <!--COMPILE AND FINALIZE END-->
   294     <mkdir dir="${classes.second.dir}"/>
   290     <mkdir dir="${classes.second.dir}"/>
   295   </target>
   291   </target>
   296 
   292 
   297   <!--Target for making component specific initalizations depending on
   293   <!--Target for making component specific initalizations depending on
   298       the values of dynamic properties (e.g. Target platform).
   294       the values of dynamic properties (e.g. Target platform).
   299       The default implementation of this target is empty and the component
   295       The default implementation of this target is empty and the component 
   300       should override this if it provides public APIs -->
   296       should override this if it provides public APIs -->
   301   <target name="init.target">
   297   <target name="init.target">
   302   </target>
   298   </target>
   303 
   299 
   304 <!--INITIALIZATIONS END-->
   300 <!--INITIALIZATIONS END-->
   306 
   302 
   307 
   303 
   308 
   304 
   309 <!--JAVAC START-->
   305 <!--JAVAC START-->
   310 
   306 
   311   <!--Javac
   307   <!--Javac 
   312        TODO: bootclasspath should look like this:
   308        TODO: bootclasspath should look like this:
   313       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}">
   309       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}">
   314   -->
   310   -->
   315   <presetdef name="omj.javac">
   311   <presetdef name="omj.javac">
   316     <javac
   312     <javac 
   317       source="${javac.source}"
   313       source="${javac.source}" 
   318       target="${javac.target}"
   314       target="${javac.target}"
   319       destdir="${dst.dir}"
   315       destdir="${dst.dir}"
   320       debug="${javac.debug.on}"
   316       debug="${javac.debug.on}"
   321       debuglevel="lines,vars,source"
   317       debuglevel="lines,vars,source"
   322       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}${eswt.jar}">
   318       bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}${eswt.jar}">
   323 
   319       
   324    <!-- Uncomment the following line if you want to see Javac warnings. -->
   320    <!-- Uncomment the following line if you want to see Javac warnings. -->      
   325    <!--   <compilerarg value="-Xlint"/> -->
   321    <!--   <compilerarg value="-Xlint"/> -->
   326 
   322 
   327       <src path="${jsrc.for.javac}"/>
   323       <src path="${jsrc.for.javac}"/>
   328     </javac>
   324     </javac>
   329   </presetdef>
   325   </presetdef>
   372 
   368 
   373 
   369 
   374 <!--ODC FILE START-->
   370 <!--ODC FILE START-->
   375 
   371 
   376   <!--Generate the odc files -->
   372   <!--Generate the odc files -->
   377   <target name="generate.odc" depends="system.properties" unless="no.rommizing">
   373   <target name="generate.odc" depends="system.properties">
   378     <exec executable="python" failonerror="true">
   374     <exec executable="python" failonerror="true">
   379       <arg value="${java.src.root}/build/buildutils/generateOdcFile.py"/>
   375       <arg value="${java.src.root}/build/buildutils/generateOdcFile.py"/>
   380       <arg value="${component.root.dir}/${odc.file.name}.odc"/>
   376       <arg value="${component.root.dir}/${odc.file.name}.odc"/>
   381       <arg value="${native.dll.name}"/>
   377       <arg value="${native.dll.name}"/>
   382       <arg value="${classes.collection.dir}"/>
   378       <arg value="${classes.collection.dir}"/>
   383       <arg value="${component.root.dir}/properties.txt"/>
   379       <arg value="${component.root.dir}/properties.txt"/>
   384     </exec>
   380     </exec>
   385 
   381 
   386     <!--Copy the odc file into location where the VM can find it -->
   382     <!--Copy the odc file into location where the VM can find it -->
   387     <copy file="${component.root.dir}/${odc.file.name}.odc"
   383     <copy file="${component.root.dir}/${odc.file.name}.odc" 
   388           todir="${bcp.dest.directory}"/>
   384           todir="${bcp.dest.directory}"/>
   389   </target>
   385   </target>
   390 
   386 
   391 <!--ODC FILE END-->
   387 <!--ODC FILE END-->
   392 
   388 
   398      <jar destfile="${platform.api.jar}"
   394      <jar destfile="${platform.api.jar}"
   399            basedir="${classes.collection.dir}"
   395            basedir="${classes.collection.dir}"
   400            update="true"/>
   396            update="true"/>
   401   </presetdef>
   397   </presetdef>
   402 
   398 
   403   <!--Create an internal API jar file into directory containig all the
   399   <!--Create an internal API jar file into directory containig all the 
   404       internal API jar files. The default implementation of this target is
   400       internal API jar files. The default implementation of this target is 
   405       empty and the component should override this if it provides internal
   401       empty and the component should override this if it provides internal 
   406       APIs -->
   402       APIs -->
   407   <target name="create.internal.api.jar">
   403   <target name="create.internal.api.jar">
   408   </target>
   404   </target>
   409 
   405 
   410   <!--Public APIs -->
   406   <!--Public APIs -->
   413            basedir="${classes.collection.dir}"
   409            basedir="${classes.collection.dir}"
   414            update="true"
   410            update="true"
   415       />
   411       />
   416   </presetdef>
   412   </presetdef>
   417 
   413 
   418   <!--Create a public API jar file into directory containig all the
   414   <!--Create a public API jar file into directory containig all the 
   419       public API jar files. The default implementation of this target is
   415       public API jar files. The default implementation of this target is 
   420       empty and the component should override this if it provides public
   416       empty and the component should override this if it provides public 
   421       APIs -->
   417       APIs -->
   422   <target name="create.public.api.jar">
   418   <target name="create.public.api.jar">
   423   </target>
   419   </target>
   424 
   420 
   425   <!--Updated the classes into the common jar file. If the Java code contains
   421   <!--Updated the classes into the common jar file. If the Java code contains
   426       cldc compilable code it is put into jar file ${impl.cldc.jar} otherwise
   422       cldc compilable code it is put into jar file ${impl.cldc.jar} otherwise
   427       ${impl.cdc.jar} is updated.-->
   423       ${impl.cdc.jar} is updated.-->
   428   <target name="add.classes.to.collection.jar" unless="no.collection.update">
   424   <target name="add.classes.to.collection.jar">
   429       <condition property="collection.target.jar"
   425       <condition property="collection.target.jar"
   430                value="${impl.cdc.jar}"
   426                value="${impl.cdc.jar}"
   431                else="${impl.cldc.jar}">
   427                else="${impl.cldc.jar}">
   432         <equals arg1="${bcp}" arg2="${bootclasspath.cdc}"/>
   428         <equals arg1="${bcp}" arg2="${bootclasspath.cdc}"/>
   433       </condition>
   429       </condition>
   448 
   444 
   449   <!--Run the javah if needed. Javah results goes to temp directory and
   445   <!--Run the javah if needed. Javah results goes to temp directory and
   450       if they have changed, then they are copied into a directory that
   446       if they have changed, then they are copied into a directory that
   451       is included to the component's makefile -->
   447       is included to the component's makefile -->
   452   <target name="javah" if="javah.classnames">
   448   <target name="javah" if="javah.classnames">
   453     <javah destdir="${temp.javah.dir}" force="yes"
   449     <javah destdir="${temp.javah.dir}" force="yes" 
   454        classpath="${classes.collection.dir}:${platform.api.jar}:${public.api.jar}"
   450        classpath="${classes.collection.dir}:${platform.api.jar}:${public.api.jar}"
   455        class = "${javah.classnames}">
   451        class = "${javah.classnames}">
   456     </javah>
   452     </javah>
   457     <!--Copy the files if they are changed-->
   453     <!--Copy the files if they are changed-->
   458     <copy todir="${javah.dir}">
   454     <copy todir="${javah.dir}">
   470 <!--EXPORT START-->
   466 <!--EXPORT START-->
   471   <!--Start the do.export using antcall. The usage of ant call is needed
   467   <!--Start the do.export using antcall. The usage of ant call is needed
   472       in order to include platform specific utility xml file.-->
   468       in order to include platform specific utility xml file.-->
   473   <target name="export" depends="init.properties, make.target.dirs">
   469   <target name="export" depends="init.properties, make.target.dirs">
   474     <antcall target="do.export">
   470     <antcall target="do.export">
   475       <param name="platform.utilities.xml.file"
   471       <param name="platform.utilities.xml.file" 
   476              value="${dyn.platform.utilities.xml.file}"/>
   472              value="${dyn.platform.utilities.xml.file}"/>
   477     </antcall>
   473     </antcall>
   478   </target>
   474   </target>
   479 <!--EXPORT START-->
   475 <!--EXPORT START-->
   480 
   476 
   520 <!--LOCALISATION END-->
   516 <!--LOCALISATION END-->
   521 
   517 
   522 
   518 
   523 
   519 
   524 <!--CLEANING START-->
   520 <!--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 
       
   533   <!--Do the cleaning-->
   521   <!--Do the cleaning-->
   534   <target name="clean.impl" depends="init.properties, clean.from.collection.jars,
   522   <target name="clean" depends="init.properties, emma.clean">
   535                                      emma.clean">
       
   536     <!--
   523     <!--
   537     <echo message = "target.platform = ${target.platform}"/>
   524     <echo message = "target.platform = ${target.platform}"/>
   538     <echo message = "target.cfg = ${target.cfg}"/>
   525     <echo message = "target.cfg = ${target.cfg}"/>
   539     <echo message = "bootclasspath = ${bootclasspath}"/>
   526     <echo message = "bootclasspath = ${bootclasspath}"/>
   540     -->
   527     -->
   550     <delete dir="${component.root.dir}"/>
   537     <delete dir="${component.root.dir}"/>
   551     <delete file="${bcp.dest.directory}/${jar.filename}"/>
   538     <delete file="${bcp.dest.directory}/${jar.filename}"/>
   552     <delete file="${bcp.dest.directory}/${odc.file.name}.odc"/>
   539     <delete file="${bcp.dest.directory}/${odc.file.name}.odc"/>
   553   </target>
   540   </target>
   554 
   541 
   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>
       
   600 
   542 
   601   <!--Do the cleaning-->
   543   <!--Do the cleaning-->
   602   <target name="clean.api.jars" depends="init.properties">
   544   <target name="clean.api.jars" depends="init.properties">
   603     <delete file="${platform.api.jar}"/>
   545     <delete file="${platform.api.jar}"/>
   604     <delete file="${public.api.jar}"/>
   546     <delete file="${public.api.jar}"/>
   611 <!--CLEANING END-->
   553 <!--CLEANING END-->
   612 
   554 
   613 
   555 
   614   <!--Generate signature jar file-->
   556   <!--Generate signature jar file-->
   615   <target name="generate.signature.jars" depends="init.properties">
   557   <target name="generate.signature.jars" depends="init.properties">
   616    <zip destfile="${signature.jar}">
   558    <zip destfile="${signature.jar}">  
   617      <zipfileset src="${bootclasspath.cldc}"/>
   559      <zipfileset src="${bootclasspath.cldc}"/>  
   618      <zipfileset src="${impl.cldc.jar}"/>
   560      <zipfileset src="${impl.cldc.jar}"/>  
   619    </zip>
   561    </zip>  
   620   </target>
   562   </target>
   621 
   563 
   622 
   564 
   623 
   565 
   624 <!--GENERATE JAVADOC START-->
   566 <!--GENERATE JAVADOC START-->
   631 			  windowtitle="Runtime API">
   573 			  windowtitle="Runtime API">
   632 
   574 
   633 	   <fileset dir="${java.src.root}/javacommons/" defaultexcludes="yes">
   575 	   <fileset dir="${java.src.root}/javacommons/" defaultexcludes="yes">
   634 		 <include name="utils/javasrc/com/nokia/mj/impl/rt/support/*.java"/>
   576 		 <include name="utils/javasrc/com/nokia/mj/impl/rt/support/*.java"/>
   635 		 <include name="utils/javasrc/com/nokia/mj/impl/utils/**/*.java"/>
   577 		 <include name="utils/javasrc/com/nokia/mj/impl/utils/**/*.java"/>
   636 		 <include name="utils/javasrc/com/nokia/mj/impl/rt/ui/**/*.java"/>
       
   637 		 <include name="fileutils/javasrc/**/*.java"/>
   578 		 <include name="fileutils/javasrc/**/*.java"/>
   638   	     <include name="comms/javasrc/**/*.java"/>
   579   	     <include name="comms/javasrc/**/*.java"/>
   639 		 <include name="javastorage/javasrc/**/*.java"/>
   580 		 <include name="javastorage/javasrc/**/*.java"/>
   640 	   </fileset>
   581 	   </fileset>
   641 
   582