Added sf-scrub-build, for completely freeing up the resources used by a build (ie deleting it from the HD).
authorSimon Howkins <simonh@symbian.org>
Wed, 27 Jan 2010 13:33:20 +0000
changeset 860 fbd25e274e6b
parent 859 206902c43bdb
child 861 caa0601f50c5
Added sf-scrub-build, for completely freeing up the resources used by a build (ie deleting it from the HD). Removed import of generated ant script as it had no effect, and was causing strange failures with sf-scrub-build.
common/build.xml
--- a/common/build.xml	Wed Jan 27 11:34:26 2010 +0000
+++ b/common/build.xml	Wed Jan 27 13:33:20 2010 +0000
@@ -89,14 +89,6 @@
         </else>
     </if>
     
-    <!-- conditional import of generated source spec if available -->
-    <if><available  file="${temp.build.dir}/source-spec.ant.xml" />
-        <then>
-            <echo message="Generated source spec found, importing..." />
-            <import file="${temp.build.dir}/source-spec.ant.xml"/>
-        </then>
-    </if>
-    
     <target name="sf-prep" depends="prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
         <echo>[SF-PREP]</echo>
         <!-- Test for the disk space we would like for this build -->
@@ -178,6 +170,18 @@
         <echo>[SF-BUILD]</echo>
     </target>
     
+    <target name="sf-scrub-build" description="Cleans up everything left behind after a build. Danger!">
+        <if>
+            <available file="${sf.spec.job.drive}/"/>
+            <then>
+                <!-- Un-subst the drive -->
+                <hlm:unsubst drive="${sf.spec.job.drive}"/>
+            </then>
+        </if>
+        <!-- Delete build directory -->
+        <delete dir="${prep.build.dir}"/>
+    </target>
+    
     <target name="sf-generate-source-spec">
         <!-- Generate the sources.csv if hg cache is activated -->
         <if><istrue value="${sf.spec.sourcesync.usecache}"/>