File: build.xml

package info (click to toggle)
mathpiper 0.0.svn2556-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,416 kB
  • ctags: 2,729
  • sloc: java: 21,643; xml: 751; sh: 105; makefile: 5
file content (303 lines) | stat: -rw-r--r-- 9,421 bytes parent folder | download
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
<?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>

	<path id="build_classpath">
                <pathelement path="/usr/share/java/jfreechart.jar" />
                <pathelement path="/usr/share/java/jcommon.jar" />
    </path>

	<property name="build.dir" value="build" />
	<property name="compile.source" value="1.5"/>
	<property name="compile.target" value="1.5"/>
	<property name="src.dir" value="src"/>
	<property name="mathpiper.dir" value="."/>

	<!-- <property name="version" value=".58" /> -->
	<property name="build.classes.dir" value="${build.dir}/classes" />
	
	
	<target id="noop" name="noop" description="Do nothing." />
	
	<target name="init">
		<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">
			<classpath refid="build_classpath" />
			<include name="**/*.java" />
		</javac>
		
	</target>
	
	
	<target name="buildscripts" depends="">
	       <mkdir dir="${build.classes.dir}/org/mathpiper/scripts" />
	       <mkdir dir="${build.classes.dir}/org/mathpiper/scripts/initialization.rep" />
		<taskdef name="buildscripts"
              classname="org.mathpiper.test.Build"
              classpath="${build.classes.dir}"  />

	      <buildscripts sourceScriptsDirectory="${src.dir}/org/mathpiper/scripts2/"
                 outputScriptsDirectory="${build.classes.dir}/org/mathpiper/scripts/"/>
      
        </target>



   	<target name="buildscripts3" >
		<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/scripts3/"
                 outputScriptsDirectory="${build.classes.dir}/org/mathpiper/assembledscripts/"
		 outputDocsDirectory="${build.classes.dir}/org/mathpiper/ui/gui/help/data/"
		 baseDirectory="${basedir}/"/>
      
      </target>
	
	
	<target id="dist" name="dist" depends="compile,buildscripts3" >
	
		<!--<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/scripts" />
		<copy todir="${build.classes.dir}/tests/scripts">
			<fileset dir="${mathpiper.dir}/tests/scripts" >
				<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}"/>
		
		<!--<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="clean" name="clean">
		<delete dir="${build.dir}"/>
	</target>
	
	
	<target id="geogebra_dist" name="geogebra_dist" depends="init" >
	
	<!--  
	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/scripts 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/scripts" />
		

		

		
		
		<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/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/" />

			</fileset>
		</copy>



		
		<copy todir="${build.dir}/geogebra_dist/src/org/mathpiper/scripts">
			<fileset dir="${build.dir}/classes/org/mathpiper/scripts" 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>		
		


		
		
	<!--	<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/scripts" />
		<copy todir="${build.dir}/geogebra_dist/build/org/mathpiper/scripts">
			<fileset dir="${build.dir}/geogebra_dist/src/org/mathpiper/scripts" >
				<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>
		<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.
 */
 }}} -->