home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.pde.build_3.1.0 / scripts / build.xml next >
Encoding:
Text File  |  2005-09-29  |  5.5 KB  |  126 lines

  1. <project name="Build All Elements" default="main">
  2.  
  3. <!-- ===================================================================== -->
  4. <!-- Global properties.  See the build.properties for information on -->
  5. <!-- the properties which callers can control. -->
  6. <!-- ===================================================================== -->
  7. <property name="builder" location="${user.dir}"/>
  8. <property name="builderDirectory" location="${builder}"/>
  9. <property name="buildProperties" location="${builder}/build.properties"/>
  10. <property file="${buildProperties}"/>
  11. <property name="customTargets" location="${builderDirectory}/customTargets.xml"/>
  12. <property name="genericTargets" location="genericTargets.xml"/>
  13.  
  14. <!-- ===================================================================== -->
  15. <!-- main entry point to setup, fetch, generate, build etc. Use -->
  16. <!-- the customTargets.xml to modify the build behaviour. -->
  17. <!-- ===================================================================== -->
  18.  
  19. <!-- ******* add in the descriptions for each of the top level targets to teh target decl -->
  20. <target name="main" description="the main build target">    
  21.       <antcall target="preBuild" /> 
  22.      <antcall target="fetch" />
  23.     <antcall target="generate" /> 
  24.     <antcall target="process" /> 
  25.     <antcall target="assemble" />
  26.     <antcall target="package" />
  27.     <antcall target="postBuild" />
  28. </target>
  29.  
  30. <!-- ===================================================================== -->
  31. <!-- Steps to do before starting the build.  Typical setup includes -->
  32. <!-- fetching the map files and building the directory.  -->
  33. <!-- ===================================================================== -->
  34. <target name="preBuild">
  35.     <mkdir dir="${buildDirectory}" />
  36.     <ant antfile="${customTargets}" target="preSetup" /> 
  37.     <ant antfile="${customTargets}" target="getMapFiles" /> 
  38.     <concat destfile="${buildDirectory}/directory.txt" fixlastline="yes">
  39.         <fileset dir="${buildDirectory}" includes="maps/**/*.map"/>
  40.     </concat>
  41.     <ant antfile="${customTargets}" target="postSetup" />
  42. </target>
  43.  
  44. <!-- ===================================================================== -->
  45. <!-- Fetch the elements identified in the customTargets -->
  46. <!-- ===================================================================== -->
  47. <target name="fetch" unless="skipFetch">
  48.     <ant antfile="${customTargets}" target="preFetch"/>
  49.     <!-- Generates and then execute the fetch scripts for each build element-->
  50.     <ant antfile="${customTargets}" target="allElements">
  51.         <property name="target" value="fetchElement" />
  52.     </ant>
  53.     
  54.     <ant antfile="${customTargets}" target="postFetch"/>
  55. </target>
  56.  
  57. <!-- ===================================================================== -->
  58. <!-- Generate the build scripts for each element identified in the customTargets -->
  59. <!-- ===================================================================== -->
  60. <target name="generate">
  61.     <ant antfile="${customTargets}" target="preGenerate"/>
  62.     <!-- Generate the build.xml for each build element-->
  63.     <ant antfile="${customTargets}" target="allElements">
  64.         <property name="target" value="generateScript" />
  65.     </ant>
  66.     <ant antfile="${customTargets}" target="postGenerate"/>    
  67. </target>
  68.  
  69. <!-- ===================================================================== -->
  70. <!-- Run the build scripts for each element identified in the customTargets -->
  71. <!-- ===================================================================== -->
  72. <target name="process">
  73.     <!-- Run custom tasks before processing, i.e. creating source build zip files -->
  74.     <ant antfile="${customTargets}" target="preProcess" />
  75.  
  76.     <!-- Process all of the build elements-->
  77.     <ant antfile="${customTargets}" target="allElements">
  78.         <property name="target" value="processElement" />
  79.     </ant>
  80.  
  81.     <!-- Run custom tasks after compiling, i.e. reporting compile errors -->
  82.     <ant antfile="${customTargets}" target="postProcess" />
  83. </target>
  84.  
  85. <!-- ===================================================================== -->
  86. <!-- Assemble the build elements into final distributions -->
  87. <!-- ===================================================================== -->
  88. <target name="assemble">
  89.     <ant antfile="${customTargets}" target="preAssemble"/>
  90.     <ant antfile="${customTargets}" target="allElements">
  91.         <property name="target" value="assembleElement"/>
  92.     </ant>
  93.     <ant antfile="${customTargets}" target="postAssemble"/>    
  94. </target>
  95.  
  96. <!-- ===================================================================== -->
  97. <!-- Package the build elements into final distributions -->
  98. <!-- ===================================================================== -->
  99. <target name="package" if="runPackager">
  100.     <ant antfile="${customTargets}" target="prePackage"/>
  101.     <ant antfile="${customTargets}" target="allElements">
  102.         <property name="target" value="packageElement"/>
  103.     </ant>
  104.     <ant antfile="${customTargets}" target="postPackage"/>    
  105. </target>
  106.  
  107. <!-- ===================================================================== -->
  108. <!-- Do any steps required after the build (e.g., posting, testing, ...) -->
  109. <!-- ===================================================================== -->
  110. <target name="postBuild">
  111.     <ant antfile="${customTargets}" target="postBuild" />
  112. </target>
  113.  
  114. <!-- ===================================================================== -->
  115. <!-- Clean the build elements.  This target is here as an entry -->
  116. <!-- point to the customTargets.  It is not called directly in the normal -->
  117. <!-- course of events. -->
  118. <!-- ===================================================================== -->
  119. <target name="clean">
  120.   <ant antfile="${customTargets}" target="allElements">
  121.      <property name="target" value="cleanElement"/>
  122.   </ant>
  123. </target>
  124.  
  125. </project>
  126.