harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r450771 - /incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
Date Thu, 28 Sep 2006 09:33:41 GMT
Author: hindessm
Date: Thu Sep 28 02:33:40 2006
New Revision: 450771

URL: http://svn.apache.org/viewvc?view=rev&rev=450771
Log:
Make clean target fail if files are left in the build/classes tree
since this is a good indication that patternsets are out of date.

Modified:
    incubator/harmony/enhanced/classlib/trunk/make/build-java.xml

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/build-java.xml?view=diff&rev=450771&r1=450770&r2=450771
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-java.xml Thu Sep 28 02:33:40 2006
@@ -63,17 +63,45 @@
             depends="-copy-kernel-patternsets,
                      -modules-clean-bin,
                      -clean-kernel-patternsets,
+                     -clean-bin-catch-all-test,
                      -clean-bin-catch-all"/>
 
     <target name="-modules-clean-bin">
         <call-modules target="clean" />
     </target>
 
-    <target name="-clean-bin-catch-all">
+    <target name="-clean-bin-catch-all-test">
+        <!-- without this test the pathconvert in the catch all clean
+             target fails -->
+        <available property="catch.all.required"
+                   file="${build.output}" type="dir" />
+    </target>
+
+    <target name="-clean-bin-catch-all" if="catch.all.required">
+        <fileset id="built.files" dir="${build.output}">
+            <include name="**/**" />
+        </fileset>
+        <pathconvert property="built.files.list"
+                     refid="built.files"
+                     pathsep="${line.separator}" />
+        <condition property="built.files.exist">
+            <not>
+                <equals arg1="${built.files.list}" arg2="" />
+            </not>
+        </condition>
+        <fail if="built.files.exist">
+...
+
+Built files still exist after module clean targets have run.  This
+probably means that one or more patternsets are incomplete.  The
+remaining files are:
+
+${built.files.list}
+
+        </fail>
+        
         <delete includeemptydirs="true" failonerror="false">
-            <fileset dir="${build.output}">
-                <include name="**/**" />
-            </fileset>
+            <fileset refid="built.files" />
         </delete>
     </target>
 



Mime
View raw message