forked from OpenDA-Association/OpenDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_incl_dotnet_bridge.xml
219 lines (199 loc) · 8.7 KB
/
build_incl_dotnet_bridge.xml
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
<project name="openDA_incl_dotnet_bridge" default="help" basedir=".">
<!--
================================================================================
Ant build file for openda java code
install ant and type
"ant help"
for a list of options
================================================================================
-->
<target name="help">
<echo>
ant help --> print this help
ant build --> compile, make jar and copy resources
ant clean --> remove output
ant doc --> collect documentation
ant zip --> create a zipfile with binaries, documentation
and xmlschemas
ant zip-tests --> zip public test cases
</echo>
</target>
<property file="project.properties"/>
<macrodef name="testing">
<attribute name="v" default="NOT SET"/>
<sequential>
<echo>v is @{v}</echo>
</sequential>
</macrodef>
<target name="debug">
<echo>
module=${module}
srcdir=${srcdir}
jarname=${jarname}
bindir=${bindir}
</echo>
<testing v="This is v" />
<testing v="This is w" />
</target>
<!--
===========================================================================
Compilation
===========================================================================
-->
<target name="build" depends="init" >
<buildmodule module="core" />
<buildmodule module="observers" />
<buildmodule module="models" />
<buildmodule module="algorithms" />
<buildmodule module="application" />
<buildmodule module="dotnet_bridge" />
<chmod dir="${projectlib}" perm="ugo+rx"
includes="**/*.sh"/>
</target>
<target name="cleanmodules" depends="clean" >
<ant antfile="build.xml" dir="core" target="clean" />
<ant antfile="build.xml" dir="observers" target="clean" />
<ant antfile="build.xml" dir="models" target="clean" />
<ant antfile="build.xml" dir="algorithms" target="clean" />
<ant antfile="build.xml" dir="application" target="clean" />
<ant antfile="build.xml" dir="dotnet_bridge" target="clean" />
</target>
<target name="doc" depends="init">
<docmodule module="core" />
<docmodule module="observers" />
<docmodule module="models" />
<docmodule module="algorithms" />
<copy todir="${projectdoc}/javadoc" >
<fileset dir="core/doc/javadoc_menu" />
</copy>
</target>
<macrodef name="docmodule">
<attribute name="module" default="NOT SET"/>
<sequential>
<echo>build module @{module}</echo>
<ant antfile="build.xml" dir="@{module}" target="javadoc" inheritAll="false" />
<mkdir dir="${projectdoc}/javadoc" />
<copy todir="${projectdoc}/javadoc" >
<fileset dir="@{module}/javadoc" />
</copy>
<copy todir="${projectdoc}" >
<fileset dir="@{module}/doc" />
</copy>
<copy todir="${xmlschemadir}" >
<fileset dir="@{module}/xmlSchemas" includes="**/*.xsd" />
</copy>
</sequential>
</macrodef>
<macrodef name="buildmodule">
<attribute name="module" default="NOT SET"/>
<sequential>
<echo>doc for module @{module}</echo>
<ant antfile="build.xml" dir="@{module}" target="build" inheritAll="false" />
<copy todir="${projectlib}" >
<fileset dir="@{module}/bin" />
</copy>
</sequential>
</macrodef>
<!--
===========================================================================
Tools: init, clean, etc.
===========================================================================
-->
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${projectbin}"/>
<mkdir dir="${projectdoc}"/>
<mkdir dir="${xmlschemadir}"/>
</target>
<target name="clean">
<delete dir="${projectbin}"/>
<delete dir="${projectdoc}"/>
<delete dir="${xmlschemadir}"/>
<delete dir="${testrundir}"/>
<cleanmodule module="core" />
<cleanmodule module="observers" />
<cleanmodule module="models" />
<cleanmodule module="algorithms" />
<cleanmodule module="dotnet_bridge" />
</target>
<macrodef name="cleanmodule">
<attribute name="module" default="NOT SET"/>
<sequential>
<echo>clean for module @{module}</echo>
<ant antfile="build.xml" dir="@{module}" target="clean" inheritAll="false" />
</sequential>
</macrodef>
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml">
<classpath>
<fileset dir="core/java/resources/svnant-1.3.0/lib" includes="**/*.jar" />
</classpath>
</taskdef>
<target name="svn-revision" >
<svn>
<status path="." revisionProperty="svn.revision" />
</svn>
<echo>Subversion Revision: ${svn.revision}</echo>
</target>
<target name="zip" depends="svn-revision,build,doc" >
<zip destfile="${projectname}_${version}_r${svn.revision}_src.zip">
<zipfileset dir="doc" prefix="openda_${version}/doc"/>
<zipfileset dir="tests" prefix="openda_${version}/examples" excludes="*.svn" />
<zipfileset dir="xmlSchemas" prefix="openda_${version}/xmlSchemas" excludes="*.svn" />
<zipfileset dir="core" prefix="openda_${version}/core" excludes="*.svn" />
<zipfileset dir="models" prefix="openda_${version}/models" excludes="*.svn" />
<zipfileset dir="observers" prefix="openda_${version}/observers" excludes="*.svn" />
<zipfileset dir="algorithms" prefix="openda_${version}/algorithms" excludes="*.svn" />
<zipfileset dir="application" prefix="openda_${version}/application" excludes="*.svn" />
<zipfileset dir="dotnet_bridge" prefix="openda_${version}/dotnet_bridge" excludes="*.svn" />
<zipfileset dir="module_template" prefix="openda_${version}/module_template" excludes="*.svn" />
<zipfileset dir="model_example_fortran" prefix="openda_${version}/model_example_fortran" excludes="*.svn" />
<zipfileset dir="model_example_blackbox" prefix="openda_${version}/model_example_blackbox" excludes="*.svn" />
<zipfileset dir="." includes="build.xml" prefix="openda_${version}" />
<zipfileset dir="." includes="project.properties" prefix="openda_${version}" />
<zipfileset dir="." includes="unit_test_info.txt" prefix="openda_${version}" />
<zipfileset dir="." includes="README.txt" fullpath="openda_${version}/README_r${svn.revision}.txt"/>
<zipfileset dir="." includes="license.txt" fullpath="openda_${version}/license.txt"/>
<zipfileset dir="." includes="select_this_version.sh" prefix="openda_${version}" />
</zip>
<zip destfile="${projectname}_${version}_r${svn.revision}_bin.zip">
<zipfileset dir="bin" prefix="openda_${version}/bin"/>
<zipfileset dir="doc" prefix="openda_${version}/doc"/>
<zipfileset dir="tests" prefix="openda_${version}/examples" excludes="*.svn" />
<zipfileset dir="xmlSchemas" prefix="openda_${version}/xmlSchemas" excludes="*.svn" />
<zipfileset dir="." includes="README.txt" fullpath="openda_${version}/README_r${svn.revision}.txt"/>
<zipfileset dir="." includes="license.txt" fullpath="openda_${version}/license.txt"/>
<zipfileset dir="." includes="select_this_version.sh" prefix="openda_${version}" />
</zip>
<zip destfile="${projectname}_${version}_r${svn.revision}_doc.zip">
<zipfileset dir="doc" prefix="openda_${version}/doc"/>
<zipfileset dir="." includes="README.txt" fullpath="openda_${version}/README_r${svn.revision}.txt"/>
<zipfileset dir="." includes="license.txt" fullpath="openda_${version}/license.txt"/>
</zip>
<zip destfile="${projectname}_${version}_r${svn.revision}_schemas.zip">
<zipfileset dir="xmlSchemas" prefix="openda_${version}" excludes="*.svn" />
<zipfileset dir="." includes="README.txt" fullpath="openda_${version}/README_r${svn.revision}.txt"/>
<zipfileset dir="." includes="license.txt" fullpath="openda_${version}/license.txt"/>
</zip>
</target>
<macrodef name="ziptest">
<attribute name="testname" default="NOT SET"/>
<sequential>
<echo>zip example @{testname}</echo>
<zip destfile="${projectname}_${version}_r${svn.revision}_examples_@{testname}.zip">
<zipfileset dir="tests/@{testname}" prefix="openda_${version}/examples/@{testname}"/>
<zipfileset dir="." includes="README.txt" fullpath="openda_${version}/README_r${svn.revision}.txt"/>
</zip>
</sequential>
</macrodef>
<target name="zip-tests"> <!-- depends="svn-revision"> -->
<ziptest testname="simple_lorenz" />
<ziptest testname="simple_lorenz96" />
<ziptest testname="simple_lorenz_transformed_observations" />
<ziptest testname="simple_oscillator" />
<ziptest testname="simple_two_oscillators" />
<ziptest testname="native_oscillator" />
<ziptest testname="native_parallel" />
<ziptest testname="swan_l21triad" />
<ziptest testname="swan_l21triad_two_twin" />
</target>
</project>