Author: robbinspg
Date: Fri Aug 10 01:15:32 2007
New Revision: 564504

URL: http://svn.apache.org/viewvc?view=rev&rev=564504
Log:
TUSCANY-1509 Apply Brady's patch update 1

Modified:
    incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml
    incubator/tuscany/cpp/sdo/antscripts/platform.properties
    incubator/tuscany/cpp/sdo/antscripts/system.xml

Modified: incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml?view=diff&rev=564504&r1=564503&r2=564504
==============================================================================
--- incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml (original)
+++ incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml Fri Aug 10 
01:15:32 2007
@@ -38,7 +38,8 @@
     <sequential>
       <mkdir dir='@{objdir}'/>
       <cc subsystem='console'
-          objdir='@{objdir}'>
+          objdir='@{objdir}'
+          debug='${debug.compile}'>
             <compiler refid='${compiler.name}-Compiler'/>
             <fileset dir='@{srcdir}' includes='@{infiles}'/>
             <custom-cc-elements/>
@@ -68,7 +69,8 @@
       <mkdir dir='@{outdir}'/>
       <cc link='@{linktype}'
           subsystem='console'
-          outfile='@{outdir}/@{outfile}'>
+          outfile='@{outdir}/@{outfile}'
+          debug='${debug.compile}'>
             <linker refid='${compiler.name}-Linker'/>
             <fileset dir='@{indir}' includes='@{infiles}'/>
             <custom-ld-elements/>
@@ -100,7 +102,8 @@
       <cc outtype='@{outtype}'
           subsystem='console'
           objdir='@{outdir}'
-          outfile='@{outdir}/@{outfile}'>
+          outfile='@{outdir}/@{outfile}'
+          debug='${debug.compile}'>
             <compiler refid='${compiler.name}-Compiler'/>
             <linker refid='${compiler.name}-Linker'/>
             <fileset dir='@{srcdir}' includes='@{infiles}'/>

Modified: incubator/tuscany/cpp/sdo/antscripts/platform.properties
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/platform.properties?view=diff&rev=564504&r1=564503&r2=564504
==============================================================================
--- incubator/tuscany/cpp/sdo/antscripts/platform.properties (original)
+++ incubator/tuscany/cpp/sdo/antscripts/platform.properties Fri Aug 10 
01:15:32 2007
@@ -20,10 +20,13 @@
 platform.exe.ext=
 platform.object.ext=
 platform.script.ext=
+platform.compiler.name=
+platform.debug.compile=
+platform.external.definitions.file=
 
 platform.tuscanySDO.root.dir=
 platform.tuscanySDO.install.dir=
 
 platform.axis2c.home.dir=
 platform.libxml2.lib.dir=
-platform.libxml2.include.dir=
\ No newline at end of file
+platform.libxml2.include.dir=

Modified: incubator/tuscany/cpp/sdo/antscripts/system.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/system.xml?view=diff&rev=564504&r1=564503&r2=564504
==============================================================================
--- incubator/tuscany/cpp/sdo/antscripts/system.xml (original)
+++ incubator/tuscany/cpp/sdo/antscripts/system.xml Fri Aug 10 01:15:32 2007
@@ -19,7 +19,7 @@
 -->
 <project name="system-import">
 
-  <property file="./platform.properties"/>
+  <property file="${basedir}/antscripts/platform.properties"/>
   <property environment="env"/>
 
   <!-- These 3 lines pull in antcontrib and cctasks -->
@@ -32,7 +32,10 @@
      Take the override value from platform.properties if set
   -->
   <if>
-    <isset property="platform.tuscanySDO.root.dir"/>
+    <and>
+      <isset property="platform.tuscanySDO.root.dir"/>
+      <length string="${platform.tuscanySDO.root.dir}" when="greater" 
length="0" trim="true"/>
+    </and>
     <then>
       <property name="tuscanySDO.root.dir" 
location="${platform.tuscanySDO.root.dir}"/>
     </then>
@@ -50,7 +53,10 @@
      Else use a default of ${tuscanySDO.root.dir}/deploy
   -->
   <if>
-    <isset property="platform.tuscanySDO.install.dir"/>
+    <and>
+      <isset property="platform.tuscanySDO.install.dir"/>
+      <length string="${platform.tuscanySDO.install.dir}" when="greater" 
length="0" trim="true"/>
+    </and>
     <then>
       <property name="tuscanySDO.install.dir" 
location="${platform.tuscanySDO.install.dir}"/>
     </then>
@@ -77,7 +83,10 @@
       <property name="tuscanySDO.library.version" value=""/>
     </then>
     <elseif>
-      <isset property="platform.tuscanySDO.library.version"/>
+      <and>
+        <isset property="platform.tuscanySDO.library.version"/>
+        <length string="${platform.tuscanySDO.library.version}" when="greater" 
length="0" trim="true"/>
+      </and>
       <then>
         <property name="tuscanySDO.library.version" 
value="${platform.tuscanySDO.library.version}"/>
       </then>
@@ -93,63 +102,98 @@
      Else take it from the env var AXIS2C_HOME
   -->
   <target name="check.ws" depends="check.libxml2">
-  <if>
-    <isset property="platform.axis2c.home.dir"/>
-    <then>
-      <property name="enable_ws" value="true"/>
-      <property name="axis2c.home.dir" location="${platform.axis2c.home.dir}"/>
-    </then>
-    <elseif>
-      <isset property="env.AXIS2C_HOME"/>
+    <if>
+      <and>
+        <isset property="platform.axis2c.home.dir"/>
+        <length string="${platform.axis2c.home.dir}" when="greater" length="0" 
trim="true"/>
+      </and>
       <then>
         <property name="enable_ws" value="true"/>
-        <property name="axis2c.home.dir" location="${env.AXIS2C_HOME}"/>
+        <property name="axis2c.home.dir" 
location="${platform.axis2c.home.dir}"/>
       </then>
-    </elseif>
-    <else>
-      <echo message="TuscanySDO ws extension is not enabled" level="warning"/>
-    </else>
-  </if>
+      <elseif>
+        <isset property="env.AXIS2C_HOME"/>
+        <then>
+          <property name="enable_ws" value="true"/>
+          <property name="axis2c.home.dir" location="${env.AXIS2C_HOME}"/>
+        </then>
+      </elseif>
+      <else>
+        <echo message="TuscanySDO ws extension is not enabled" 
level="warning"/>
+      </else>
+    </if>
   </target>
-       
+
   <!--
      Configure ${enable_libxml2} and ${axis2c.home.dir}, which is needed to 
compile the ws extension
      Take the override value from platform.properties if set
      Else take it from the env var AXIS2C_HOME
   -->
   <target name="check.libxml2">
-  <if>
-       <and>
-      <isset property="platform.libxml2.lib.dir"/>
-      <isset property="platform.libxml2.include.dir"/>
-       </and>
-    <then>
-      <property name="enable_libxml2" value="true"/>
-      <property name="libxml2.lib.dir"     
location="${platform.libxml2.lib.dir}"/>
-      <property name="libxml2.include.dir" 
location="${platform.libxml2.include.dir}"/>
-      <condition property="iconv.home.dir" value="${platform.iconv.home.dir}">
-       <os family="windows"/>
-      </condition>
-    </then>
-    <elseif>
+    <if>
       <and>
-        <isset property="env.LIBXML2_LIB"/>
-        <isset property="env.LIBXML2_INCLUDE"/>
+        <isset property="platform.libxml2.lib.dir"/>
+        <isset property="platform.libxml2.include.dir"/>
+        <length string="${platform.libxml2.lib.dir}" when="greater" length="0" 
trim="true"/>
+        <length string="${platform.libxml2.include.dir}" when="greater" 
length="0" trim="true"/>
       </and>
       <then>
         <property name="enable_libxml2" value="true"/>
-        <property name="libxml2.lib.dir"     location="${env.LIBXML2_LIB}"/>
-        <property name="libxml2.include.dir" 
location="${env.LIBXML2_INCLUDE}"/>
-        <condition property="iconv.home.dir" value="${env.ICONV_HOME}">
+        <property name="libxml2.lib.dir"     
location="${platform.libxml2.lib.dir}"/>
+        <property name="libxml2.include.dir" 
location="${platform.libxml2.include.dir}"/>
+        <condition property="iconv.home.dir" 
value="${platform.iconv.home.dir}">
           <os family="windows"/>
         </condition>
       </then>
+      <elseif>
+        <and>
+          <isset property="env.LIBXML2_LIB"/>
+          <isset property="env.LIBXML2_INCLUDE"/>
+        </and>
+        <then>
+          <property name="enable_libxml2" value="true"/>
+          <property name="libxml2.lib.dir"     location="${env.LIBXML2_LIB}"/>
+          <property name="libxml2.include.dir" 
location="${env.LIBXML2_INCLUDE}"/>
+          <condition property="iconv.home.dir" value="${env.ICONV_HOME}">
+            <os family="windows"/>
+          </condition>
+        </then>
+      </elseif>
+      <else>
+        <fail message="Unable to find libxml2 installation, must be set by 
LIBXML2_LIB and LIBXML2_INCLUDE or in platform.properties file"/>
+      </else>
+    </if>
+  </target>
+
+  <!--
+     Configure the debug.compile flag
+     Try looking first on the command line
+     Then take the override value from platform.properties if set
+     Else its false
+  -->
+  <if>
+    <isset property="debug"/>
+    <then>
+      <!-- Tests if its set on the ant command line "ant -Ddebug=true" -->
+      <if>
+        <istrue value="${debug}"/>
+        <then>
+          <property name="debug.compile" value="true"/>
+        </then>
+      </if>
+    </then>
+    <elseif>
+      <and>
+        <isset property="platform.debug.compile"/>
+        <istrue value="${platform.debug.compile}"/>
+        <length string="${platform.debug.compile}" when="greater" length="0" 
trim="true"/>
+      </and>
+      <then>
+        <property name="debug.compile" value="true"/>
+      </then>
     </elseif>
-    <else>
-      <fail message="Unable to find libxml2 installation, must be set by 
LIBXML2_LIB and LIBXML2_INCLUDE or in platform.properties file"/>
-    </else>
   </if>
-  </target>
+  <property name="debug.compile" value="false"/>
 
   <!--
      Configure the compiler.name
@@ -157,7 +201,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.compiler.name"/>
+    <and>
+      <isset property="platform.compiler.name"/>
+      <length string="${platform.compiler.name}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="compiler.name" value="${platform.compiler.name}"/>
     </then>
@@ -181,7 +228,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.lib.ext"/>
+    <and>
+      <isset property="platform.lib.ext"/>
+      <length string="${platform.lib.ext}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="lib.ext" value="${platform.lib.ext}"/>
     </then>
@@ -206,7 +256,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.dll.ext"/>
+    <and>
+      <isset property="platform.dll.ext"/>
+      <length string="${platform.dll.ext}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="dll.ext" value="${platform.dll.ext}"/>
     </then>
@@ -226,7 +279,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.lib.prefix"/>
+    <and>
+      <isset property="platform.lib.prefix"/>
+      <length string="${platform.lib.prefix}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="lib.prefix" value="${platform.lib.prefix}"/>
     </then>
@@ -251,7 +307,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.object.ext"/>
+    <and>
+      <isset property="platform.object.ext"/>
+      <length string="${platform.object.ext}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="object.ext" value="${platform.object.ext}"/>
     </then>
@@ -276,7 +335,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.exe.ext"/>
+    <and>
+      <isset property="platform.exe.ext"/>
+      <length string="${platform.exe.ext}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="exe.ext" value="${platform.exe.ext}"/>
     </then>
@@ -301,7 +363,10 @@
      Else set it based on the OS
   -->
   <if>
-    <isset property="platform.script.ext"/>
+    <and>
+      <isset property="platform.script.ext"/>
+      <length string="${platform.script.ext}" when="greater" length="0" 
trim="true"/>
+    </and>
     <then>
       <property name="script.ext" value="${platform.script.ext}"/>
     </then>
@@ -319,52 +384,6 @@
     </else>
   </if>
 
-  <target name="display.system" depends="check.ws,check.libxml2">
-
-    <!-- Tuscany paths, etc -->
-    <echo message=" "/>
-    <echo message="TuscanySDO paths"/>
-    <echo message="  tuscanySDO.root.dir=         ${tuscanySDO.root.dir}"/>
-    <echo message="  tuscanySDO.root.src.dir=     ${tuscanySDO.root.src.dir}"/>
-    <echo message="  tuscanySDO.install.dir=      ${tuscanySDO.install.dir}"/>
-    <echo message="  tuscanySDO.library.version=  
'${tuscanySDO.library.version}'"/>
-
-    <!-- compilers, libs, etc -->
-    <echo message=" "/>
-    <echo message="TuscanySDO compiler configuration"/>
-    <echo message="  compiler.name=               '${compiler.name}'"/>
-    <echo message="  lib.ext=                     '${lib.ext}'"/>
-    <echo message="  dll.ext=                     '${dll.ext}'"/>
-    <echo message="  lib.prefix=                  '${lib.prefix}'"/>
-    <echo message="  object.ext=                  '${object.ext}'"/>
-    <echo message="  exe.ext=                     '${exe.ext}'"/>
-    <echo message="  script.ext=                  '${script.ext}'"/>
-
-    <!-- libxml2 -->
-    <if>
-      <isset property="enable_libxml2"/>
-      <then>
-        <echo message=" "/>
-        <echo message="libxml2 location"/>
-        <echo message="  libxml2.lib.dir=          ${libxml2.lib.dir}"/>
-        <echo message="  libxml2.include.dir=      ${libxml2.include.dir}"/>
-      </then>
-    </if>
-
-    <!-- axis2c -->
-    <if>
-      <isset property="enable_ws"/>
-      <then>
-        <echo message=" "/>
-        <echo message="axis2c location"/>
-        <echo message="  axis2c.home.dir=          ${axis2c.home.dir}"/>
-      </then>
-    </if>
-
-    <echo message=" "/>
-
-  </target>
-
 
   <condition property="windows" value="true">
     <os family="windows"/>
@@ -391,7 +410,7 @@
     <compilerarg value="/EHsc"/>
   </compiler>
   <compiler id="g++-Compiler" extends="Tuscany-BaseCompiler" name="g++"/>
- 
+
   <!-- Used for cross compilation with the -m32 flag -->
   <compiler id="g++m32-Compiler" extends="Tuscany-BaseCompiler" name="g++">
     <compilerarg value="-m32"/>
@@ -413,5 +432,65 @@
   <linker id="g++m32-Linker" extends="Tuscany-BaseLinker" name="g++">
     <linkerarg value="-m32"/>
   </linker>
+
+  <if>
+    <and>
+      <isset property="platform.external.definitions.file"/>
+      <length string="${platform.external.definitions.file}" when="greater" 
length="0" trim="true"/>
+    </and>
+    <then>
+      <property name="external.definitions.file" 
value="${platform.external.definitions.file}"/>
+      <import file="${external.definitions.file}"/>
+    </then>
+  </if>
+  <property name="external.definitions.file" value=""/>
+
+  <target name="display.system" depends="check.ws,check.libxml2">
+
+    <!-- Tuscany paths, etc -->
+    <echo message=" "/>
+    <echo message="TuscanySDO paths"/>
+    <echo message="  tuscanySDO.root.dir=         ${tuscanySDO.root.dir}"/>
+    <echo message="  tuscanySDO.root.src.dir=     ${tuscanySDO.root.src.dir}"/>
+    <echo message="  tuscanySDO.install.dir=      ${tuscanySDO.install.dir}"/>
+    <echo message="  tuscanySDO.library.version=  
'${tuscanySDO.library.version}'"/>
+
+    <!-- compilers, libs, etc -->
+    <echo message=" "/>
+    <echo message="TuscanySDO compiler configuration"/>
+    <echo message="  compiler.name=               '${compiler.name}'"/>
+    <echo message="  debug.compile=               '${debug.compile}'"/>
+    <echo message="  lib.ext=                     '${lib.ext}'"/>
+    <echo message="  dll.ext=                     '${dll.ext}'"/>
+    <echo message="  lib.prefix=                  '${lib.prefix}'"/>
+    <echo message="  object.ext=                  '${object.ext}'"/>
+    <echo message="  exe.ext=                     '${exe.ext}'"/>
+    <echo message="  script.ext=                  '${script.ext}'"/>
+    <echo message="  external.definitions.file=   
'${external.definitions.file}'"/>
+
+    <!-- libxml2 -->
+    <if>
+      <isset property="enable_libxml2"/>
+      <then>
+        <echo message=" "/>
+        <echo message="libxml2 location"/>
+        <echo message="  libxml2.lib.dir=          ${libxml2.lib.dir}"/>
+        <echo message="  libxml2.include.dir=      ${libxml2.include.dir}"/>
+      </then>
+    </if>
+
+    <!-- axis2c -->
+    <if>
+      <isset property="enable_ws"/>
+      <then>
+        <echo message=" "/>
+        <echo message="axis2c location"/>
+        <echo message="  axis2c.home.dir=          ${axis2c.home.dir}"/>
+      </then>
+    </if>
+
+    <echo message=" "/>
+
+  </target>
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to