You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ad...@apache.org on 2007/09/05 19:38:15 UTC

svn commit: r573011 - in /incubator/tuscany/cpp/das/antscripts: ./ compile-targets.xml platform.properties system.xml

Author: adrianocrestani
Date: Wed Sep  5 10:38:14 2007
New Revision: 573011

URL: http://svn.apache.org/viewvc?rev=573011&view=rev
Log:
-adding the antscript core files

Added:
    incubator/tuscany/cpp/das/antscripts/
    incubator/tuscany/cpp/das/antscripts/compile-targets.xml
    incubator/tuscany/cpp/das/antscripts/platform.properties
    incubator/tuscany/cpp/das/antscripts/system.xml

Added: incubator/tuscany/cpp/das/antscripts/compile-targets.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/compile-targets.xml?rev=573011&view=auto
==============================================================================
--- incubator/tuscany/cpp/das/antscripts/compile-targets.xml (added)
+++ incubator/tuscany/cpp/das/antscripts/compile-targets.xml Wed Sep  5 10:38:14 2007
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+     
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<project name='compiler-targets'>
+
+  <import file="./system.xml"/>
+
+  <!--
+    Do a cpp compilation.
+    Inherits from "Tuscany-BaseCompiler", which has an include path of:
+        ${tuscanyDAS.root.src.dir}/core/src
+    @param objdir - directory where the object files will be written
+    @param srcdir - directory where the source files are located.
+    @param infiles - a space seperated list of the files to compile
+    @param custom-cc-elements - any extra cpp elements, may also be extra <includepath> elements
+  -->
+  <macrodef name="cpp-compile">
+    <attribute name="objdir" default="."/>
+    <attribute name="srcdir" default="."/>
+    <attribute name="infiles" default="*.cpp"/>
+    <element name="custom-cc-elements" optional="true"/>
+    <sequential>
+      <mkdir dir='@{objdir}'/>
+      <cc subsystem='console'
+          objdir='@{objdir}'
+          debug='${debug.compile}'>
+            <compiler refid='${compiler.name}-Compiler'/>
+            <fileset dir='@{srcdir}' includes='@{infiles}'/>
+            <custom-cc-elements/>
+      </cc>
+
+    </sequential>
+  </macrodef>
+
+  <!--
+    Do a cpp link which results in either a library (linktype of plugin, shared, or static)
+    or an executable (linktype of executable).
+    Inherits from "Tuscany-BaseLinker"
+    @param outfile - name of the library to create, OS prefixes and suffixes will be added
+    @param destdir - directory where the library will be written
+    @param infiles - a space seperated list of the object files to link
+    @param linktype - executable, plugin, shared, static
+    @param custom-ld-elements - any extra cpp elements, may also be extra <libset> elements
+  -->
+  <macrodef name="cpp-link">
+    <attribute name="outfile" default="out"/>
+    <attribute name="outdir" default="."/>
+    <attribute name="indir" default="${env}"/>
+    <attribute name="infiles" default="*${object.ext}"/>
+    <attribute name="linktype" default="shared"/>
+    <element name="custom-ld-elements" optional="true"/>
+    <sequential>
+      <mkdir dir='@{outdir}'/>
+      <cc link='@{linktype}'
+          subsystem='console'
+          outfile='@{outdir}/@{outfile}'
+          debug='${debug.compile}'>
+            <linker refid='${compiler.name}-Linker'/>
+            <fileset dir='@{indir}' includes='@{infiles}'/>
+            <custom-ld-elements/>
+      </cc>
+    </sequential>
+  </macrodef>
+
+  <!--
+    Do a cpp build which compiles and links, resulting in either a library (linktype
+    of plugin, shared, or static) or an executable (linktype of executable).
+    Inherits from both "Tuscany-BaseCompiler" and "Tuscany-BaseLinker"
+    @param srcdir  - directory where the source files are located.
+    @param infiles - a space seperated list of the source files to compile and link
+    @param outdir  - directory where the output file will be written
+    @param outfile - name of the library or binary to create, OS prefixes and suffixes may be added
+    @param outtype - executable, plugin, shared, static
+    @param custom-build-elements - any extra elements needed for compiling or linking
+                                   may also be extra <includepath> or <libset> elements
+  -->
+  <macrodef name="cpp-build">
+    <attribute name="srcdir" default="."/>
+    <attribute name="infiles" default="**/*.cpp"/>
+    <attribute name="outdir" default="."/>
+    <attribute name="outfile" default="out"/>
+    <attribute name="outtype" default="shared"/>
+    <element name="custom-build-elements" optional="true"/>
+    <sequential>
+      <mkdir dir='@{outdir}'/>
+      <cc outtype='@{outtype}'
+          subsystem='console'
+          objdir='@{outdir}'
+          outfile='@{outdir}/@{outfile}'
+          debug='${debug.compile}'>
+            <compiler refid='${compiler.name}-Compiler'/>
+            <linker refid='${compiler.name}-Linker'/>
+            <fileset dir='@{srcdir}' includes='@{infiles}'/>
+            <custom-build-elements/>
+      </cc>
+    </sequential>
+  </macrodef>
+
+  <!--
+    Install a single file
+    @param file - file to install
+    @param srcdir - directory of file to install
+    @param destdir - Where to install the file
+    @param executable - set permissions to executable, defaults true
+  -->
+  <macrodef name="cpp-install-file">
+    <attribute name="srcfile"/>
+    <attribute name="srcdir" default="."/>
+    <attribute name="destfile" default="@{srcfile}"/>
+    <attribute name="destdir"/>
+    <attribute name="executable" default="true"/>
+    <sequential>
+      <mkdir dir="@{destdir}"/>
+      <copy file="@{srcdir}/@{srcfile}" tofile="@{destdir}/@{destfile}" overwrite='true'/>
+      <if>
+        <equals arg1="@{executable}" arg2="true"/>
+        <then>
+          <chmod file="@{destdir}/@{destfile}" perm="755"/>
+        </then>
+      </if>
+    </sequential>
+  </macrodef>
+
+  <!--
+    Install multiple files
+    @param files - space seperated list of files to install
+    @param srcdir - location of files to install
+    @param destdir - Where to install files
+    @param executable - set permissions to executable, defaults false
+  -->
+  <macrodef name="cpp-install-files">
+    <attribute name="files" default="*.*"/>
+    <attribute name="srcdir" default="."/>
+    <attribute name="destdir"/>
+    <attribute name="executable" default="false"/>
+    <sequential>
+      <mkdir dir="@{destdir}"/>
+      <copy todir="@{destdir}" overwrite='true'>
+        <fileset dir="@{srcdir}" includes="@{files}"/>
+      </copy>
+      <if>
+        <equals arg1="@{executable}" arg2="true"/>
+        <then>
+          <chmod file="@{destdir}/@{files}" perm="755"/>
+        </then>
+      </if>
+    </sequential>
+  </macrodef>
+
+  <!--
+    Install a library
+    @param lib - library to install
+    @param srcdir - directory of file to install
+    @param destdir - Where to install the file
+    @param executable - set permissions to executable, defaults true
+  -->
+  <macrodef name="cpp-install-lib">
+    <attribute name="lib"/>
+    <attribute name="srcdir" default="."/>
+    <attribute name="destrootdir"/>
+    <attribute name="version" default="${tuscanyDAS.library.version}"/>
+    <sequential>
+      <cpp-install-file
+          srcfile="${lib.prefix}@{lib}${lib.ext}"
+          srcdir="@{srcdir}"
+          destfile="${lib.prefix}@{lib}${lib.ext}@{version}"
+          destdir="@{destrootdir}/lib"/>
+      <if>
+        <os family="windows"/>
+        <then>
+          <cpp-install-file
+              srcfile="${lib.prefix}@{lib}${dll.ext}"
+              srcdir="@{srcdir}"
+              destfile="${lib.prefix}@{lib}${dll.ext}@{version}"
+              destdir="@{destrootdir}/bin"/>
+        </then>
+      </if>
+    </sequential>
+  </macrodef>
+
+  <!--
+    Create a symlink on unix and mac only
+    @param lib - library file to install
+    @param srclibdir - location of library files to install
+    @param destlibdir - Where to install library files
+  -->
+  <macrodef name="cpp-symlink">
+    <attribute name="linkdir" default=""/>
+    <attribute name="resourcedir" default="."/>
+    <attribute name="link"/>
+    <attribute name="resource"/>
+    <sequential>
+      <if>
+        <or>
+          <os family="unix"/>
+          <os family="mac"/>
+        </or>
+        <then>
+          <mkdir dir="@{linkdir}"/>
+          <symlink
+              link="@{linkdir}/@{link}"
+              resource="@{resourcedir}/@{resource}"
+              overwrite="true"/>
+        </then>
+      </if>
+    </sequential>
+  </macrodef>
+
+  <!--
+    Delete files from a directory, and possible delete the directory
+    @param files - space seperated list of files to delete
+    @param headerdir - directory where files to delete are
+    @param quiet - verbosity, "true" or "false"
+    @param rmdir - delete the directory after deleting files, "true" or "false"
+    @param custom-delete-elements - anything else you need done additionally
+  -->
+  <macrodef name="cpp-clean-files">
+    <attribute name="files" default="*.*"/>
+    <attribute name="dir" default="."/>
+    <attribute name="quiet" default="true"/>
+    <attribute name="rmdir" default="false"/>
+    <element name="custom-delete-elements" optional="true"/>
+    <sequential>
+      <delete quiet="@{quiet}">
+        <fileset dir="@{dir}" includes="@{files}"/>
+      </delete>
+      <if>
+        <equals arg1="@{rmdir}" arg2="true"/>
+        <then>
+          <delete dir="@{dir}"/>
+        </then>
+      </if>
+      <custom-delete-elements/>
+    </sequential>
+  </macrodef>
+	
+  <!--
+    Delete a library from a root library directory, and possible delete the directory
+    On windows, it will delete both bin/<library>.dll and lib/<library>.lib
+    On Unix, it will delete lib/<library>
+    @param lib - library to delete
+    @param librootdir - directory where the library to delete is located
+    @param quiet - verbosity, "true" or "false"
+  -->
+  <macrodef name="cpp-clean-lib">
+  	<attribute name="lib"/>
+  	<attribute name="librootdir"/>
+    <attribute name="quiet" default="true"/>
+  	<attribute name="version" default="${tuscanyDAS.library.version}"/>
+  	<sequential>
+      <delete quiet="@{quiet}" file="@{librootdir}/lib/${lib.prefix}@{lib}${lib.ext}@{version}"/>
+      <if>
+        <os family="windows"/>
+        <then>
+          <delete quiet="@{quiet}" file="@{librootdir}/bin/${lib.prefix}@{lib}${dll.ext}@{version}"/>
+        </then>
+      </if>
+  	</sequential>
+  </macrodef>
+
+</project>

Added: incubator/tuscany/cpp/das/antscripts/platform.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/platform.properties?rev=573011&view=auto
==============================================================================
--- incubator/tuscany/cpp/das/antscripts/platform.properties (added)
+++ incubator/tuscany/cpp/das/antscripts/platform.properties Wed Sep  5 10:38:14 2007
@@ -0,0 +1,33 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#    
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+platform.lib.ext=
+platform.dll.ext=
+platform.exe.ext=
+platform.object.ext=
+platform.script.ext=
+platform.compiler.name=
+platform.debug.compile=
+platform.external.definitions.file=
+
+platform.tuscanyDAS.root.dir=
+platform.tuscanyDAS.install.dir=
+
+platform.axis2c.home.dir=
+platform.libxml2.lib.dir=
+platform.libxml2.include.dir=
+platform.tuscany.sdo.home.dir=

Added: incubator/tuscany/cpp/das/antscripts/system.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/system.xml?rev=573011&view=auto
==============================================================================
--- incubator/tuscany/cpp/das/antscripts/system.xml (added)
+++ incubator/tuscany/cpp/das/antscripts/system.xml Wed Sep  5 10:38:14 2007
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+     
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<project name="system-import">
+
+  <property file="${basedir}/antscripts/platform.properties"/>
+  <property environment="env"/>
+
+  <!-- These 3 lines pull in antcontrib and cctasks -->
+  <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+  <taskdef resource="cpptasks.tasks"/>
+  <typedef resource="cpptasks.types"/>
+
+  <!--
+     Configure the tuscanyDAS.root.dir
+     Take the override value from platform.properties if set
+  -->
+  <if>
+    <and>
+      <isset property="platform.tuscanyDAS.root.dir"/>
+      <length string="${platform.tuscanyDAS.root.dir}" when="greater" length="0" trim="true"/>
+    </and>
+    <then>
+      <property name="tuscanyDAS.root.dir" location="${platform.tuscanyDAS.root.dir}"/>
+    </then>
+    <else>
+      <property name="tuscanyDAS.root.dir" location="."/>
+    </else>
+  </if>
+
+  <property name="tuscanyDAS.root.src.dir" location="${tuscanyDAS.root.dir}/runtime"/>
+
+  <!--
+     Configure the tuscanyDAS.install.dir
+     Take the override value from platform.properties if set
+     Else take it from the env var TUSCANY_DASCPP
+     Else use a default of ${tuscanyDAS.root.dir}/deploy
+  -->
+  <if>
+    <and>
+      <isset property="platform.tuscanyDAS.install.dir"/>
+      <length string="${platform.tuscanyDAS.install.dir}" when="greater" length="0" trim="true"/>
+    </and>
+    <then>
+      <property name="tuscanyDAS.install.dir" location="${platform.tuscanyDAS.install.dir}"/>
+    </then>
+    <elseif>
+      <isset property="env.TUSCANY_DASCPP"/>
+      <then>
+        <property name="tuscanyDAS.install.dir" location="${env.TUSCANY_DASCPP}"/>
+      </then>
+    </elseif>
+    <else>
+      <property name="tuscanyDAS.install.dir" location="${tuscanyDAS.root.dir}/deploy"/>
+    </else>
+  </if>
+
+  <!--
+     Configure the version for all tuscanyDAS libraries
+     If on windows, set it to empty
+     Else take the override value from platform.properties if set
+     Else default it to "0.0.0"
+  -->
+  <if>
+    <os family="windows"/>
+    <then>
+      <property name="tuscanyDAS.library.version" value=""/>
+    </then>
+    <elseif>
+      <and>
+        <isset property="platform.tuscanyDAS.library.version"/>
+        <length string="${platform.tuscanyDAS.library.version}" when="greater" length="0" trim="true"/>
+      </and>
+      <then>
+        <property name="tuscanyDAS.library.version" value="${platform.tuscanyDAS.library.version}"/>
+      </then>
+    </elseif>
+    <else>
+      <property name="tuscanyDAS.library.version" value=".0.0.0"/>
+    </else>
+  </if>
+
+  <!--
+     Configure ${enable_ws} 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.ws" depends="check.sdo">
+    <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="${platform.axis2c.home.dir}"/>
+      </then>
+      <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="TuscanyDAS ws extension is not enabled" level="warning"/>
+      </else>
+    </if>
+  </target>
+
+  <!--
+     Configure ${enable_sdo} 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.sdo">
+    <if>
+      <and>
+        <isset property="platform.libxml2.lib.dir"/>
+        <isset property="platform.libxml2.include.dir"/>
+	  <isset property="platform.tuscany.sdo.home.dir"/>
+        <length string="${platform.libxml2.lib.dir}" when="greater" length="0" trim="true"/>
+        <length string="${platform.tuscany.sdo.home.dir}" when="greater" length="0" trim="true"/>
+        <length string="${platform.libxml2.include.dir}" when="greater" length="0" trim="true"/>
+      </and>
+      <then>
+        <property name="enable_sdo" value="true"/>
+        <property name="libxml2.lib.dir"     location="${platform.libxml2.lib.dir}"/>
+        <property name="libxml2.include.dir" location="${platform.libxml2.include.dir}"/>
+        <property name="tuscany.sdo.home.dir" location="${platform.tuscany.sdo.home.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"/>
+	    <isset property="env.TUSCANY_SDOCPP"/>
+        </and>
+        <then>
+          <property name="enable_sdo" value="true"/>
+          <property name="libxml2.lib.dir"     location="${env.LIBXML2_LIB}"/>
+          <property name="libxml2.include.dir" location="${env.LIBXML2_INCLUDE}"/>
+	    <property name="tuscany.sdo.home.dir" location="${env.TUSCANY_SDOCPP}"/>
+          <condition property="iconv.home.dir" value="${env.ICONV_HOME}">
+            <os family="windows"/>
+          </condition>
+        </then>
+      </elseif>
+      <else>
+        <fail message="Unable to find sdo installation, must be set by TUSCANY_SDOCPP, 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>
+  </if>
+  <property name="debug.compile" value="false"/>
+
+  <!--
+     Configure the compiler.name
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="compiler.name" value="msvc8">
+        <os family="windows"/>
+      </condition>
+
+      <condition property="compiler.name" value="g++">
+        <or>
+          <os family="unix"/>
+          <os family="mac"/>
+        </or>
+      </condition>
+    </else>
+  </if>
+
+  <!--
+     Configure the lib.ext
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="lib.ext" value=".lib">
+        <os family="windows"/>
+      </condition>
+
+      <condition property="lib.ext" value=".dylib">
+        <os family="mac"/>
+      </condition>
+
+      <condition property="lib.ext" value=".so">
+        <os family="unix"/>
+      </condition>
+    </else>
+  </if>
+
+  <!--
+     Configure the dll.ext, used for windows only
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="dll.ext" value=".dll">
+        <os family="windows"/>
+      </condition>
+
+      <property name="dll.ext" value=""/>
+
+    </else>
+  </if>
+
+  <!--
+     Configure the lib.prefix
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="lib.prefix" value="">
+        <os family="windows"/>
+      </condition>
+
+      <condition property="lib.prefix" value="lib">
+        <or>
+          <os family="unix"/>
+          <os family="mac"/>
+        </or>
+      </condition>
+    </else>
+  </if>
+
+
+  <!--
+     Configure the object.ext
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="object.ext" value=".obj">
+        <os family="windows"/>
+      </condition>
+
+      <condition property="object.ext" value=".o">
+        <or>
+          <os family="unix"/>
+          <os family="mac"/>
+        </or>
+      </condition>
+    </else>
+  </if>
+
+
+  <!--
+     Configure the exe.ext
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="exe.ext" value=".exe">
+        <os family="windows"/>
+      </condition>
+
+      <condition property="exe.ext" value="">
+        <or>
+          <os family="unix"/>
+          <os family="mac"/>
+        </or>
+      </condition>
+    </else>
+  </if>
+
+
+  <!--
+     Configure the script.ext
+     Take the override value from platform.properties if set
+     Else set it based on the OS
+  -->
+  <if>
+    <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>
+    <else>
+      <condition property="script.ext" value=".bat">
+        <os family="windows"/>
+      </condition>
+
+      <condition property="script.ext" value=".sh">
+        <or>
+          <os family="unix"/>
+          <os family="mac"/>
+        </or>
+      </condition>
+    </else>
+  </if>
+
+
+  <condition property="windows" value="true">
+    <os family="windows"/>
+  </condition>
+
+  <condition property="mac" value="true">
+    <os family="mac"/>
+  </condition>
+
+  <!--
+     Base compiler definition
+    -->
+  <compiler id="Tuscany-BaseCompiler" multithreaded="true" exceptions="true" rtti="true">
+    <defineset if="windows" define="WIN32,_CRT_SECURE_NO_DEPRECATE,_CRT_NON_CONFORMING_SWPRINTFS"/>
+    <defineset if="mac" define="IS_DARWIN"/>
+    <includepath path="${tuscanyDAS.root.src.dir}/core/src"/>
+  </compiler>
+
+  <!--
+     Specific compiler definitions
+    -->
+  <compiler id="msvc-Compiler" extends="Tuscany-BaseCompiler" name="msvc"/>
+  <compiler id="msvc8-Compiler" extends="Tuscany-BaseCompiler" name="msvc" exceptions="false">
+    <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"/>
+  </compiler>
+
+  <!--
+     Base linker definition
+    -->
+  <linker id="Tuscany-BaseLinker">
+    <syslibset if="windows" libs="kernel32,user32,ws2_32"/>
+  </linker>
+
+  <!--
+     Specific linker definitions
+    -->
+  <linker id="msvc-Linker" extends="Tuscany-BaseLinker" name="msvc"/>
+  <linker id="msvc8-Linker" extends="Tuscany-BaseLinker" name="msvc"/>
+  <linker id="g++-Linker" extends="Tuscany-BaseLinker" name="g++"/>
+  <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.sdo">
+
+    <!-- Tuscany paths, etc -->
+    <echo message=" "/>
+    <echo message="TuscanyDAS paths"/>
+    <echo message="  tuscanyDAS.root.dir=         ${tuscanyDAS.root.dir}"/>
+    <echo message="  tuscanyDAS.root.src.dir=     ${tuscanyDAs.root.src.dir}"/>
+    <echo message="  tuscanyDAS.install.dir=      ${tuscanyDAS.install.dir}"/>
+    <echo message="  tuscanyDAS.library.version=  '${tuscanyDAS.library.version}'"/>
+
+    <!-- compilers, libs, etc -->
+    <echo message=" "/>
+    <echo message="TuscanyDAS 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_sdo"/>
+      <then>
+        <echo message=" "/>
+        <echo message="sdo location"/>
+        <echo message="  tuscany.sdo.home.dir=          ${tuscany.sdo.home.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: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org