source: greenstone3/trunk/build.xml@ 15042

Last change on this file since 15042 was 15042, checked in by shaoqun, 16 years ago

reorganise gdbm-related targets

File size: 65.6 KB
Line 
1<?xml version="1.0"?>
2
3<!-- ======================================================================
4 March 2005
5
6 Greenstone3 build and install script
7
8 kjdon
9 ====================================================================== -->
10<project name="greenstone3" default="usage" basedir=".">
11
12 <!-- ============ classpath =================== -->
13 <path id="project.classpath">
14 <fileset dir="lib/java">
15 <include name="**/*.jar"/>
16 </fileset>
17 </path>
18
19 <!-- ============ self defined tasks =================== -->
20
21 <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/>
22 <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/>
23 <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
24 <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/>
25
26<!-- ===================== Property Definitions =========================== -->
27
28<!--
29
30 Each of the following properties are used in the build script.
31 Values for these properties are set by the first place they are
32 defined, from the following list:
33
34 * Definitions on the "ant" command line (ant -Dfoo=bar compile).
35
36 * Definitions from a "build.properties" file in the top level
37 source directory of this application.
38
39 * Definitions from a "build.properties" file in the user's
40 home directory.
41
42 * Default definitions in this build.xml file.
43
44 You will note below that property values can be composed based on the
45 contents of previously defined properties. This is a powerful technique
46 that helps you minimize the number of changes required when your development
47 environment is modified. Note that property composition is allowed within
48 "build.properties" files as well as in the "build.xml" script.
49
50-->
51
52 <!--the first two properties have to be put on the top to be used by build.properties-->
53 <property name="src.packages.home" value="${basedir}/src/packages"/>
54 <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/>
55 <property file="build.properties"/>
56 <property file="${user.home}/build.properties"/>
57
58 <!-- get properties from the environment -->
59 <property environment="env"/>
60 <property name="build.home" value="${basedir}/build"/>
61 <property name="src.home" value="${basedir}/src/java"/>
62 <property name="packages.home" value="${basedir}/packages"/>
63 <!-- this may be set in build.properties, eg if you move the web dir to
64 tomcats webapps directory -->
65 <property name="web.home" value="${basedir}/web"/>
66 <!-- jar files needed by applets go here -->
67 <property name="web.applet" value="${web.home}/applet"/>
68 <!-- jar files needed by the servlet (and extra ones) go here -->
69 <property name="web.lib" value="${web.home}/WEB-INF/lib"/>
70 <!-- other files needed by the servlet go here -->
71 <property name="web.classes" value="${web.home}/WEB-INF/classes"/>
72 <!-- jni libraries and java wrappers go here -->
73 <property name="lib.jni" value="${basedir}/lib/jni"/>
74
75 <property name="javadocs" value="${basedir}/docs/javadoc"/>
76
77 <property name="app.name" value="greenstone3"/>
78 <property name="app.path" value="/${app.name}"/>
79
80
81 <!-- version number stuff -->
82
83 <!-- app.version defaults to trunk -->
84 <condition property="app.version" value="trunk">
85 <not><isset property="app.version"/></not>
86 </condition>
87
88 <!-- determine the 'branch path' -->
89 <condition property="branch.path" value="trunk">
90 <equals arg1="${app.version}" arg2="trunk" />
91 </condition>
92 <condition property="branch.path" value="branches/${app.version}">
93 <not><equals arg1="${app.version}" arg2="trunk" /></not>
94 </condition>
95
96
97 <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/>
98
99 <property name="svn.root" value="http://svn.greenstone.org"/>
100<!-- <property name="cvs.root" value=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src"/> -->
101 <!-- catalina home is set to tomcat basedir is already installed, otherwise
102 use greenstone's tomcat -->
103 <condition property="catalina.home" value="${tomcat.installed.path}">
104 <and>
105 <isset property="tomcat.installed.path"/>
106 <not>
107 <equals arg1="" arg2="${tomcat.installed.path}"/>
108 </not>
109 </and>
110 </condition>
111 <property name="catalina.home" value="${packages.home}/tomcat"/>
112
113 <property name="os.linux" value="Linux"/>
114 <property name="os.mac" value="Mac OS X"/>
115 <property name="os.solaris" value="SunOS"/>
116 <property name="os.unix" value="${os.linux},${os.mac},${os.solaris}"/>
117 <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP,Windows NT,Windows ME"/> <!-- check this!!!-->
118
119 <!-- this is true for linux and macs -->
120 <condition property="current.os.isunix">
121 <os family="unix"/>
122 </condition>
123
124 <condition property="current.os.isunixnotmac">
125 <and>
126 <os family="unix"/>
127 <not>
128 <os family="mac"/>
129 </not>
130 </and>
131 </condition>
132 <condition property="current.os.ismac">
133 <os family="mac"/>
134 </condition>
135
136 <condition property="current.os.iswindows">
137 <os family="windows"/>
138 </condition>
139
140 <condition property="collection.building.enabled">
141 <not>
142 <isset property="disable.collection.building"/>
143 </not>
144 </condition>
145
146 <condition property="collection.building.enabled.windows">
147 <and>
148 <isset property="collection.building.enabled"/>
149 <isset property="current.os.iswindows"/>
150 </and>
151 </condition>
152
153 <condition property="collection.building.enabled.unix">
154 <and>
155 <isset property="collection.building.enabled"/>
156 <isset property="current.os.isunix"/>
157 </and>
158 </condition>
159
160 <condition property="independent-indexers">
161 <isset property="disable.collection.building"/>
162 </condition>
163
164 <!-- ============= Base dirs for each package and component ============ -->
165 <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/>
166 <property name="src.gsdl3.home" value="${src.home}/org/greenstone/gsdl3"/>
167 <property name="anttasks.home" value="${src.home}/org/greenstone/anttasks"/>
168 <property name="gs2build.home" value="${basedir}/gs2build"/>
169 <property name="gli.home" value="${basedir}/gli"/>
170 <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/>
171
172 <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">-->
173 <condition property="indexers.home" value="${basedir}/src/packages/indexers">
174 <isset property="disable.collection.building"/>
175 </condition>
176 <condition property="indexers.home" value="${gs2build.home}/indexers">
177 <not>
178 <isset property="disable.collection.building"/>
179 </not>
180 </condition>
181
182 <property name="mg.home" value="${indexers.home}/mg"/>
183 <property name="mgpp.home" value="${indexers.home}/mgpp"/>
184 <property name="lucene.home" value="${indexers.home}/lucene-gs"/>
185
186
187<!-- ==================== Compilation Control Options ==================== -->
188
189<!--
190
191 These properties control option settings on the Javac compiler when it
192 is invoked using the <javac> task.
193
194 compile.debug Should compilation include the debug option?
195
196 compile.deprecation Should compilation include the deprecation option?
197
198 compile.optimize Should compilation include the optimize option?
199
200-->
201
202 <property name="compile.debug" value="true"/>
203 <property name="compile.deprecation" value="true"/>
204 <property name="compile.optimize" value="true"/>
205
206<!--
207
208 Rather than relying on the CLASSPATH environment variable, Ant includes
209 features that makes it easy to dynamically construct the classpath you
210 need for each compilation. The example below constructs the compile
211 classpath to include the servlet.jar file, as well as the other components
212 that Tomcat makes available to web applications automatically, plus anything
213 that you explicitly added.
214
215-->
216
217 <path id="compile.classpath">
218 <!-- Include all jar files and libraries in our jni lib directory -->
219 <pathelement location="${lib.jni}"/>
220 <fileset dir="${lib.jni}">
221 <include name="*.jar"/>
222 </fileset>
223 <!-- Include all jar files in our web lib directory -->
224 <pathelement location="${web.lib}"/>
225 <fileset dir="${web.lib}">
226 <include name="*.jar"/>
227 </fileset>
228
229 <!-- Include the axis jar files -->
230 <!--<fileset dir="${basedir}/comms/soap/axis/lib">
231 <include name="*.jar"/>
232 </fileset>-->
233
234 <!-- include the jar files from the source packages -->
235 <!-- mg and mgpp get installed into lib/jni but they may not be there yet
236 so we add them in by name -->
237 <pathelement location="${lib.jni}/mg.jar"/>
238 <pathelement location="${lib.jni}/mgpp.jar"/>
239
240 <!-- Include all elements that Tomcat exposes to applications -->
241 <pathelement location="${catalina.home}/common/classes"/>
242 <fileset dir="${catalina.home}/common/endorsed">
243 <include name="*.jar"/>
244 </fileset>
245 <fileset dir="${catalina.home}/common/lib">
246 <include name="*.jar"/>
247 </fileset>
248 <pathelement location="${catalina.home}/shared/classes"/>
249 <fileset dir="${catalina.home}/shared/lib">
250 <include name="*.jar"/>
251 </fileset>
252 </path>
253
254 <path id="local.tomcat.classpath">
255 <!-- explicitly include the jni java wrappers in the classpath -->
256 <pathelement location="${lib.jni}"/>
257 <fileset dir="${lib.jni}">
258 <include name="*.jar"/>
259 </fileset>
260 </path>
261
262 <path id="local.tomcat.path">
263 <pathelement location="${basedir}/bin/script"/>
264 <pathelement location="${basedir}/bin"/>
265 <pathelement location="${lib.jni}"/>
266 <pathelement path="${env.PATH}"/>
267 <pathelement path="${env.Path}"/>
268 </path>
269
270 <target name="test-setup">
271 <echo>ant java version=${ant.java.version}</echo>
272 <echo>is unix : ${current.os.isunix}</echo>
273 <echo>is mac : ${current.os.ismac}</echo>
274 <echo>is unixnotmac : ${current.os.isunixnotmac}</echo>
275 <echo>is windows : ${current.os.iswindows}</echo>
276 <echo>os.unix: ${os.unix}</echo>
277 </target>
278<!-- ==================== Primary and Global Targets ============================= -->
279
280 <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
281
282 <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm"
283 description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this.">
284<!-- <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections"
285 description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this.">-->
286
287 <!-- make sure .sh files are executable -->
288 <chmod dir="${basedir}" perm="ugo+rx"
289 includes="*.sh"/>
290 <chmod dir="${basedir}/bin/script" perm="ugo+rx"
291 includes="*.sh,*.pl"/>
292 </target>
293 <target name="install" depends="init,install-indexer-files,configure,configure-c++,compile"
294 description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/>
295
296<!-- <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
297 description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>-->
298 <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web"
299 description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/>
300
301
302 <target name="configure-c++" depends="init,configure-packages,configure-core,configure-gs2building"
303 description="Configure any C/C+/+ package code and gs2building code if necessary"/>
304
305 <target name="configure" depends="init,configure-tomcat,configure-web"
306 description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/>
307
308 <target name="clean" depends="init,clean-gdbm,clean-packages,clean-core,clean-gs2building"
309 description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/>
310
311 <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building"
312 description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/>
313
314 <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"
315 description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile."/>
316
317 <target name="start" depends="init,start-tomcat"
318 description="Startup the Tomcat server." >
319 <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>
320 <echo>Tomcat: ${catalina.home}</echo>
321 <echo>Java: ${java.home}</echo>
322 <echo>URL: http://${tomcat.server}:${tomcat.port}${app.path}/</echo>
323 <!-- assuming that index.html is not needed here -->
324 </target>
325
326 <target name="stop" depends="init,stop-tomcat"
327 description="Shutdown the Tomcat server."/>
328
329 <target name="restart" description="Shutdown and restart Tomcat" depends="init,stop,start"/>
330
331
332<!-- =========== Help targets =================================== -->
333
334 <property name="install-command" value="ant [options] prepare install"/>
335
336 <target name="usage" description="Print a help message">
337 <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
338 <echo message=" Execute 'ant -help' for Ant help."/>
339 <echo>To install Greenstone3, run '${install-command}'.
340There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option.
341To log the output, use the '-logfile build.log' option.
342The README.txt file has more information about the ant targets and install process.
343 </echo>
344 </target>
345
346 <target name="help" depends="usage" description="Print a help message"/>
347
348 <target name="debug" depends="init" description="Display all the currently used properties">
349 <echoproperties/>
350 </target>
351
352<!-- ====== initialization and setup targets ================== -->
353
354 <target name="accept-properties" unless="properties.accepted">
355 <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
356tomcat.server=${tomcat.server}
357tomcat.port=${tomcat.port}
358tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
359proxy.host=${proxy.host}
360proxy.port=${proxy.port}
361If these are not acceptable, please change them and rerun this target. Continue [y/n]? />
362 </input>
363 <condition property="do.abort">
364 <equals arg1="n" arg2="${properties.ok}"/>
365 </condition>
366 <fail if="do.abort">Build aborted by user. Please change your properties settings and re-run the target</fail>
367 </target>
368
369<!-- <target name="check-cvsroot">
370 <condition property="svnroot.notset">
371 <or>
372 <not>
373 <isset property="env.CVSROOT"/>
374 </not>
375 <equals arg1="" arg2="${env.CVSROOT}"/>
376 </or>
377 </condition>
378 <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>
379 </target> -->
380
381 <!-- this sets up some initial properties -->
382 <target name="init">
383
384 <condition property="java.too.old">
385 <or>
386 <equals arg1="1.1" arg2="${ant.java.version}"/>
387 <equals arg1="1.2" arg2="${ant.java.version}"/>
388 <equals arg1="1.3" arg2="${ant.java.version}"/>
389 </or>
390 </condition>
391 <fail if="java.too.old" message="You need Java 1.4 or greater to run Greenstone 3"/>
392
393 <available file="${indexers.home}" property="indexers.present"/>
394 <available file="${basedir}/gli" property="gli.present"/>
395 <available file="${basedir}/gs2build" property="gs2build.present"/>
396
397 <condition property="tomcat.islocal">
398 <or>
399 <not>
400 <isset property="tomcat.installed.path"/>
401 </not>
402 <equals arg1="" arg2="${tomcat.installed.path}"/>
403 </or>
404 </condition>
405
406 <echo>tomcat.port = ${tomcat.port}</echo>
407 <echo>gli.present = ${gli.present}</echo>
408 <echo>gs2build.present = ${gs2build.present}</echo>
409 <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo>
410 <!-- gsdl2.installed.path appears not to be set? -->
411
412 <condition property="proxy.present">
413 <and>
414 <isset property="proxy.host"/>
415 <not>
416 <equals arg1="" arg2="${proxy.host}"/>
417 </not>
418 </and>
419 </condition>
420
421 <condition property="need.macos.extra">
422 <and>
423 <isset property="current.os.ismac"/>
424 <not>
425 <isset property="disable.collection.building"/>
426 </not>
427 </and>
428 </condition>
429 </target>
430
431 <target name="setup-proxy" depends="init" if="proxy.present">
432 <condition property="ask.user">
433 <or>
434 <equals arg1="" arg2="${proxy.user}"/>
435 <equals arg1="" arg2="${proxy.password}"/>
436 </or>
437 </condition>
438 <getuserandpassword message="Using proxy: ${proxy.host}:${proxy.port}" if="ask.user" username="${proxy.user}" userproperty="proxy.username" pwordproperty="proxy.password"/>
439 <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
440 </target>
441
442 <!-- ========== Web app Targets ================================ -->
443
444 <target name="prepare-web" depends="init,configure-java-version">
445 <mkdir dir="${web.home}/applet"/>
446 <mkdir dir="${web.home}/logs"/>
447 </target>
448
449 <!-- if we are using java 1.5, we need the xalan.jar file in web/WEB-INF/lib, but if we are using java 1.4, we can't have it there -->
450 <target name="configure-java-version" depends="init"
451 description="Run this target if you have changed the default version of java since installing greenstone3">
452 <condition property="need.xalan.jar">
453 <equals arg1="1.5" arg2="${ant.java.version}"/>
454 </condition>
455 <antcall target="activate-xalan-jar"/>
456 <antcall target="deactivate-xalan-jar"/>
457 </target>
458
459 <target name="activate-xalan-jar" if="need.xalan.jar">
460 <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
461 <antcall target="copy-xalan-for-mac" />
462 </target>
463
464 <target name="copy-xalan-for-mac" if="current.os.ismac">
465 <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
466 </target>
467
468 <target name="deactivate-xalan-jar" unless="need.xalan.jar">
469 <delete file="${web.lib}/xalan.jar"/>
470 </target>
471
472 <target name="prepare-collections" depends="init">
473 <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
474 <!-- gs2mgdemo -->
475 <unzip src="${collect.dir}/gs2mgdemo/import.zip"
476 dest="${collect.dir}/gs2mgdemo"/>
477 <unzip src="${collect.dir}/gs2mgdemo/metadata.zip"
478 dest="${collect.dir}/gs2mgdemo"/>
479 <unzip src="${collect.dir}/gs2mgdemo/index/index.zip"
480 dest="${collect.dir}/gs2mgdemo/index"/>
481 <delete file="${collect.dir}/gs2mgdemo/import.zip"/>
482 <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/>
483 <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/>
484 <!-- gs2mgppdemo -->
485 <unzip src="${collect.dir}/gs2mgppdemo/import.zip"
486 dest="${collect.dir}/gs2mgppdemo"/>
487 <unzip src="${collect.dir}/gs2mgppdemo/metadata.zip"
488 dest="${collect.dir}/gs2mgppdemo"/>
489 <unzip src="${collect.dir}/gs2mgppdemo/index/index.zip"
490 dest="${collect.dir}/gs2mgppdemo/index"/>
491 <delete file="${collect.dir}/gs2mgppdemo/import.zip"/>
492 <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/>
493 <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/>
494 <!-- gberg -->
495 <unzip src="${collect.dir}/gberg/index/index.zip"
496 dest="${collect.dir}/gberg/index"/>
497 <delete file="${collect.dir}/gberg/index/index.zip"/>
498 </target>
499
500
501 <target name="configure-web" depends="init"
502 description="Configure only the web app config files">
503 <!-- we want a unix path in the global.properties file -->
504 <pathconvert targetos="unix" property="src.gsdl3.home.unix">
505 <path path="${web.home}"/>
506 </pathconvert>
507 <filter token="gsdl3home" value="${src.gsdl3.home.unix}"/>
508 <filter token="gsdl3version" value="${app.version}"/>
509 <filter token="tomcat.server" value="${tomcat.server}"/>
510 <filter token="tomcat.port" value="${tomcat.port}"/>
511 <copy file="${basedir}/resources/java/global.properties.in" tofile="${web.classes}/global.properties" filtering="true" overwrite="true"/>
512 <copy file="${basedir}/resources/java/log4j.properties.in" tofile="${web.classes}/log4j.properties" filtering="true" overwrite="true"/>
513 <chmod file="${web.classes}/global.properties" perm="600"/>
514 <chmod file="${web.classes}/log4j.properties" perm="600"/>
515 </target>
516
517 <target name="compile-web" depends="init">
518 <javac srcdir="${web.classes}"
519 destdir="${web.classes}"
520 debug="${compile.debug}"
521 deprecation="${compile.deprecation}"
522 optimize="${compile.optimize}">
523 <classpath>
524 <path refid="compile.classpath"/>
525 </classpath>
526 </javac>
527 </target>
528
529 <target name="svnupdate-web" unless="nosvn.mode">
530 <svn>
531 <update dir="${web.home}"/>
532 </svn>
533 </target>
534
535 <target name="update-web" depends="init,svnupdate-web,configure-web"
536 description="update only the web stuff (config files)"/>
537
538
539<!-- ======================= Tomcat Targets ========================== -->
540
541 <!-- this target downloads and installs Tomcat -->
542 <!-- we download tomcat and the compat module - its needed for 1.4, and doesn't seem to harm 1.5 -->
543 <target name="prepare-tomcat" depends="init,setup-proxy" if="tomcat.islocal">
544
545 <!-- check that packages dir is there -->
546 <mkdir dir="${packages.home}"/>
547 <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25.zip"
548 dest="${packages.home}/apache-tomcat-5.5.25.zip"
549 usetimestamp="true"/>
550 <unzip src="${packages.home}/apache-tomcat-5.5.25.zip"
551 dest="${packages.home}"/>
552 <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25-compat.zip"
553 dest="${packages.home}/apache-tomcat-5.5.25-compat.zip"
554 usetimestamp="true"/>
555 <unzip src="${packages.home}/apache-tomcat-5.5.25-compat.zip"
556 dest="${packages.home}"/>
557 <!-- delete any existing tomcat -->
558 <delete dir="${packages.home}/tomcat"/>
559 <move todir="${packages.home}/tomcat">
560 <fileset dir="${packages.home}/apache-tomcat-5.5.25"/>
561 </move>
562 <copy file="${basedir}/resources/tomcat/setclasspath.bat"
563 tofile="${packages.home}/tomcat/bin/setclasspath.bat"
564 overwrite="true"/>
565 <copy file="${basedir}/resources/tomcat/setclasspath.sh"
566 tofile="${packages.home}/tomcat/bin/setclasspath.sh"
567 overwrite="true"/>
568 <!-- make sure we have execute permission for the .sh files -->
569 <chmod dir="${packages.home}/tomcat/bin" perm="ugo+rx"
570 includes="*.sh"/>
571 </target>
572
573 <target name="configure-tomcat" depends="init,configure-tomcat-local,configure-tomcat-external"/>
574
575 <target name="configure-tomcat-local" depends="init" if="tomcat.islocal">
576 <!-- re-setup the server.xml file -->
577 <copy file="${basedir}/resources/tomcat/server.xml" tofile="${packages.home}/tomcat/conf/server.xml" overwrite="true">
578 <filterset>
579 <filter token="port" value="${tomcat.port}"/>
580 <filter token="shutdown-port" value="${tomcat.shutdown.port}"/>
581 </filterset>
582 </copy>
583 <!-- set up the greenstone3 context -->
584 <copy file="${basedir}/resources/tomcat/greenstone3.xml" tofile="${packages.home}/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true">
585 <filterset>
586 <filter token="gsdl3webhome" value="${basedir}/web"/>
587 </filterset>
588 </copy>
589 </target>
590
591 <target name="configure-tomcat-external" depends="init" unless="tomcat.islocal">
592 <!-- re-setup the server.xml file -->
593 <!-- need to edit the config file, or do we get the user to do this???-->
594 </target>
595
596 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal">
597 <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
598 <property name="tomcat.path" refid="local.tomcat.path"/>
599 <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
600 <exec executable="${catalina.home}/bin/startup.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
601 <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
602 <env key="GSDL3HOME" value="${basedir}"/>
603 <env key="PATH" path="${tomcat.path}"/>
604 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
605 <env key="CATALINA_HOME" value="${catalina.home}"/>
606 <env key="CLASSPATH" path="${tomcat.classpath}"/>
607 <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}"/>
608 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${gdbm.installed.path}/lib"/> <!-- for mac os -->
609 </exec>
610 <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
611 <env key="GSDLOS" value="windows"/>
612 <env key="GSDL3HOME" value="${basedir}"/>
613 <env key="Path" path="${tomcat.path}"/>
614 <env key="PATH" path="${tomcat.path}"/>
615 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
616 <env key="CLASSPATH" path="${tomcat.classpath}"/>
617 </exec>
618 <!-- wait for the server to startup in case other targets need it running -->
619 <waitfor maxwait="5" maxwaitunit="second">
620 <and>
621 <socket server="${tomcat.server}" port="${tomcat.port}"/>
622 <http url="http://${tomcat.server}:${tomcat.port}${app.path}/index.html"/>
623 </and>
624 </waitfor>
625 </target>
626
627 <!-- windows: do we want to launch a webrowser?? -->
628 <!-- shouldn't this test whether anything is running first? -->
629 <target name="stop-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
630 <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
631 <env key="CATALINA_HOME" value="${catalina.home}"/>
632 </exec>
633 <exec executable="${catalina.home}/bin/shutdown.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="false"/>
634 </target>
635
636 <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat,start-tomcat"/>
637
638 <target name="setup-catalina-ant-tasks">
639 <!-- Configure the custom Ant tasks for the Tomcat Manager application -->
640 <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
641 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
642 <taskdef name="list" classname="org.apache.catalina.ant.ListTask"
643 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
644 <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"
645 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
646 <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
647 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
648 <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"
649 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
650 <taskdef name="start" classname="org.apache.catalina.ant.StartTask"
651 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
652 <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
653 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
654 <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"
655 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
656 </target>
657
658
659
660
661
662
663<!-- ======================= ant Targets ============================ -->
664 <target name="prepare-ant" depends="init">
665 <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip"
666 dest="${packages.home}/apache-ant-1.7.0-bin.zip"
667 usetimestamp="true"/>
668 <unzip src="${packages.home}/apache-ant-1.7.0-bin.zip"
669 dest="${packages.home}"/>
670 <move todir="${packages.home}/ant">
671 <fileset dir="${packages.home}/apache-ant-1.7.0"/>
672 </move>
673 </target>
674
675<!-- ======================= Axis Targets ============================ -->
676
677 <target name="prepare-axis" depends="init">
678 <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip"
679 dest="${packages.home}/axis-bin-1_2_1.zip"
680 usetimestamp="true"/>
681 <unzip src="${packages.home}/axis-bin-1_2_1.zip"
682 dest="${packages.home}"/>
683 <move todir="${packages.home}/axis">
684 <fileset dir="${packages.home}/axis-1_2_1"/>
685 </move>
686 <!-- install axis into greenstone web app -->
687 <copy todir="${web.lib}">
688 <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/lib">
689 <include name="*.jar"/>
690 </fileset>
691 </copy>
692 <copy todir="${web.home}">
693 <fileset dir="${packages.home}/axis/webapps/axis/">
694 <include name="*.jsp"/>
695 <include name="*.jws"/>
696 </fileset>
697 </copy>
698 <copy tofile="${web.home}/axis.html" file="${packages.home}/axis/webapps/axis/index.html"/>
699 <copy todir="${web.classes}">
700 <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/classes">
701 <include name="*.properties"/>
702 </fileset>
703 </copy>
704 </target>
705
706 <target name="soap-deploy-site" depends="init,get-sitename,get-siteuri,create-deployment-files,deploy-site"
707 description="Deploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work."/>
708
709 <target name="deploy-site">
710 <java classname="org.apache.axis.client.AdminClient">
711 <classpath refid="compile.classpath"/>
712 <arg value="-l"/>
713 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
714 <arg file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
715 </java>
716 </target>
717
718 <target name="soap-undeploy-site" depends="get-sitename"
719 description="Undeploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work.">
720 <java classname="org.apache.axis.client.AdminClient">
721 <classpath refid="compile.classpath"/>
722 <arg value="-l"/>
723 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
724 <arg file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
725 </java>
726 </target>
727
728 <!-- this target used to deploy the preprepared localsite server -->
729 <target name="deploy-localsite" depends="init"
730 description="Deploy the SOAP server for localsite. Will start and stop Tomcat.">
731 <antcall target="start-tomcat"/>
732 <antcall target="deploy-site">
733 <param name="axis.sitename" value="localsite"/>
734 </antcall>
735 <antcall target="stop-tomcat"/>
736 </target>
737
738 <target name="get-sitename" unless="axis.sitename">
739 <input addproperty="axis.sitename" message="What site? (press enter for default:localsite)" defaultvalue="localsite"/>
740 </target>
741
742 <target name="get-siteuri" depends="get-sitename" unless="axis.siteuri">
743 <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/>
744 <echo>${axis.sitename}, ${axis.siteuri}</echo>
745 </target>
746
747 <target name="check-deployment-files" depends="get-sitename">
748 <condition property="deploy.exists">
749 <and>
750 <available file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
751 <available file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
752 <available file="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class"/>
753 </and>
754 </condition>
755 </target>
756
757 <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"
758 if="axis.sitename" unless="deploy.exists">
759 <filter token="sitename" value="${axis.sitename}"/>
760 <filter token="siteuri" value="${axis.siteuri}"/>
761 <copy file="${basedir}/resources/soap/site.wsdd.template"
762 tofile="${basedir}/resources/soap/${axis.sitename}.wsdd"
763 filtering="true"/>
764 <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
765 tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"
766 filtering="true"/>
767 <!-- create the java files and compile them -->
768 <copy file="${basedir}/resources/java/SOAPServer.java.in"
769 tofile="${src.gsdl3.home}/SOAPServer${axis.sitename}.java"
770 filtering="true"/>
771 <mkdir dir="${build.home}"/>
772 <javac srcdir="${src.home}"
773 destdir="${build.home}"
774 debug="${compile.debug}"
775 deprecation="${compile.deprecation}"
776 optimize="${compile.optimize}">
777 <classpath refid="compile.classpath"/>
778 <include name="org/greenstone/gsdl3/SOAPServer${axis.sitename}.java" />
779 </javac>
780 <mkdir dir="${web.classes}/org/greenstone/gsdl3"/>
781 <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" />
782 </target>
783
784
785<!-- ====================== Core targets ============================== -->
786<!-- core targets refer to the core gsdl3 java src -->
787
788 <target name="prepare-core" unless="nocvs.mode">
789 <!-- just get rid of empty directories-->
790 <svn>
791 <update dir="."/>
792 </svn>
793 </target>
794
795 <target name="configure-core"/>
796
797 <target name="update-core" depends="init,svnupdate-core,clean-core,compile-core"
798 description="Update only the Greenstone core" />
799
800 <target name="svnupdate-core" unless="nocvs.mode">
801
802 <svn>
803 <update dir="." recurse="false"/>
804 </svn>
805
806 <svn>
807 <update dir="bin"/>
808 <update dir="comms"/>
809 <update dir="dist-resources"/>
810 <update dir="docs"/>
811 <update dir="lib"/>
812 <update dir="resources"/>
813 <update dir="src"/>
814 <update dir="winutil"/>
815 </svn>
816
817 </target>
818
819 <target name="clean-core"
820 description="Clean only the Greenstone core">
821 <delete dir="${build.home}"/>
822 </target>
823
824 <target name="compile-core" depends="init"
825 description="Compile only the Greenstone core">
826 <mkdir dir="${build.home}"/>
827 <javac srcdir="${src.home}"
828 destdir="${build.home}"
829 debug="${compile.debug}"
830 deprecation="${compile.deprecation}"
831 optimize="${compile.optimize}">
832 <classpath>
833 <path refid="compile.classpath"/>
834 </classpath>
835 </javac>
836 <jar destfile="${build.home}/gsdl3.jar">
837 <fileset dir="${build.home}">
838 <include name="org/greenstone/gsdl3/**"/>
839 <include name="org/flax/**"/>
840 <exclude name="**/Test.class"/>
841 </fileset>
842 <manifest>
843 <attribute name="Built-By" value="${user.name}" />
844 </manifest>
845 </jar>
846 <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/>
847 <!-- copy the localsite server in case we need it -->
848 <copy file="${build.home}/org/greenstone/gsdl3/SOAPServerlocalsite.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServerlocalsite.class" />
849
850 <jar destfile="${build.home}/GAI.jar">
851 <fileset dir="${build.home}">
852 <include name="org/greenstone/admin/**"/>
853 </fileset>
854 <manifest>
855 <attribute name="Built-By" value="${user.name}" />
856 </manifest>
857 </jar>
858
859 <jar destfile="${build.home}/phind.jar">
860 <fileset dir="${build.home}">
861 <include name="org/greenstone/applet/phind/**"/>
862 </fileset>
863 <manifest>
864 <attribute name="Built-By" value="${user.name}" />
865 </manifest>
866 </jar>
867 <mkdir dir="${web.applet}"/>
868 <copy file="${build.home}/phind.jar" todir="${web.applet}"/>
869 <!-- phind also needs xercesImpl.jar and xml-apis.jar to be in web/applet -->
870 <copy file="${packages.home}/tomcat/common/endorsed/xercesImpl.jar" todir="${web.applet}"/>
871 <copy file="${packages.home}/tomcat/common/endorsed/xml-apis.jar" todir="${web.applet}"/>
872 <jar destfile="${build.home}/anttasks.jar">
873 <fileset dir="${build.home}">
874 <include name="org/greenstone/anttasks/**"/>
875 </fileset>
876 <manifest>
877 <attribute name="Built-By" value="${user.name}" />
878 </manifest>
879 </jar>
880 <copy file="${build.home}/anttasks.jar" todir="${basedir}/lib/java"/>
881 <jar destfile="${build.home}/gsdl3test.jar">
882 <fileset dir="${build.home}">
883 <include name="org/greenstone/gsdl3/**/*Test.class"/>
884 <include name="org/greenstone/testing/**"/>
885 </fileset>
886 <manifest>
887 <attribute name="Built-By" value="${user.name}" />
888 </manifest>
889 </jar>
890 <jar destfile="${build.home}/server.jar">
891 <fileset dir="${build.home}">
892 <include name="org/greenstone/server/**"/>
893 </fileset>
894 <fileset file="${basedir}/resources/java/server.properties"/>
895 <manifest>
896 <attribute name="Built-By" value="${user.name}"/>
897 </manifest>
898 </jar>
899 <copy file="${build.home}/server.jar" todir="${basedir}"/>
900 </target>
901
902<!-- ================== Packages targets ================================ -->
903 <!-- these targets refer to the greenstone source packages - these need
904 updating less often, so are in separate targets to the core -->
905 <target name="prepare-packages" depends="init,prepare-indexers"/>
906
907 <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nocvs.mode">
908<!-- <target name="checkout-indexers" depends="check-svnroot,init" if="independent-indexers" unless="nocvs.mode"> -->
909 <svn>
910 <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers"/>
911 </svn>
912 </target>
913
914 <target name="prepare-indexers" depends="init" if="independent-indexers" unless="indexers.present">
915 <antcall target="checkout-indexers"/>
916 </target>
917
918 <target name="update-packages" depends="init,svnupdate-packages,configure-packages,clean-packages,compile-packages"
919 description="Update only the source packages"/>
920
921 <target name="svnupdate-packages" unless="nocvs.mode">
922 <svn>
923 <update dir="${src.packages.home}"/>
924 </svn>
925 </target>
926
927 <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers"
928 description="Configure only the packages."/>
929
930 <target name="configure-javagdbm">
931 <echo>
932 Configuring JavaGDBM
933 </echo>
934 <exec executable="${javagdbm.home}/configure" os="${os.linux},${os.solaris}"
935 dir="${javagdbm.home}">
936 <arg value="--prefix=${basedir}"/>
937 <arg value="--libdir=${lib.jni}"/>
938 </exec>
939 <exec executable="${javagdbm.home}/configure" os="${os.mac}"
940 dir="${javagdbm.home}">
941 <arg value="--prefix=${basedir}"/>
942 <arg value="--libdir=${lib.jni}"/>
943 <arg value="--with-gdbm=${gdbm.installed.path}"/>
944 </exec>
945 </target>
946
947<!-- Message from oran. I removed the condition from this line becuase it meant
948 the indexers would only be configured if collection building was DISabled.
949 Shouldn't they be configured when collection building is ENabled? -->
950
951<!-- <target name="configure-indexers" depends="init" if="independent-indexers"> -->
952<target name="configure-indexers" depends="init">
953 <echo>Configuring Indexers</echo>
954 <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}">
955 <arg value="--prefix=${basedir}"/>
956 <arg value="--libdir=${lib.jni}"/>
957 </exec>
958 </target>
959
960 <target name="clean-packages" depends="init,clean-javagdbm,clean-indexers" description="Clean only the packages"/>
961
962 <target name="clean-javagdbm" depends="init">
963 <exec executable="make" os="${os.unix}"
964 dir="${javagdbm.home}">
965 <arg value="clean"/>
966 </exec>
967 </target>
968
969 <target name="clean-indexers" depends="init" if="independent-indexers">
970 <exec executable="make" os="${os.unix}"
971 dir="${indexers.home}">
972 <arg value="clean"/>
973 </exec>
974 <exec executable="${indexers.home}/winMake.bat" os="${os.windows}"
975 dir="${indexers.home}">
976 <arg value="clean"/>
977 </exec>
978
979 </target>
980
981 <target name="compile-packages" description="Compile only the source packages">
982
983 <!-- javagdbm -->
984 <echo>compile javagdbm</echo>
985 <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/>
986 <exec executable="make" os="${os.unix}" dir="${javagdbm.home}">
987 <arg value="install"/>
988 </exec>
989
990 <!-- windows: just the java stuff. -->
991 <echo>Windows: compile javagdbm (java only)</echo>
992 <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}">
993 <arg value="compile"/>
994 <arg value="javaonly"/>
995 </exec>
996
997 <!-- install the jar file -->
998 <echo>Install the javagdbm jar file</echo>
999 <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
1000
1001 <!-- Indexers -->
1002
1003 <!-- this may be in gs2build - we will be recompiling, but never mind -->
1004 <echo>Indexers: make (from ${indexers.home})</echo>
1005 <exec executable="make" os="${os.unix}" dir="${indexers.home}"/>
1006 <echo>Indexers: make install</echo>
1007 <exec executable="make" os="${os.unix}" dir="${indexers.home}">
1008 <arg value="install"/>
1009 </exec>
1010
1011 <echo>Indexers: make</echo>
1012 <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
1013 <arg value="all"/>
1014 </exec>
1015 <echo>Indexers: make install</echo>
1016 <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
1017 <arg value="install"/>
1018 </exec>
1019
1020 <!-- install the jar and jni files -->
1021 <echo>Install the indexers' jar and jni files</echo>
1022 <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
1023 <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
1024 <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
1025 <antcall target="install-jni-files"/>
1026 </target>
1027
1028 <target name="install-jni-files" depends="init,install-jni-files-linux,install-jni-files-windows,install-jni-files-macos"/>
1029
1030 <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac">
1031 <copy file="${mg.home}/jni/libmgretrievejni.so" todir="${lib.jni}"/>
1032 <copy file="${mg.home}/jni/libmgsearchjni.so" todir="${lib.jni}"/>
1033 <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/>
1034 <copy file="${mgpp.home}/jni/libmgppretrievejni.so" todir="${lib.jni}"/>
1035 <copy file="${mgpp.home}/jni/libmgppsearchjni.so" todir="${lib.jni}"/>
1036 <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/>
1037 </target>
1038 <target name="install-jni-files-windows" depends="init" if="current.os.iswindows">
1039 <copy file="${mg.home}/jni/mgretrievejni.dll" todir="${lib.jni}"/>
1040 <copy file="${mg.home}/jni/mgsearchjni.dll" todir="${lib.jni}"/>
1041 <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/>
1042 <copy file="${mgpp.home}/jni/mgppretrievejni.dll" todir="${lib.jni}"/>
1043 <copy file="${mgpp.home}/jni/mgppsearchjni.dll" todir="${lib.jni}"/>
1044 <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/>
1045 </target>
1046 <target name="install-jni-files-macos" depends="init" if="current.os.ismac">
1047 <copy file="${mg.home}/jni/libmgretrievejni.jnilib" todir="${lib.jni}"/>
1048 <copy file="${mg.home}/jni/libmgsearchjni.jnilib" todir="${lib.jni}"/>
1049 <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/>
1050 <copy file="${mgpp.home}/jni/libmgppretrievejni.jnilib" todir="${lib.jni}"/>
1051 <copy file="${mgpp.home}/jni/libmgppsearchjni.jnilib" todir="${lib.jni}"/>
1052 <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/>
1053 </target>
1054
1055 <!-- ================== gs2building targets ===============-->
1056
1057
1058 <target name="update-gs2building" if="collection.building.enabled"
1059 depends="init,svnupdate-gs2building,rename-gs2build-files,configure-gs2building,clean-gs2building,compile-gs2building"
1060 description="Update only the Greenstone 2 building components"/>
1061
1062 <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nocvs.mode">
1063 </target>
1064 <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nocvs.mode">
1065 <!-- Note: can't do a -d update here cos it will get all of gsdl
1066 also, an update doesn't get new files, so we do a checkout instead. -->
1067 <antcall target="checkout-gs2build"/>
1068 </target>
1069
1070 <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nocvs.mode">
1071 <svn>
1072 <update dir="${gli.home}"/>
1073 </svn>
1074 </target>
1075
1076 <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="collection.building.enabled">
1077 </target>
1078
1079 <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nocvs.mode">
1080 <echo>checking out gs2build</echo>
1081 <!-- svn checkouts -->
1082 <svn>
1083 <!-- perllib -->
1084 <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib"/>
1085
1086 <!-- selected packages -->
1087 <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan"/>
1088 <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat"/>
1089 <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy"/>
1090 <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl"/>
1091 <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea"/>
1092 <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml"/>
1093 <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml"/>
1094 <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir"/>
1095 <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget"/>
1096 <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows"/>
1097 <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv"/>
1098 <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml"/>
1099 <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz"/>
1100
1101 <!-- some of src (db2txt hashfile phind txt2db) -->
1102 <checkout url="${svn.root}/gsdl/${branch.path}/src/db2txt" destPath="gs2build/src/db2txt"/>
1103 <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile"/>
1104 <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind"/>
1105 <checkout url="${svn.root}/gsdl/${branch.path}/src/txt2db" destPath="gs2build/src/txt2db"/>
1106
1107 <!-- bin -->
1108 <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script"/>
1109
1110 <!-- mappings -->
1111 <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings"/>
1112
1113 <!-- etc/packages -->
1114 <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages"/>
1115
1116 <!-- collect -->
1117 <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol"/>
1118
1119 <!-- gs2build-extra -->
1120 <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra"/>
1121
1122 <!-- indexers -->
1123 <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers"/>
1124
1125
1126 </svn>
1127 <!-- regular downloads -->
1128
1129 <!-- some files from lib -->
1130 <mkdir dir="gs2build/lib"/>
1131 <get src="${svn.root}/gsdl/${branch.path}/lib/text_t.h" dest="gs2build/lib/text_t.h"/>
1132 <get src="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" dest="gs2build/lib/text_t.cpp"/>
1133 <get src="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" dest="gs2build/lib/gsdlconf.h"/>
1134
1135 <!-- some files from etc -->
1136 <get src="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" dest="gs2build/etc/marctodc.txt"/>
1137 <get src="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" dest="gs2build/etc/dc2marc-mapping.xml"/>
1138 <get src="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" dest="gs2build/etc/dc2marc.xsl"/>
1139 <get src="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" dest="gs2build/etc/qdc2marc-mapping.xml"/>
1140
1141 <!-- some files from the gsdl root directory -->
1142 <get src="${svn.root}/gsdl/${branch.path}/setup.bash" dest="gs2build/setup.bash"/>
1143 <get src="${svn.root}/gsdl/${branch.path}/config.sub" dest="gs2build/config.sub"/>
1144 <get src="${svn.root}/gsdl/${branch.path}/config.guess" dest="gs2build/config.guess"/>
1145 <get src="${svn.root}/gsdl/${branch.path}/config.h.in" dest="gs2build/config.h.in"/>
1146 <get src="${svn.root}/gsdl/${branch.path}/configtest.pl" dest="gs2build/configtest.pl"/>
1147 <get src="${svn.root}/gsdl/${branch.path}/install-sh" dest="gs2build/install-sh"/>
1148 <get src="${svn.root}/gsdl/${branch.path}/acconfig.h" dest="gs2build/acconfig.h"/>
1149 <get src="${svn.root}/gsdl/${branch.path}/aclocal.m4" dest="gs2build/aclocal.m4"/>
1150 <get src="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" dest="gs2build/WIN32cfg.h"/>
1151
1152 </target>
1153
1154 <target name="prepare-gs2build" depends="init" if="collection.building.enabled" unless="gs2build.present">
1155 <antcall target="checkout-gs2build"/>
1156 <antcall target="rename-gs2build-files"/>
1157 <antcall target="unzip-windows-packages"/>
1158 <antcall target="checkout-winbin"/>
1159 <antcall target="get-windows-binaries"/>
1160 <antcall target="delete-winbin"/>
1161 <antcall target="get-macos-extra"/>
1162 </target>
1163
1164 <target name="checkout-winbin" depends="init" if="current.os.iswindows"
1165 unless="nocvs.mode">
1166 <svn>
1167 <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin"/>
1168 </svn>
1169 </target>
1170
1171 <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nocvs.mode">
1172 <svn>
1173 <update dir="winbin"/>
1174 </svn>
1175 </target>
1176
1177 <target name="get-windows-binaries" depends="init" if="collection.building.enabled.windows">
1178 <move todir="${gs2build.home}/bin/windows" failonerror="false">
1179 <fileset dir="${basedir}/winbin/bin"/>
1180 </move>
1181 </target>
1182 <target name="delete-winbin" depends="init" if="collection.building.enabled.windows">
1183 <delete dir="${basedir}/winbin"/>
1184 </target>
1185
1186 <target name="unzip-windows-packages" depends="init" if="collection.building.enabled.windows">
1187 <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
1188 dest="${gs2build.home}/packages/windows/gdbm"/>
1189 <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
1190 dest="${gs2build.home}/packages/windows/crypt"/>
1191 <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
1192 dest="${gs2build.home}/packages/windows/expat"/>
1193 </target>
1194
1195 <!-- downloads a good XML-Parser -->
1196 <target name="get-macos-extra" depends="init" if="need.macos.extra">
1197 <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
1198 dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1199 usetimestamp="true"/>
1200 </target>
1201
1202 <!-- untars the XML-Parser. need to do this after compiling in gs2build-->
1203 <target name="install-macos-extra" depends="init,get-macos-extra" if="need.macos.extra">
1204 <!-- make sure these directories are present, otherwise chmod craps out
1205 this chmod is needed in case we are unpacking for a second time -->
1206 <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.8"/>
1207 <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.6"/>
1208 <chmod dir="${gs2build.home}/perllib/cpan/perl-5.8" perm="ug+w" includes="**"/>
1209 <chmod dir="${gs2build.home}/perllib/cpan/perl-5.6" perm="ug+w" includes="**"/>
1210 <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1211 dest="${gs2build.home}/perllib/cpan/"
1212 compression="gzip"/>
1213 </target>
1214
1215 <target name="install-indexer-files" depends="init" unless="indexers.present">
1216 <copy todir="${indexers.home}">
1217 <fileset dir="${gs2build.home}/indexers" />
1218 </copy>
1219 <chmod file="${indexers.home}/configure" perm="a+x"/>
1220 </target>
1221
1222 <target name="rename-gs2build-files" depends="rename-gs2build-files-unix,rename-gs2build-files-windows,gs2build-edit-setup-bat" if="collection.building.enabled"/>
1223
1224 <target name="gs2build-edit-setup-bat" if="collection.building.enabled.windows">
1225 <!-- we want a windows path in the setup.bat file -->
1226 <pathconvert targetos="windows" property="gs2build.home.windows">
1227 <path path="${gs2build.home}"/>
1228 </pathconvert>
1229 <move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/setup-tmp.bat">
1230 <filterset>
1231 <filter token="gsdlhome" value="${gs2build.home.windows}"/>
1232 </filterset>
1233 </move>
1234 <move file="${gs2build.home}/setup-tmp.bat" tofile="${gs2build.home}/setup.bat" />
1235 </target>
1236
1237 <target name="rename-gs2build-files-windows" if="collection.building.enabled.windows">
1238 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1239 <copy file="${gs2build-extra.home}/lib.win32.mak" tofile="${gs2build.home}/lib/win32.mak"/>
1240 <copy file="${gs2build-extra.home}/win32.mak" tofile="${gs2build.home}/win32.mak"/>
1241 <copy file="${gs2build-extra.home}/setup.bat" tofile="${gs2build.home}/setup.bat"/>
1242 </target>
1243
1244 <target name="rename-gs2build-files-unix" if="collection.building.enabled.unix">
1245 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1246 <copy file="${gs2build-extra.home}/configure" tofile="${gs2build.home}/configure"/>
1247 <chmod file="${gs2build.home}/configure" perm="a+x"/>
1248 <copy file="${gs2build-extra.home}/configure.in" tofile="${gs2build.home}/configure.in"/>
1249 <copy file="${gs2build-extra.home}/Makefile.in" tofile="${gs2build.home}/Makefile.in"/>
1250 <copy file="${gs2build-extra.home}/packages.configure" tofile="${gs2build.home}/packages/configure"/>
1251 <chmod file="${gs2build.home}/packages/configure" perm="a+x"/>
1252 <copy file="${gs2build-extra.home}/packages.Makefile.in" tofile="${gs2build.home}/packages/Makefile.in"/>
1253 <copy file="${gs2build-extra.home}/lib.Makefile.in" tofile="${gs2build.home}/lib/Makefile.in"/>
1254 </target>
1255
1256 <target name="prepare-gli" depends="init" if="collection.building.enabled" unless="gli.present">
1257 <antcall target="checkout-gli"/>
1258 </target>
1259
1260<!-- <target name="checkout-gli" depends="check-cvsroot,init" if="collection.building.enabled" unless="nocvs.mode"> -->
1261 <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nocvs.mode">
1262 <echo>checking out gli</echo>
1263 <svn>
1264 <checkout url="${svn.root}/gli/${branch.path}" destPath="gli"/>
1265 </svn>
1266 </target>
1267
1268 <target name="configure-gs2building" depends="init" if="collection.building.enabled"
1269 description="Configure only the Greenstone 2 building components">
1270 <exec executable="${gs2build.home}/configure" os="${os.linux},${os.solaris}"
1271 dir="${gs2build.home}">
1272 <arg value="--prefix=${gs2build.home}"/>
1273 </exec>
1274 <exec executable="${gs2build.home}/configure" os="${os.mac}"
1275 dir="${gs2build.home}">
1276 <arg value="--prefix=${gs2build.home}"/>
1277 <arg value="--with-gdbm=${gdbm.installed.path}"/>
1278 </exec>
1279 </target>
1280
1281 <target name="clean-gs2building" depends="init,clean-gli,clean-gs2build"
1282 description="Clean only the Greenstone 2 building components"
1283 if="collection.building.enabled"/>
1284
1285 <target name="clean-gli" depends="init" if="collection.building.enabled">
1286 <!-- gli -->
1287 <property name="gli.home" value="${basedir}/gli"/>
1288 <!-- linux -->
1289 <exec executable="clean.sh" os="${os.unix}" dir="${gli.home}"
1290 resolveExecutable="true"/>
1291 <!-- windows -->
1292 <exec executable="clean.bat" os="${os.windows}" dir="${gli.home}"
1293 resolveExecutable="true"/>
1294 </target>
1295
1296 <target name="clean-gs2build" depends="init" if="collection.building.enabled">
1297 <!-- gs2build -->
1298 <!--linux: -->
1299 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1300 <arg value="clean"/>
1301 </exec>
1302 <!-- windows: -->
1303 <!-- run the setup script -->
1304 <exec executable="${compile.windows.c++.setup}" os="${os.windows}" />
1305 <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" >
1306 <arg value="/f"/>
1307 <arg value="win32.mak"/>
1308 <arg value="clean"/>
1309 </exec>
1310 </target>
1311
1312 <target name="distclean-gs2build" depends="init" if="collection.building.enabled">
1313 <!-- gs2build -->
1314 <!--linux: -->
1315 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1316 <arg value="distclean"/>
1317 </exec>
1318 <!-- windows: -->
1319 </target>
1320
1321 <target name="compile-gs2building" depends="init,compile-gs2build,compile-gli" if="collection.building.enabled"
1322 description="Compile only the Greenstone 2 building components">
1323 </target>
1324
1325 <target name="compile-gli" depends="init" if="collection.building.enabled">
1326 <!-- gli -->
1327 <property name="gli.home" value="${basedir}/gli"/>
1328
1329 <!-- change the version number -->
1330 <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${app.version}&quot;"/>
1331 <!-- linux -->
1332 <exec executable="makegli.sh" os="${os.unix}" dir="${gli.home}" resolveExecutable="true"/>
1333 <!--remote gli-->
1334 <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}"
1335 resolveExecutable="true"/>
1336 <!-- windows -->
1337 <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}" resolveExecutable="true"/>
1338 <!--remote gli-->
1339 <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}"
1340 resolveExecutable="true"/>
1341 <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" />
1342 </target>
1343
1344 <target name="compile-gs2build" depends="init" if="collection.building.enabled">
1345 <!-- gs2build -->
1346 <!--linux: make, make install -->
1347 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1348 </exec>
1349 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1350 <arg value="install"/>
1351 </exec>
1352 <!-- run the setup script -->
1353 <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/>
1354 <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
1355 <arg value="/f"/>
1356 <arg value="win32.mak"/>
1357 </exec>
1358 <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
1359 <arg value="/f"/>
1360 <arg value="win32.mak"/>
1361 <arg value="install"/>
1362 </exec>
1363 <!-- LuceneWrapper jar file not installed by default -->
1364 <mkdir dir="${gs2build.home}/bin/java"/>
1365 <copy file="${lucene.home}/LuceneWrapper.jar" todir="${gs2build.home}/bin/java"/>
1366 <antcall target="install-gs2build-indexers-windows"/>
1367 <antcall target="install-macos-extra"/>
1368 </target>
1369
1370 <target name="install-gs2build-indexers-windows" depends="init" if="collection.building.enabled.windows">
1371 <copy todir="${gs2build.home}/bin/windows">
1372 <fileset dir="${gs2build.home}/indexers/bin">
1373 <include name="*.*"/>
1374 </fileset>
1375 </copy>
1376 </target>
1377
1378 <target name="gli" description="Run the Greenstone Librarian Interface" depends="init" if="collection.building.enabled">
1379 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux},${os.solaris}" dir="${basedir}/gli" spawn="true">
1380 <env key="gsdl3path" path="${basedir}"/>
1381 <env key="gsdlpath" path="${basedir}/gs2build"/>
1382 </exec>
1383 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.mac}" dir="${basedir}/gli" spawn="true">
1384 <env key="gsdl3path" path="${basedir}"/>
1385 <env key="gsdlpath" path="${basedir}/gs2build"/>
1386 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/>
1387 </exec>
1388 <exec executable="${basedir}/gli/gli4gs3.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true">
1389 <env key="GSDL3PATH" path="${basedir}"/>
1390 <env key="GSDLPATH" path="${basedir}/gs2build"/>
1391 </exec>
1392 <echo>Running GLI from Ant means that you don't get to see any of the terminal output. If you have problems with GLI and want to see the output, please run the script gli4gs3.sh/bat from the greenstone3/gli directory.
1393 </echo>
1394 </target>
1395
1396
1397<!-- ======================== TESTING Targets ========================= -->
1398
1399 <target name="test" description="Run the (incomplete) JUnit test suite "
1400 depends="init">
1401 <mkdir dir="${basedir}/test"/>
1402 <junit printsummary="withOutAndErr"
1403 errorproperty="test.failed"
1404 failureproperty="test.failed"
1405 fork="${junit.fork}">
1406 <formatter type="plain"/>
1407 <classpath>
1408 <pathelement location="${build.home}/gsdl3test.jar"/>
1409 <path refid="compile.classpath"/>
1410 </classpath>
1411 <test name="${testcase}" if="testcase"/>
1412 <batchtest todir="${basedir}/test" unless="testcase">
1413 <fileset dir="${build.home}"
1414 includes="**/*Test.class"
1415 />
1416 </batchtest>
1417 </junit>
1418 <echo>
1419 *********************************************
1420 Test output can be found in directory 'test'
1421 *********************************************
1422 </echo>
1423 </target>
1424 <target name="checkout-flax" description="check out flax source code from another repository">
1425 <echo>checking out flax ...</echo>
1426 <mkdir dir="${basedir}/src/java/org/flax"/>
1427 <mkdir dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
1428 <mkdir dir="${basedir}/web/WEB-INF/classes/flax"/>
1429 <mkdir dir="${basedir}/web/interfaces/flax"/>
1430 <mkdir dir="${basedir}/web/sites/flax"/>
1431 <mkdir dir="${basedir}/flax-resources"/>
1432 <svn>
1433 <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/flax/"
1434 destPath="${basedir}/src/java/org/flax"/>
1435 <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/greenstone/gsdl3/flax/"
1436 destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
1437 <checkout url="${flax.svn.root}/flax1.0/trunk/web/WEB-INF/classes/flax/"
1438 destPath="${basedir}/web/WEB-INF/classes/flax"/>
1439 <checkout url="${flax.svn.root}/flax1.0/trunk/web/interfaces/flax/"
1440 destPath="${basedir}/web/interfaces/flax"/>
1441 <checkout url="${flax.svn.root}/flax1.0/trunk/web/sites/flax/"
1442 destPath="${basedir}/web/sites/flax"/>
1443 <checkout url="${flax.svn.root}/flax1.0/trunk/flax-resources"
1444 destPath="${basedir}/flax-resources"/>
1445 </svn>
1446 <move file="${basedir}/web/WEB-INF/web.xml" tofile="${basedir}/web/WEB-INF/web.xml.greenstone3backup"/>
1447 <antcall target="flax-copy-files" />
1448
1449 <property name="coll.dir" value="${basedir}/web/sites/flax/collect"/>
1450 <unzip dest="${coll.dir}">
1451 <fileset dir="${coll.dir}">
1452 <include name="*.zip"/>
1453 </fileset>
1454 </unzip>
1455 <delete>
1456 <fileset dir="${coll.dir}" includes="*.zip"/>
1457 </delete>
1458 </target>
1459 <target name="update-flax" description="update flax from repository">
1460 <echo>updating flax ...</echo>
1461 <svn>
1462 <update dir="${basedir}/src/java/org/flax"/>
1463 <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
1464 <update dir="${basedir}/web/WEB-INF/classes/flax"/>
1465 <update dir="${basedir}/web/interfaces/flax"/>
1466 <update dir="${basedir}/web/sites/flax"/>
1467 <svncall target="flax-copy-files" />
1468 </svn>
1469 </target>
1470
1471 <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories">
1472 <echo>copying flax files ...</echo>
1473 <copy file="${basedir}/web/WEB-INF/classes/flax/web.xml" todir="${basedir}/web/WEB-INF" overwrite="true" />
1474 <!-- A configuration file containing web service binding information for the axis engine -->
1475 <copy file="${basedir}/web/WEB-INF/classes/flax/server-config.wsdd" todir="${basedir}/web/WEB-INF" overwrite="true" />
1476 <copy file="${basedir}/flax-resources/flax-build.xml" todir="${basedir}" overwrite="true" />
1477
1478 </target>
1479 <!--install gdbm stuff -->
1480
1481 <!-- downloads the gdbm library -->
1482 <target name="prepare-gdbm" depends="init" if="install.gdbm">
1483 <get src="http://www.greenstone.org/gs3files/gdbm-1.8.3.tar.gz"
1484 dest="${src.packages.home}/gdbm-1.8.3.tar.gz" usetimestamp="true"/>
1485 <untar compression= "gzip" src="${src.packages.home}/gdbm-1.8.3.tar.gz" dest="${src.packages.home}" />
1486 <chmod dir="${src.packages.home}/gdbm-1.8.3" perm="ugo+wrx" includes="**" />
1487 <antcall target="configure-gdbm" />
1488 <antcall target="compile-gdbm" />
1489 </target>
1490
1491 <target name="configure-gdbm" if="install.gdbm">
1492 <echo>
1493 Configuring GDBM
1494 </echo>
1495 <exec executable="${gdbm.home}/configure" os="${os.mac},${os.unix}"
1496 dir="${gdbm.home}">
1497 <arg value="--prefix=${gdbm.home}"/>
1498 </exec>
1499 </target>
1500
1501 <target name="clean-gdbm" depends="init" if="install.gdbm">
1502 <echo>clean GDBM</echo>
1503 <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}" >
1504 <arg value="clean"/>
1505 </exec>
1506 </target>
1507
1508 <target name="compile-gdbm" depends="init" if="install.gdbm">
1509 <echo>compile GDBM</echo>
1510 <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}"/>
1511 <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}">
1512 <arg value="install"/>
1513 </exec>
1514 </target>
1515
1516
1517
1518</project>
1519
1520
Note: See TracBrowser for help on using the repository browser.