File: build.xml

package info (click to toggle)
mathpiper 0.81f%2Bsvn4469%2Bdfsg3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 36,552 kB
  • ctags: 8,348
  • sloc: java: 57,479; lisp: 13,721; objc: 1,300; xml: 988; makefile: 114; awk: 95; sh: 38
file content (359 lines) | stat: -rw-r--r-- 11,210 bytes parent folder | download | duplicates (3)
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<?xml version="1.0" encoding="UTF-8" ?>

<!-- Copyright (C) 2008 Ted Kosan (license information is at the end of this document.) -->

<project id="mathpiper" name="mathpiper" default="dist" basedir="." >
	<description>
		Build file for MathPiper.
	</description>
	
	
        <!--
	<property name="compile.source" value="1.5" />
	<property name="compile.target" value="1.5" />
	<property name="src.dir" value="${basedir}/src" />
	<property name="build.dir" value="${basedir}/build" />
	<property name="mathpiper.dir" value="${basedir}" />
	<path id="build_classpath">
	</path> -->

	
	<!-- <property name="version" value=".58" /> -->
	<property name="build.classes.dir" value="${build.dir}/classes" />
	
	
	<target id="noop" name="noop" description="Do nothing." />
	
	<target id="clean" name="clean" 
		description="Deletes the MathPiper build directory" >
		
		<echo message="Removing the build directory...." />
		<delete dir="${build.dir}" />
	</target>
	
	<target name="init" depends="clean">
	    <condition property="IsUnix" value="true">
		    <os family="unix" />
	    </condition>

		<tstamp>
			<format property="build.time" pattern="MM/dd/yyyy hh:mm aa" />
		</tstamp>
		<mkdir dir="${build.dir}" />
		<mkdir dir="${build.classes.dir}" />
	</target>
	
	<target name="compile" depends="init"
		description="Compiles the application" >
		<!--<echo message="${compile.source}." />
		<echo message="${src.dir}." />
		<echo message="${build.classes.dir}." />-->
	
		<javac 
			source="${compile.source}"
			target="${compile.target}" 
			srcdir="${src.dir}"
			destdir="${build.classes.dir}"
			debug="off"
			deprecation="on"
			optimize="off"
                        includeantruntime="false">
			<classpath refid="build_classpath" />
			<include name="**/*.java" />
		</javac>
		
		<copy todir="${build.classes.dir}/org/mathpiper/ui/gui/hoteqn">
			<fileset dir="${src.dir}/org/mathpiper/ui/gui/hoteqn" >
				<include name="*.gif" />
			</fileset>
		</copy>
		
		<copy todir="${build.classes.dir}/org/mathpiper/ui/gui/jmathtex/xmlconfigurationparsers">
			<fileset dir="${src.dir}/org/mathpiper/ui/gui/jmathtex/xmlconfigurationparsers" >
				<include name="*.xml" />
				<include name="*.ttf" />
			</fileset>
		</copy>
		
		<copy todir="${build.classes.dir}/org/scilab">
			<fileset dir="${src.dir}/org/scilab" >
				<include name="**/*.xml" />
				<include name="**/*.ttf" />
			</fileset>
		</copy>
		
		
		<copy todir="${build.classes.dir}/org/mathpiper/scripts4">
			<fileset dir="${src.dir}/org/mathpiper/scripts4" >
				<include name="**/*.mpw" />
			</fileset>
		</copy>
		
	</target>
	
      
       
       
      
   	<target name="buildscripts4" >
		<mkdir dir="${build.classes.dir}/org/mathpiper/ui/gui/help/data" />
	        <mkdir dir="${build.classes.dir}/org/mathpiper/assembledscripts" />
	        <mkdir dir="${build.classes.dir}/org/mathpiper/assembledscripts/initialization.rep" />
		<taskdef name="buildscripts" classname="org.mathpiper.test.Build" classpath="${build.classes.dir}"  />

		<buildscripts sourceScriptsDirectory="${src.dir}/org/mathpiper/scripts4/"
                 outputScriptsDirectory="${build.classes.dir}/org/mathpiper/assembledscripts/"
		 outputDirectory="${build.classes.dir}/"
		 baseDirectory="${basedir}/"/>
        </target>
      
      


    
    
	<target id="dist" name="dist" depends="compile,buildscripts4" >
	
		<!--<copy todir="${build.classes.dir}/org/mathpiper/scripts">
			<fileset dir="${mathpiper.dir}/src/org/mathpiper/scripts" >
				<include name="*.rep/**/*" />
			</fileset>
		</copy>-->
		
		<mkdir dir="${build.classes.dir}/tests" />
		<mkdir dir="${build.classes.dir}/tests/scripts4" />
		<copy todir="${build.classes.dir}/tests/scripts4">
			<fileset dir="${mathpiper.dir}/tests/scripts4" >
				<include name="**/*" />
			</fileset>
		</copy>

		
		<copy file="${mathpiper.dir}/tests/win_test.bat" todir="${build.classes.dir}"/>
		<copy file="${mathpiper.dir}/tests/unix_test.sh" todir="${build.classes.dir}"/>

		<antcall target="chmod-unix-test-script"/>
		
		<!--<copy file="${mathpiper.dir}/mathpiper.properties" todir="${build.classes.dir}">
			<filterset>
	               
		       	   <filter token="VERSION" value="${version}" />
	               
			 </filterset>
		</copy>-->
	
		<mkdir dir="${build.dir}/dist" />
		
		<jar jarfile="${build.dir}/dist/mathpiper.jar"
			basedir="${build.classes.dir}" update="true"
			manifest="${mathpiper.dir}/resources/MANIFEST.MF">
			<!--<manifest> 
				<section name="mathpiper" >
					<attribute name="Build-Date" value="${build.time}"/>
				</section>
			</manifest>-->
			<include name="**/*" />
			<exclude name="**/*.bat,**/*.sh" />
		</jar> 
	</target>
	
	<target  id="chmod-unix-test-script" name="chmod-unix-test-script" if="IsUnix">
	    <echo message="Making unix test script executable."/>
	    <exec executable="chmod">
		    <arg value="+x" />
		    <arg value="${build.classes.dir}/unix_test.sh" />
	    </exec>
	</target>
	
	<target id="geogebra_dist" name="geogebra_dist" depends="buildscripts4" >
	
	<!--  
	cvs -z3 -d:ext:tkosan@geogebra.cvs.sourceforge.net:/cvsroot/geogebra co -P geogebra
	export CVSROOT=:ext:tkosan@geogebra.cvs.sourceforge.net:/cvsroot/geogebra
	cvs commit -m "The code is now compatible with Java 1.4."
	cvs import -m "This is a stripped-down version of MathPiper.  An example of how to use MathPiper can be found in the org/mathpiper/HowToUse.java file." geogebra/org/mathpiper/geogebrascripts MATHPIPER V0_63
	
	Edit BuiltinFunctionInitialize to remove functions at the bottom of the file.
	Edit Interpreters to remove references to AsynchronousInterpreter.
	
	-->
		
		<delete dir="${build.dir}/geogebra_dist" />
	
		<!--<copy todir="${build.classes.dir}">
			<fileset dir="${mathpiper.dir}/scripts" >
				<include name="**/*" />
			</fileset>
		</copy>-->
		

		

		<mkdir dir="${build.dir}/geogebra_dist" />
		<mkdir dir="${build.dir}/geogebra_dist/src" />
		<mkdir dir="${build.dir}/geogebra_dist/src/org/mathpiper/geogebrascripts" />
		<mkdir dir="${build.dir}/geogebra_dist/src/org/mathpiper/builtin/functions/optional" />
		<mkdir dir="${build.dir}/geogebra_dist/src/org/mathpiper/builtin/functions/plugins" />
		

		

		
		
		<copy todir="${build.dir}/geogebra_dist/src">
			<fileset dir="${mathpiper.dir}/src/" >
				<include name="org/mathpiper/Version.java" />
				<include name="org/mathpiper/HowToUse.java" />
				<include name="org/mathpiper/builtin/" />
				<exclude name="org/mathpiper/builtin/functions/optional/" />
				<exclude name="org/mathpiper/builtin/functions/plugins/" />
				<include name="org/mathpiper/builtin/library/jas/" />
				<exclude name="org/mathpiper/builtin/library/cern/" />
				<exclude name="org/mathpiper/builtin/library/jscistats/" />
				<exclude name="org/mathpiper/builtin/library/statdistlib/" />
				<include name="edu/" />
				<include name="org/apache/" />
				<include name="org/mathpiper/exceptions/" />
				<include name="org/mathpiper/interpreters/" />
				<include name="org/mathpiper/io/" />
				<include name="org/mathpiper/lisp/" />
				<include name="org/mathpiper/parametermatchers/" />
				<include name="org/mathpiper/printers/" />
				<include name="org/mathpiper/ui/text/consoles/" />
				<include name="org/mathpiper/ui/gui/consoles/Console.java" />

			</fileset>
		</copy>



		
		<copy todir="${build.dir}/geogebra_dist/src/org/mathpiper/geogebrascripts">
			<fileset dir="${build.dir}/classes/org/mathpiper/assembledscripts" includes="*.rep/**/*" />
			<filterchain>
				<filterreader classname="org.apache.tools.ant.filters.StripJavaComments">
				<!--<param name="foo" value="bar"/>-->
				</filterreader>
				<!--<scriptfilter language="beanshell">
				if (self.getToken().indexOf("bad") != -1) {
				self.setToken(null);
				}
				</scriptfilter>-->
			</filterchain>
		</copy>		
		


		  <replaceregexp file="${build.dir}/geogebra_dist/src/org/mathpiper/interpreters/SynchronousInterpreter.java"
                         match="assembledscripts"
                         replace="geogebrascripts"/>

		
	<!--	<mkdir dir="${build.dir}/geogebra_dist/classes" />
		
		<copy todir="${build.dir}/geogebra_dist/classes">
			<fileset dir="${build.dir}/geogebra_dist/scripts" >
				<include name="**/*" />
			</fileset>
		</copy>
		
		
		<javac 
			source="1.4"
			target="1.4" 
			srcdir="${build.dir}/geogebra_dist"
			destdir="${build.dir}/geogebra_dist/classes"
			debug="off"
			deprecation="on"
			optimize="off">
			<include name="**/*.java" />
		</javac>
		
		<jar jarfile="${build.dir}/geogebra_dist/mathpiper.jar"
			basedir="${build.dir}/geogebra_dist/classes" update="true" >
			<include name="**/*" />

		</jar> -->

	</target>
	
	
	
	
	
	<target id="geogebra_compile" name="geogebra_compile" depends="geogebra_dist" >
	
	      <delete dir="${build.dir}/geogebra_dist/build" />
	      
	      
	      <mkdir dir="${build.dir}/geogebra_dist/build" />
	      
	      
	      <mkdir dir="${build.dir}/geogebra_dist/build/org/mathpiper/test" />
	      <copy file="${src.dir}/org/mathpiper/test/RunTestSuite.java" todir="${build.dir}/geogebra_dist/src/org/mathpiper/test"/>

	     
	      
			<javac 
			source="1.5"
			target="1.5" 
			srcdir="${build.dir}/geogebra_dist/src"
			destdir="${build.dir}/geogebra_dist/build"
			debug="off"
			deprecation="on"
			optimize="off">
			<!--<classpath refid="build_classpath" />-->
			<include name="**/*.java" />
		</javac>
		
		
		<delete dir="${build.dir}/geogebra_dist/src/org/mathpiper/test" />
		
		
		<!-- Copy MathPiper scripts -->
		<mkdir dir="${build.dir}/geogebra_dist/build/org/mathpiper/geogebrascripts" />
		<copy todir="${build.dir}/geogebra_dist/build/org/mathpiper/geogebrascripts">
			<fileset dir="${build.dir}/geogebra_dist/src/org/mathpiper/geogebrascripts" >
				<include name="**/*" />
			</fileset>
		</copy>
		
		
		
		<!-- Copy test scripts -->
		<mkdir dir="${build.dir}/geogebra_dist/build/tests" />
		<copy todir="${build.dir}/geogebra_dist/build/tests">
			<fileset dir="${mathpiper.dir}/tests" >
				<include name="**/*" />
			</fileset>
		</copy>
		
		<mkdir dir="${build.dir}/geogebra_dist/build/org/mathpiper/builtin/functions/optional" />
	        <mkdir dir="${build.dir}/geogebra_dist/build/org/mathpiper/builtin/functions/plugins" />
		
		<copy file="${mathpiper.dir}/tests/win_test.bat" todir="${build.dir}/geogebra_dist/build"/>
		<copy file="${mathpiper.dir}/tests/unix_test.sh" todir="${build.dir}/geogebra_dist/build"/>

	</target>


</project>

<!-- {{{ License.
/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 }}} -->