harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r498557 - in /harmony/enhanced/classlib/trunk: make/properties.xml modules/crypto/build.xml
Date Mon, 22 Jan 2007 08:24:51 GMT
Author: ayza
Date: Mon Jan 22 00:24:50 2007
New Revision: 498557

URL: http://svn.apache.org/viewvc?view=rev&rev=498557
Log:
New macro for exclude list preparation (make/properties.xml) as well as sample usage pattern
for this macro (modules/crypto/build.xml) were added. Related to HARMONY-2970.

Modified:
    harmony/enhanced/classlib/trunk/make/properties.xml
    harmony/enhanced/classlib/trunk/modules/crypto/build.xml

Modified: harmony/enhanced/classlib/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/properties.xml?view=diff&rev=498557&r1=498556&r2=498557
==============================================================================
--- harmony/enhanced/classlib/trunk/make/properties.xml (original)
+++ harmony/enhanced/classlib/trunk/make/properties.xml Mon Jan 22 00:24:50 2007
@@ -198,6 +198,13 @@
     <property name="build.module" value="*" />
     <property name="exclude.module" value="nothing" />
 
+    <!-- names of exclude lists, used by prepare-exclude-list macro -->
+    <property name="common.exclude.file" location="exclude.common" />
+    <property name="platform.exclude.file"
+              location="exclude.${hy.platform}.${hy.test.vm.name}" />
+    <property name="interm.exclude.file"
+              location="exclude.${hy.platform}.${hy.test.vm.name}.interm" />
+
     <target name="echo" depends="svn-prop, svn-info"
             description="Display the properties defined by this ant file" >
         <echo>
@@ -339,4 +346,56 @@
             </exec>
         </sequential>
     </macrodef>
+
+    <!-- Concatenate several exclude lists into single list -->
+    <macrodef name="prepare-exclude-list">
+       <attribute name="moduleName"/>
+       <!-- directory with exclude lists for the module -->
+       <attribute name="dir"/>
+       <!-- name of concatenated list, should be an absolute pathname -->
+       <attribute name="result"/>
+       <sequential>
+           <condition property="@{moduleName}.fname1"
+                      value="${common.exclude.file}">
+               <and>
+                   <available file="@{dir}${file.separator}${common.exclude.file}"/>
+                   <length file="@{dir}${file.separator}${common.exclude.file}"
+                           when="greater" length="0"/>
+               </and>
+           </condition>
+           <property name="@{moduleName}.fname1" value=""/>
+
+           <condition property="@{moduleName}.fname2"
+                      value="${platform.exclude.file}">
+               <and>
+                   <available file="@{dir}${file.separator}${platform.exclude.file}"/>
+                   <length file="@{dir}${file.separator}${platform.exclude.file}"
+                           when="greater" length="0"/>
+               </and>
+           </condition>
+           <property name="@{moduleName}.fname2" value=""/>
+
+           <condition property="@{moduleName}.fname3"
+                      value="${interm.exclude.file}">
+               <and>
+                   <available file="@{dir}${file.separator}${interm.exclude.file}"/>
+                   <length file="@{dir}${file.separator}${interm.exclude.file}"
+                           when="greater" length="0"/>
+               </and>
+           </condition>
+           <property name="@{moduleName}.fname3" value=""/>
+
+           <tempfile property="@{moduleName}.tmpFile" destdir="@{dir}"/>
+           <echo message="" file="${@{moduleName}.tmpFile}"/>
+           <basename file="${@{moduleName}.tmpFile}"
+                     property="@{moduleName}.tmpFileName" />
+           <concat destfile="@{result}" force="yes">
+               <filelist dir="@{dir}"
+                   files="${@{moduleName}.fname1} ${@{moduleName}.fname2} ${@{moduleName}.fname3}
${@{moduleName}.tmpFileName}"/>
+           </concat>
+           <delete file="${@{moduleName}.tmpFile}" failonerror="false"
+                   quiet="true"/>
+       </sequential>
+   </macrodef>
+
 </project>

Modified: harmony/enhanced/classlib/trunk/modules/crypto/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/crypto/build.xml?view=diff&rev=498557&r1=498556&r2=498557
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/crypto/build.xml (original)
+++ harmony/enhanced/classlib/trunk/modules/crypto/build.xml Mon Jan 22 00:24:50 2007
@@ -39,11 +39,7 @@
 
     <property file="../../make/depends.properties" />
 
-    <property name="crypto.common.exclude.file" location="./make/exclude.common" />
-    <property name="crypto.platform.exclude.file" location="./make/exclude.${hy.platform}.${hy.test.vm.name}"
/>
-    <property name="crypto.interm.exclude.file" location="./make/exclude.${hy.platform}.${hy.test.vm.name}.interm"
/>
-
-    <property name="exclude.file" location="${hy.hdk}/build/crypto.exclude" />
+    <property name="crypto.exclude.file" location="${hy.hdk}/build/crypto.exclude" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -169,30 +165,11 @@
         </compile-tests>
     </target>
 
-
-    <target name="prepare-exclude" depends="-init-exclude, -add-common, -add-platform,
-add-intermittent">
-    </target>
-
-    <target name="-init-exclude" >
-        <echo message="" file="${exclude.file}" />
-        <loadfile property="crypto.common.exclude.exist" srcFile="${crypto.common.exclude.file}"
failonerror="false" />
-        <loadfile property="crypto.platform.exclude.exist" srcFile="${crypto.platform.exclude.file}"
failonerror="false" />
-        <loadfile property="crypto.interm.exclude.exist" srcFile="${crypto.interm.exclude.file}"
failonerror="false"/>
-    </target>
-
-    <target name="-add-common" if="crypto.common.exclude.exist" >
-        <echo message="${crypto.common.exclude.exist}${line.separator}" file="${exclude.file}"
append="true" />
+    <target name="prepare-exclude">
+       <prepare-exclude-list moduleName="crypto" dir="./make"
+                             result="${crypto.exclude.file}"/>
     </target>
 
-    <target name="-add-platform" if="crypto.platform.exclude.exist" >
-        <echo message="${crypto.platform.exclude.exist}${line.separator}" file="${exclude.file}"
append="true" />
-    </target>
-
-    <target name="-add-intermittent" if="crypto.interm.exclude.exist" >
-        <echo message="${crypto.interm.exclude.exist}${line.separator}" file="${exclude.file}"
append="true" />
-    </target>
-
-
     <target name="run-tests" depends="run-tests-api, run-tests-impl" />
 
     <target name="run-tests-api">
@@ -209,7 +186,7 @@
                 <batchtest todir="${hy.tests.reports}" haltonfailure="no" unless="test.case">
                     <fileset dir="${hy.crypto.src.test}/api/java">
                         <include name="**/*Test.java"/>
-                        <excludesfile name="${exclude.file}" />
+                        <excludesfile name="${crypto.exclude.file}" />
                     </fileset>
                 </batchtest>
 
@@ -224,7 +201,7 @@
                 <batchtest todir="${hy.tests.reports}" haltonfailure="no" unless="test.case">
                     <fileset dir="${hy.crypto.src.test}/api/java.injected">
                         <include name="**/*Test.java"/>
-                        <excludesfile name="${exclude.file}" />
+                        <excludesfile name="${crypto.exclude.file}" />
                     </fileset>
                 </batchtest>
 
@@ -246,7 +223,7 @@
                 <batchtest todir="${hy.tests.reports}" haltonfailure="no" unless="test.case">
                     <fileset dir="${hy.crypto.src.test}/impl/java">
                         <include name="**/*Test.java"/>
-                        <excludesfile name="${exclude.file}" />
+                        <excludesfile name="${crypto.exclude.file}" />
                     </fileset>
                 </batchtest>
 
@@ -261,7 +238,7 @@
                 <batchtest todir="${hy.tests.reports}" haltonfailure="no" unless="test.case">
                     <fileset dir="${hy.crypto.src.test}/impl/java.injected">
                         <include name="**/*Test.java"/>
-                        <excludesfile name="${exclude.file}" />
+                        <excludesfile name="${crypto.exclude.file}" />
                     </fileset>
                 </batchtest>
 



Mime
View raw message