summaryrefslogtreecommitdiffstats
path: root/cpp/das/build.xml
blob: 81e4a78866eca43c3e5a4feff5896e9fb3e1616d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<?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="TuscanyDASNative" 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 TuscanyDAS 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.das.dir" value="runtime/core"/>
 	
  <!--
    Public targets
  -->

  <target name="all" description="build and install all TuscanyDASNative source code and documentation">
      <antcall target="build"/>
      <antcall target="install"/>
  </target>

  <target name="build" description="Build all TuscanyDASNative source code and documentation">
     <antcall target="build.das"/>
  </target>

  <target name="pack.distribution" description="Build all TuscanyDASNative source code and documentation" depends="check.keys">
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip.md5"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip.md5"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz.md5"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz.md5"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip.asc"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip.asc"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz.asc"/>
	<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz.asc"/>
	<delete quiet="true" dir="${pack.dir}/${tuscanyDAS.release.file.name}bin"/>
	<delete quiet="true" dir="${pack.dir}/${tuscanyDAS.release.file.name}src"/>

	<!--Packs the bin distribution-->	
	<mkdir dir="${pack.dir}/${tuscanyDAS.release.file.name}bin"/>
	<copy todir="${pack.dir}/${tuscanyDAS.release.file.name}bin">
		<fileset dir="${distribution.bin.dir}" includes="**"/>
	</copy>

	<if>
		<os family="windows"/>
    		<then>
			<zip destfile="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip" level="9">
				<fileset dir="${pack.dir}" includes="${tuscanyDAS.release.file.name}bin/"/>
			</zip>
		</then>
		<else>

	<tar destfile="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz" compression="gzip" longfile="gnu">
		<fileset dir="${pack.dir}" includes="${tuscanyDAS.release.file.name}bin/"/>
	</tar>

		</else>
	</if>

	<delete quiet="true" dir="${pack.dir}/${tuscanyDAS.release.file.name}bin"/>

	<!--Packs the src distribution-->	
	<mkdir dir="${pack.dir}/${tuscanyDAS.release.file.name}src"/>
	<copy todir="${pack.dir}/${tuscanyDAS.release.file.name}src">
		<fileset dir="${distribution.src.dir}" includes="**"/>
	</copy>

	<if>
		<os family="windows"/>
    		<then>
			<zip destfile="${pack.dir}/${tuscanyDAS.release.file.name}src.zip" level="9">
				<fileset dir="${pack.dir}" includes="${tuscanyDAS.release.file.name}src/"/>
			</zip>

			<!--Generate the checksum files-->
			<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip" fileext=".md5"/>
			<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip" fileext=".md5"/>

			<signer asciiarmor="true" artefact="${pack.dir}/${tuscanyDAS.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}/${tuscanyDAS.release.file.name}src.zip" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>

		</then>
		<else>

			<tar destfile="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz" compression="gzip" longfile="gnu">
				<fileset dir="${pack.dir}" includes="${tuscanyDAS.release.file.name}src/"/>
			</tar>

			<!--Generate the checksum files-->
			<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz" fileext=".md5"/>
			<checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz" fileext=".md5"/>
	
			<signer asciiarmor="true" artefact="${pack.dir}/${tuscanyDAS.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}/${tuscanyDAS.release.file.name}src.tar.gz" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>

		</else>
	</if>

	<delete quiet="true" dir="${pack.dir}/${tuscanyDAS.release.file.name}src"/>

  </target>

  <target name="test" description="Run DAS tests">
    <ant target="all" antfile="${test.dir}/build.xml" inheritAll="false"/>
  </target>

  <target name="distribution" description="Generate all TuscanyDASNative distribution structure">
     <antcall target="distribution.das"/>
  </target>

  <target name="install" description="Install TuscanyDASNative libraries and headers">
    <antcall target="install.das"/>
    <!--antcall target="install.docs"/-->
  </target>

  <target name="clean" description="Clean all TuscanyDASNative compiled source code">
    <antcall target="clean.das"/>
    <antcall target="clean.test"/>
    <antcall target="clean.samples"/>
    <delete dir="deploy" quiet="true"/>
  </target>

  <target name="tools" description="Build and Install all TuscanyDASNative tools">
    <antcall target="build.tools"/>
  </target>

<target name="samples" description="Build and Install all TuscanyDASNative samples">
    <antcall target="build.samples"/>
</target>

<target name="tests" description="Build and run all TuscanyDASNative tests">
    <ant target="all" antfile="${test.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.tools">
    <ant target="all" antfile="${tools.dir}/build.xml" inheritAll="false"/>
  </target>

  <target name="build.das">
    <ant target="build" antfile="${runtime.das.dir}/build.xml" inheritAll="false"/>
  </target>

  <target name="generate.docs">
    <!--ant target="generate.docs" antfile="${runtime.das.dir}/build.xml" inheritAll="false"/-->
  </target>

  <target name="install.das">
    <ant target="install" antfile="${runtime.das.dir}/build.xml" inheritAll="false"/>
  </target>

 <target name="distribution.das">
	<delete dir="${distribution.dir}" quiet="true"/>
	<antcall target="clean"/>

	<!-- Create source distribution -->
	<copy 
	overwrite="true"
	todir="${distribution.src.dir}">
		<fileset dir="." excludes="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="${tuscanyDAS.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"/>

	  <delete includeemptydirs="true">
	    <fileset dir="${distribution.dir}" includes="**/VSExpress"/>
	  </delete>

  </target>
  
  <target name="clean.das">
    <ant target="clean" antfile="${runtime.das.dir}/build.xml" inheritAll="false"/>
  </target>

 <target name="clean.tools">
    <ant target="clean" antfile="${tools.dir}/build.xml" inheritAll="false"/>
  </target>

<target name="clean.test">
    <ant target="clean" antfile="${test.dir}/build.xml" inheritAll="false"/>
  </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>