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/12/01 07:31:58 UTC

svn commit: r600052 - in /incubator/tuscany/cpp: das/ das/antscripts/ sdo/ sdo/antscripts/ sdo/samples/ sdo/samples/misc/

Author: adrianocrestani
Date: Fri Nov 30 22:31:57 2007
New Revision: 600052

URL: http://svn.apache.org/viewvc?rev=600052&view=rev
Log:
-adding distribution ant task to sdo
-adding sample ant task to sdo

Added:
    incubator/tuscany/cpp/sdo/antscripts/OpenPGP.jar   (with props)
    incubator/tuscany/cpp/sdo/samples/build.xml
    incubator/tuscany/cpp/sdo/samples/misc/build.xml
Modified:
    incubator/tuscany/cpp/das/antscripts/TuscanyMSVC8DevStudioCCompiler.jar
    incubator/tuscany/cpp/das/build.xml
    incubator/tuscany/cpp/sdo/antscripts/platform.properties
    incubator/tuscany/cpp/sdo/antscripts/system.xml
    incubator/tuscany/cpp/sdo/build.xml

Modified: incubator/tuscany/cpp/das/antscripts/TuscanyMSVC8DevStudioCCompiler.jar
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/TuscanyMSVC8DevStudioCCompiler.jar?rev=600052&r1=600051&r2=600052&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/tuscany/cpp/das/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/build.xml?rev=600052&r1=600051&r2=600052&view=diff
==============================================================================
--- incubator/tuscany/cpp/das/build.xml (original)
+++ incubator/tuscany/cpp/das/build.xml Fri Nov 30 22:31:57 2007
@@ -175,7 +175,7 @@
 	<copy 
 	overwrite="true"
 	todir="${distribution.src.dir}">
-		<fileset dir="." excludes="deploy/ distribution/ **/VSExpress/"/>
+		<fileset dir="." excludes="deploy/ distribution/ **/VSExpress/ antscripts/OpenPGP.jar"/>
 	</copy>
 
 	<antcall target="tools"/>
@@ -191,7 +191,7 @@
 	<copy 
 		overwrite="true"
 		todir="${distribution.dir}/bin/antscripts">
-		<fileset dir="antscripts"/>
+		<fileset dir="antscripts" excludes="OpenPGP.jar"/>
 	</copy>
 
 	 <ant target="distribution" antfile="${samples.dir}/build.xml"/>

Added: incubator/tuscany/cpp/sdo/antscripts/OpenPGP.jar
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/OpenPGP.jar?rev=600052&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/cpp/sdo/antscripts/OpenPGP.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/tuscany/cpp/sdo/antscripts/platform.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/platform.properties?rev=600052&r1=600051&r2=600052&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/antscripts/platform.properties (original)
+++ incubator/tuscany/cpp/sdo/antscripts/platform.properties Fri Nov 30 22:31:57 2007
@@ -26,6 +26,12 @@
 
 platform.tuscanySDO.root.dir=
 platform.tuscanySDO.install.dir=
+platform.tuscanySDO.release.file.name=
+platform.tuscanySDO.distribution.dir=
+
+platform.public.key.path=
+platform.secret.key.path=
+platform.key.id=
 
 platform.sdo.impl.library.name=
 platform.sdo.impl.library.path=

Modified: incubator/tuscany/cpp/sdo/antscripts/system.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/system.xml?rev=600052&r1=600051&r2=600052&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/antscripts/system.xml (original)
+++ incubator/tuscany/cpp/sdo/antscripts/system.xml Fri Nov 30 22:31:57 2007
@@ -26,6 +26,7 @@
   <taskdef resource="net/sf/antcontrib/antlib.xml"/>
   <taskdef resource="cpptasks.tasks"/>
   <typedef resource="cpptasks.types"/>
+  <typedef name="signer" classname="org.apache.commons.openpgp.ant.OpenPgpSignerTask" classpath="${basedir}/antscripts/OpenPGP.jar"/> 
 
   <!--
      Configure the tuscanySDO.root.dir
@@ -95,6 +96,88 @@
       <property name="tuscanySDO.library.version" value=".0.0.0"/>
     </else>
   </if>
+
+<!--
+     Configure tuscanySDO.release.file.name that defines the generated packed file used on releases
+     Take the override value from platform.properties if set
+     Else take it from env var TUSCANY_SDOCPP_RELEASE_NAME
+     If both are not defined, use as default "tuscany_sdo_cpp" name
+  -->
+ <if>
+      <and>
+        <isset property="platform.tuscanySDO.release.file.name"/>
+        <length string="${platform.tuscanySDO.release.file.name}" when="greater" length="0" trim="true"/>
+      </and>
+      <then>
+        <property name="tuscanySDO.release.file.name" value="${platform.tuscanySDO.release.file.name}"/>
+      </then>
+      <elseif>
+        <and>
+          <isset property="env.TUSCANY_SDOCPP_RELEASE_NAME"/>
+	<length string="${env.TUSCANY_SDOCPP_RELEASE_NAME}" when="greater" length="0" trim="true"/>
+        </and>
+        <then>
+           <property name="tuscanySDO.release.file.name" value="${env.TUSCANY_SDOCPP_RELEASE_NAME}"/>
+        </then>
+      </elseif>
+      <else>
+        <property name="tuscanySDO.release.file.name" value="tuscany_sdo_cpp"/>
+      </else>
+    </if>
+
+<!--
+     Configure distribution.dir that defines where the distribution files will be placed
+     Take the override value from platform.properties if set
+     Else assumes ${basedir}/distribution as the distribution folder
+  -->
+ <if>
+      <and>
+        <isset property="platform.tuscanySDO.distribution.dir"/>
+        <length string="${platform.tuscanySDO.distribution.dir}" when="greater" length="0" trim="true"/>
+      </and>
+      <then>
+        <property name="distribution.dir" location="${platform.tuscanySDO.distribution.dir}"/>
+      </then>
+      <else>
+        <property name="distribution.dir" value="${basedir}/distribution"/>
+      </else>
+    </if>
+
+<!--
+     Load key id, public and secret key path from platform.properties files into key.id, public.key.path and secret.key.path variables respectively
+     Also checks if the user defined the password on the command line
+  -->
+  <target name="check.keys">
+    <if>
+      <and>
+        <isset property="platform.public.key.path"/>
+        <isset property="platform.key.id"/>
+        <isset property="platform.secret.key.path"/>
+        <length string="${platform.public.key.path}" when="greater" length="0" trim="true"/>
+        <length string="${platform.key.id}" when="greater" length="0" trim="true"/>
+        <length string="${platform.secret.key.path}" when="greater" length="0" trim="true"/>
+      </and>
+      <then>
+        <property name="public.key.path" location="${platform.public.key.path}"/>
+        <property name="secret.key.path" location="${platform.secret.key.path}"/>
+        <property name="key.id" value="${platform.key.id}"/>
+      </then>
+      <else>
+        <fail message="The public, secret and key id must be defined on platform.properties file"/>
+      </else>
+    </if>
+    <if>
+      <and>
+        <isset property="password"/>
+        <length string="${password}" when="greater" length="0" trim="true"/>      </and>
+      <then>
+        <property name="secret.key.password" value="${password}"/>
+      </then>
+      <else>
+        <fail message='Secret key password was not properly set. Add on the ant command line, for example, -Dpassword="123"'/>
+      </else>
+    </if>
+  </target>
 
   <!--
      Configure ${enable_ws} and ${axis2c.home.dir}, which is needed to compile the ws extension

Modified: incubator/tuscany/cpp/sdo/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/build.xml?rev=600052&r1=600051&r2=600052&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/build.xml (original)
+++ incubator/tuscany/cpp/sdo/build.xml Fri Nov 30 22:31:57 2007
@@ -1,93 +1,225 @@
-<?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="TuscanySdoNative" default="all" basedir=".">
-
-  <!--
-    This is the root level ant build.xml file for TuscanySDO Native
-    Nothing is actually performed here, it just delegates to subdirectory
-    build.xml files. Common scripts used by all ant build files can be
-    found in the ant subdirectory.
-  --> 
-    
-  <import file="antscripts/system.xml"/>
-
-  <property name="runtime.sdo.dir" value="runtime/core"/>
- 	
-  <!--
-    Public targets
-  -->
-
-  <target name="all" description="build and install all TuscanySdoNative source code and documentation">
-    <antcall target="build"/>
-  	<antcall target="install"/>
-  </target>
-
-  <target name="build" description="Build all TuscanySdoNative source code and documentation">
-    <antcall target="build.sdo"/>
-  	<!--antcall target="generate.docs"/-->
-  </target>
-
-  <target name="install" description="Install TuscanySdoNative libraries and headers">
-    <antcall target="install.sdo"/>
-    <!--antcall target="install.docs"/-->
-  </target>
-
-  <target name="clean" description="Clean all TuscanySdoNative compiled source code">
-    <antcall target="clean.sdo"/>
-    <!--antcall target="clean.docs"/-->
-  </target>
-	
-  <target name="test" description="Run SDO tests">
-    <ant target="test" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
-  </target>
-
-
-  <!--
-    Internal targets
-    They can still be called, they're just not described, so wont show up in "ant -p"
-    Using antfile and inheritAll="false" to maintain the subdir build.xml basedir settings
-  -->
-
-  <target name="build.sdo">
-    <ant target="build" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
-  </target>
-
-  <target name="generate.docs">
-    <!--ant target="generate.docs" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/-->
-  </target>
-
-  <target name="install.sdo">
-    <ant target="install" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
-  </target>
-
-  <target name="install.docs">
-    <!--ant target="install.docs" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/-->
-  </target>
-
-  <target name="clean.sdo">
-    <ant target="clean" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
-  </target>
-
-  <target name="clean.docs">
-    <!--ant target="clean.docs" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/-->
-  </target>
-
-</project>
+<?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="TuscanySdoNative" default="all" basedir=".">
+<property name="test.dir"              location="runtime/test"/>
+<property name="samples.dir"           location="samples"/>
+<property name="tools.dir"             location="tools"/>
+
+  <!--
+    This is the root level ant build.xml file for TuscanySDO Native
+    Nothing is actually performed here, it just delegates to subdirectory
+    build.xml files. Common scripts used by all ant build files can be
+    found in the ant subdirectory.
+  --> 
+    
+  <import file="antscripts/system.xml"/>
+
+  <property name="distribution.bin.dir" location="${distribution.dir}/bin"/>
+  <property name="distribution.src.dir"  location="${distribution.dir}/src"/>
+  <property name="pack.dir"              location="${distribution.dir}"/>
+
+  <property name="runtime.sdo.dir" value="runtime/core"/>
+ 	
+  <!--
+    Public targets
+  -->
+
+  <target name="all" description="build and install all TuscanySdoNative source code and documentation">
+    <antcall target="build"/>
+  	<antcall target="install"/>
+  </target>
+
+  <target name="build" description="Build all TuscanySdoNative source code and documentation">
+    <antcall target="build.sdo"/>
+  	<!--antcall target="generate.docs"/-->
+  </target>
+
+  <target name="distribution" description="Generate all TuscanyDASNative distribution structure">
+     <antcall target="distribution.sdo"/>
+  </target>
+
+  <target name="install" description="Install TuscanySdoNative libraries and headers">
+    <antcall target="install.sdo"/>
+    <!--antcall target="install.docs"/-->
+  </target>
+
+  <target name="clean" description="Clean all TuscanySdoNative compiled source code">
+    <antcall target="clean.sdo"/>
+    <!--antcall target="clean.docs"/-->
+  </target>
+
+<target name="samples" description="Build and Install all TuscanyDASNative samples">
+    <antcall target="build.samples"/>
+</target>
+
+<target name="pack.distribution" description="Build all TuscanySDONative source code and documentation" depends="check.keys">
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}bin.zip"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}src.zip"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}bin.tar.gz"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}src.tar.gz"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}bin.zip.md5"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}src.zip.md5"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}bin.tar.gz.md5"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}src.tar.gz.md5"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}bin.zip.asc"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}src.zip.asc"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}bin.tar.gz.asc"/>
+	<delete quiet="true" file="${pack.dir}/${tuscanySDO.release.file.name}src.tar.gz.asc"/>
+	<delete quiet="true" dir="${pack.dir}/${tuscanySDO.release.file.name}bin"/>
+	<delete quiet="true" dir="${pack.dir}/${tuscanySDO.release.file.name}src"/>
+
+	<!--Packs the bin distribution-->	
+	<mkdir dir="${pack.dir}/${tuscanySDO.release.file.name}bin"/>
+	<copy todir="${pack.dir}/${tuscanySDO.release.file.name}bin">
+		<fileset dir="${distribution.bin.dir}" includes="**"/>
+	</copy>
+
+	<zip destfile="${pack.dir}/${tuscanySDO.release.file.name}bin.zip" level="9">
+		<fileset dir="${pack.dir}" includes="${tuscanySDO.release.file.name}bin/"/>
+	</zip>
+
+	<tar destfile="${pack.dir}/${tuscanySDO.release.file.name}bin.tar.gz" compression="gzip" longfile="gnu">
+		<fileset dir="${pack.dir}" includes="${tuscanySDO.release.file.name}bin/"/>
+	</tar>
+
+	<delete quiet="true" dir="${pack.dir}/${tuscanySDO.release.file.name}bin"/>
+
+	<!--Packs the src distribution-->	
+	<mkdir dir="${pack.dir}/${tuscanySDO.release.file.name}src"/>
+	<copy todir="${pack.dir}/${tuscanySDO.release.file.name}src">
+		<fileset dir="${distribution.src.dir}" includes="**"/>
+	</copy>
+
+	<zip destfile="${pack.dir}/${tuscanySDO.release.file.name}src.zip" level="9">
+		<fileset dir="${pack.dir}" includes="${tuscanySDO.release.file.name}src/"/>
+	</zip>
+
+	<tar destfile="${pack.dir}/${tuscanySDO.release.file.name}src.tar.gz" compression="gzip" longfile="gnu">
+		<fileset dir="${pack.dir}" includes="${tuscanySDO.release.file.name}src/"/>
+	</tar>
+
+	<delete quiet="true" dir="${pack.dir}/${tuscanySDO.release.file.name}src"/>
+
+	<!--Generate the checksum files-->
+	<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanySDO.release.file.name}bin.zip" fileext=".md5"/>
+	<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanySDO.release.file.name}src.zip" fileext=".md5"/>
+	<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanySDO.release.file.name}bin.tar.gz" fileext=".md5"/>
+	<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanySDO.release.file.name}src.tar.gz" fileext=".md5"/>
+	
+	<signer asciiarmor="true" artefact="${pack.dir}/${tuscanySDO.release.file.name}bin.zip" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+	<signer asciiarmor="true" artefact="${pack.dir}/${tuscanySDO.release.file.name}src.zip" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+	<signer asciiarmor="true" artefact="${pack.dir}/${tuscanySDO.release.file.name}bin.tar.gz" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+	<signer asciiarmor="true" artefact="${pack.dir}/${tuscanySDO.release.file.name}src.tar.gz" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+
+
+  </target>
+	
+  <target name="test" description="Run SDO tests">
+    <ant target="test" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+
+  <!--
+    Internal targets
+    They can still be called, they're just not described, so wont show up in "ant -p"
+    Using antfile and inheritAll="false" to maintain the subdir build.xml basedir settings
+  -->
+
+  <target name="build.sdo">
+    <ant target="build" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+  <target name="generate.docs">
+    <!--ant target="generate.docs" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/-->
+  </target>
+
+  <target name="install.sdo">
+    <ant target="install" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+  <target name="install.docs">
+    <!--ant target="install.docs" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/-->
+  </target>
+
+  <target name="clean.sdo">
+    <ant target="clean" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+  <target name="clean.docs">
+    <!--ant target="clean.docs" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/-->
+  </target>
+
+<target name="distribution.sdo">
+	<delete dir="${distribution.dir}" quiet="true"/>
+	<antcall target="clean"/>
+
+	<!-- Create source distribution -->
+	<copy 
+	overwrite="true"
+	todir="${distribution.src.dir}">
+		<fileset dir="." excludes="samples/ deploy/ distribution/ **/VSExpress/ antscripts/OpenPGP.jar"/>
+	</copy>
+
+	<!--<antcall target="tools"/>-->
+	<antcall target="all"/>
+	<antcall target="samples"/>
+
+
+
+	<!-- Create bin distribution -->
+	<copy 
+	overwrite="true"
+	todir="${distribution.bin.dir}">
+		<fileset dir="${tuscanySDO.install.dir}"/>
+	</copy>
+	<copy 
+		overwrite="true"
+		todir="${distribution.dir}/bin/antscripts">
+		<fileset dir="antscripts" excludes="OpenPGP.jar"/>
+	</copy>
+
+	 <ant target="distribution" antfile="${samples.dir}/build.xml"/>
+
+       <copy 
+	overwrite="true"
+	todir="${distribution.src.dir}">
+		<fileset dir="${distribution.bin.dir}/" includes="samples/" excludes="**/bin/"/>
+	</copy>
+
+	  <delete includeemptydirs="true">
+	    <fileset dir="${distribution.dir}" includes="**/VSExpress"/>
+	  </delete>
+
+  </target>
+
+ <target name="build.samples">
+    <ant target="all" antfile="${samples.dir}/build.xml" inheritAll="false"/>
+  </target>
+ 
+  <target name="clean.samples">
+    <ant target="clean" antfile="${samples.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+<target name="clean.distribution">
+    <delete dir="${distribution.dir}/" quiet="true"/>
+  </target>
+
+</project>

Added: incubator/tuscany/cpp/sdo/samples/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/samples/build.xml?rev=600052&view=auto
==============================================================================
--- incubator/tuscany/cpp/sdo/samples/build.xml (added)
+++ incubator/tuscany/cpp/sdo/samples/build.xml Fri Nov 30 22:31:57 2007
@@ -0,0 +1,68 @@
+<?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="TuscanySDONative_samples" default="all" basedir="..">
+
+  <!--
+    This is the root level ant build.xml file for TuscanySDO Native samples
+    Nothing is actually performed here, it just delegates to subdirectory
+    build.xml files.
+  --> 
+    
+  <import file="${basedir}/antscripts/system.xml"/>
+  <import file="${basedir}/antscripts/compile-targets.xml"/>
+
+
+  <!--
+    Notice that the basedir for this project is set to the TuscanySDO root dir
+    This makes path setting in system.xml much simpler, but we'll just have to
+    set a property here to this directory.
+  -->
+  <property name="this.dir" location="${basedir}/samples"/>
+
+  <property name="misc.dir"        location="${this.dir}/misc"/>
+
+  <!--
+    Public targets
+  -->
+
+  <target name="all" description="Build and install all TuscanySDONative samples">
+    <antcall target="misc.sample"/>
+  </target>
+
+       <!--
+         Using antfile and inheritAll="false" to maintain the subdir build.xml basedir settings
+       -->
+
+  <target name="misc.sample" description="Build and install the misc sample">
+    <ant target="all" antfile="${misc.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+    <!-- clean -->
+
+  <target name="clean" description="Clean all TuscanySDONative samples">
+    <ant target="clean" antfile="${misc.dir}/build.xml" inheritAll="false"/>
+  </target>
+
+  <target name="distribution" description="Generate the necessary  distribution files of all samples and copy it to the distribution dir">
+    <ant target="distribution" antfile="${misc.dir}/build.xml"/>
+  </target>
+
+</project>

Added: incubator/tuscany/cpp/sdo/samples/misc/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/samples/misc/build.xml?rev=600052&view=auto
==============================================================================
--- incubator/tuscany/cpp/sdo/samples/misc/build.xml (added)
+++ incubator/tuscany/cpp/sdo/samples/misc/build.xml Fri Nov 30 22:31:57 2007
@@ -0,0 +1,133 @@
+<?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="TuscanySDONative_Sample_misc" default="all" basedir="../..">
+
+  <import file="${basedir}/antscripts/system.xml"/>
+  <import file="${basedir}/antscripts/compile-targets.xml"/>
+
+  <!--
+    Notice that the basedir for this project is set to the TuscanySDO root dir
+    This makes path setting in system.xml much simpler, but we'll just have to
+    set a property here to this directory.
+  -->
+
+  <target name="init">
+    <tstamp/>
+    <property name="this.dir" location="${basedir}/samples/misc"/>
+    <property name="sample.misc.dir"            location="${this.dir}/build"/>
+    <property name="sample.misc.src.dir"            location="${this.dir}"/>
+    <property name="sample.misc.build.dir"      location="${sample.misc.dir}/build"/>
+    <property name="misc.install.dir"
+              location="${tuscanySDO.install.dir}/samples/misc/bin"/>
+
+
+  </target>
+
+  <!--
+    Public targets
+  -->
+  <target name="all"
+          description="build and install the TuscanySDONative misc sample">
+    <antcall target="build"/>
+    <antcall target="install"/>
+  </target>
+
+  <target name="build"
+          description="build the TuscanySDONative misc sample">
+    <antcall target="build.sample.misc"/>
+  </target>
+
+  <target name="install"
+          description="Install the TuscanySDONative misc sample">
+    <antcall target="install.sample.misc"/>
+  </target>
+
+  <target name="clean"
+          description="Clean the TuscanySDONative misc sample">
+    <antcall target="clean.sample.misc"/>
+    
+  </target>
+
+  <target name="distribution" description="Generate the necessary  distribution files of misc sample and copy it to the distribution dir">
+    <antcall target="sample.misc.distribution"/>
+  </target>
+
+  <!--
+    Internal targets
+    They can still be called, they're just not described, so wont show up in "ant -p"
+  -->
+
+    <!-- build -->
+
+  <target name="build.sample.misc" depends="init,check.ws">
+    <mkdir dir="${sample.misc.build.dir}"/>
+
+    <copy todir="${sample.misc.build.dir}">
+      <fileset dir="${sample.misc.dir}" includes="*.h"/>
+      <fileset dir="${sample.misc.dir}" includes="*.cpp"/>
+    </copy>
+    <!-- build the library -->
+    <cpp-build
+        srcdir="${sample.misc.src.dir}"
+        infiles="*.cpp"
+        outdir="${sample.misc.build.dir}/.libs"
+	outtype="executable"
+        outfile="misc">
+      <custom-build-elements>
+	<includepath path="${tuscanySDO.install.dir}/include"/>
+        <includepath path="${libxml2.include.dir}"/>
+      	<includepath if="windows" path="${iconv.home.dir}/include"/>
+        <libset if="windows" dir="${libxml2.lib.dir}" libs="libxml2"/>
+        <libset unless="windows" dir="${libxml2.lib.dir}" libs="xml2"/>
+
+<libset dir="${tuscanySDO.install.dir}/lib" libs="tuscany_sdo"/>
+      </custom-build-elements>
+    </cpp-build>
+  </target>
+
+  
+    <!-- install -->
+
+  <target name="install.sample.misc" depends="init">
+    <cpp-install-files
+        files="*.exe*"
+        srcdir="${sample.misc.dir}/build/.libs/"
+        destdir="${misc.install.dir}"/>
+    <copy todir="${misc.install.dir}" overwrite="true">
+	  <fileset dir="${this.dir}" includes="*.xsd, *.xml" excludes="build.xml"/>
+    </copy>
+
+  </target> 
+
+    <!-- clean -->
+
+  <target name="clean.sample.misc" depends="init">
+    <delete dir="${sample.misc.dir}" quiet="true"/>
+  </target>
+
+ <target name="sample.misc.distribution">
+    <copy todir="${distribution.bin.dir}/samples/misc" overwrite="true">
+	  <fileset dir="${this.dir}/misc" excludes="build/ rsc/ VSExpress/"/>
+    </copy>
+   
+
+  </target>
+
+</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org