commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r829873 - in /commons/sandbox/runtime/trunk/src/main/native: build/org/apache/commons/runtime/ConditionalExecTask.java build/org/apache/commons/runtime/VolatileProperty.java configure.xml
Date Mon, 26 Oct 2009 17:39:54 GMT
Author: mturk
Date: Mon Oct 26 17:39:53 2009
New Revision: 829873

URL: http://svn.apache.org/viewvc?rev=829873&view=rev
Log:
Fix sequence task

Modified:
    commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalExecTask.java
    commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/VolatileProperty.java
    commons/sandbox/runtime/trunk/src/main/native/configure.xml

Modified: commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalExecTask.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalExecTask.java?rev=829873&r1=829872&r2=829873&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalExecTask.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalExecTask.java
Mon Oct 26 17:39:53 2009
@@ -86,11 +86,6 @@
         setFailonerror(true);
         setFailIfExecutionFails(true);
         boolean perform = true;
-        // Always unset result properties
-        if (resultProperty != null)
-            VolatileProperty.unset(getProject(), resultProperty);
-        if (outputProp != null)
-            VolatileProperty.unset(getProject(), outputProp);
         for (Iterator<Condition> i = conditions.iterator(); i.hasNext();) {
             Condition c = i.next();
             if (!c.eval())
@@ -99,6 +94,11 @@
         if (!perform) {
             return;
         }
+        // Always unset result properties
+        if (resultProperty != null)
+            VolatileProperty.unset(getProject(), resultProperty);
+        if (outputProp != null)
+            VolatileProperty.unset(getProject(), outputProp);
         try {
             super.execute();
         } catch(BuildException ex) {

Modified: commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/VolatileProperty.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/VolatileProperty.java?rev=829873&r1=829872&r2=829873&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/VolatileProperty.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/VolatileProperty.java
Mon Oct 26 17:39:53 2009
@@ -131,7 +131,9 @@
             throw new BuildException("Attribute \"equals\" is required");
         if (name == null)
             throw new BuildException("Attribute \"name\" is required");
-        if (equ.equals(getName()))
+        String val = getProject().getProperty(getName());
+
+        if (val != null && equ.equals(val))
             return true;
         else
             return false;

Modified: commons/sandbox/runtime/trunk/src/main/native/configure.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure.xml?rev=829873&r1=829872&r2=829873&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure.xml (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure.xml Mon Oct 26 17:39:53 2009
@@ -121,7 +121,7 @@
               resultproperty="sizeof.err">
             <and>
                 <systemid equals="windows"/>
-                <equals arg1="${cc}" arg2="cl"/>
+                <variable name="cc" equals="cl"/>
             </and>
             <arg line="-nologo"/>
             <arg line="cc${build.tstamp}.c /link /out:cc${build.tstamp}.exe"/>
@@ -130,7 +130,7 @@
               resultproperty="sizeof.err" error="cc${build.tstamp}.err">
             <and>
                 <systemid equals="windows"/>
-                <equals arg1="${sizeof.err}" arg2="0"/>
+                <variable name="sizeof.err" equals="0"/>
             </and>
         </cexec>
         <delete>
@@ -157,16 +157,16 @@
               resultproperty="have.err">
             <and>
                 <systemid equals="windows"/>
-                <variable name="${cc}" equals="cl"/>
+                <variable name="cc" equals="cl"/>
             </and>
             <arg line="-nologo"/>
             <arg line="cc${build.tstamp}.c /link /out:cc${build.tstamp}.exe"/>
         </cexec>
         <conditional variable="@{result}" value="1" else="0">
-            <variable name="${have.err}" equals="0"/>
+            <variable name="have.err" equals="0"/>
         </conditional>
         <conditional variable="have.res" value="ok" else="not found">
-            <variable name="${have.err}" equals="0"/>
+            <variable name="have.err" equals="0"/>
         </conditional>
         <delete>
             <fileset dir="${src.native}">
@@ -191,16 +191,16 @@
               resultproperty="have.err">
             <and>
                 <systemid equals="windows"/>
-                <variable name="${cc}" equals="cl"/>
+                <variable name="cc" equals="cl"/>
             </and>
             <arg line="-nologo"/>
             <arg line="cc${build.tstamp}.c /link /out:cc${build.tstamp}.exe @{file}.lib"/>
         </cexec>
         <conditional variable="@{result}" value="1" else="0">
-            <variable name="${have.err}" equals="0"/>
+            <variable name="have.err" equals="0"/>
         </conditional>
         <conditional variable="have.res" value="ok" else="not found">
-            <variable name="${have.err}" equals="0"/>
+            <variable name="have.err" equals="0"/>
         </conditional>
         <delete>
             <fileset dir="${src.native}">



Mime
View raw message