source: gs2-extensions/tdb/trunk/build.xml@ 30347

Last change on this file since 30347 was 30276, checked in by jmt12, 9 years ago

Lots of work to get this working properly in GS3. Includes generating java classes, manifest, and jar for TDBJava and then placing it in a different folder (web/WEB-INF/lib) than gdbmjava.jar (lib/jni). Broke a bunch of larger targets into several steps - especially where one step is expensive

File size: 3.5 KB
Line 
1<project name="tdb" basedir="." default="compile">
2 <echo>os.name: ${os.name}</echo>
3 <property environment="env"/>
4 <!-- Eventually install.lib needs to be OS aware -->
5 <property name="gsdl3home" value="${env.GSDL3SRCHOME}" />
6 <property name="classdir" value="${basedir}/build/classes"/>
7 <property name="installdir" value="${basedir}/linux"/>
8 <property name="install.lib" value="${basedir}/linux/lib"/>
9 <property name="jni.lib" value="${gsdl3home}/lib/jni"/>
10 <property name="web.lib" value="${gsdl3home}/web/WEB-INF/lib"/>
11
12 <path id="gsdl3jars">
13 <fileset dir="${web.lib}" includes="**/*.jar" />
14 </path>
15
16 <target name="help">
17 <echo>Targets:</echo>
18 <echo />
19 <echo> help - this message</echo>
20 <echo> compile - configure and compile TDB libraries, binaries, and</echo>
21 <echo> drivers</echo>
22 <echo> install - add TDB support to Greenstone2/Greenstone3</echo>
23 <echo> install-tdbjava - install just the TBDJava support into Greenstone3</echo>
24 <echo> uninstall - remove TDB support from Greenstone2/Greenstone3</echo>
25 <echo> clean - uninstall and remove compiled libraries, binaries,</echo>
26 <echo> and drivers</echo>
27 <echo />
28 </target>
29
30 <target name="compile">
31 <echo message=" * Configure and compile TDB" />
32 <exec executable="/bin/bash">
33 <arg value="-c"/>
34 <arg value="source setup.bash ; ./CASCADE-MAKE.sh"/>
35 </exec>
36 <!-- Compile TDBJava within Ant -->
37 <mkdir dir="${classdir}" />
38 <javac srcdir="src/java" destdir="${classdir}" classpathref="gsdl3jars"
39 includeantruntime="false" />
40 <jar destfile="${install.lib}/TDBJava.jar" basedir="${classdir}">
41 <manifest>
42 <attribute name="Class-Path" value="gsdl3.jar log4j-1.2.8.jar" />
43 </manifest>
44 </jar>
45 </target>
46
47 <target name="clean" depends="uninstall">
48 <exec executable="/bin/bash">
49 <arg value="-c"/>
50 <arg value="./CASCADE-MAKE.sh distclean"/>
51 </exec>
52 <delete dir="${installdir}"/>
53 </target>
54
55 <target name="install-tdbjava">
56 <echo>Install the TDBJava files into ${jni.lib}</echo>
57 <copy file="${install.lib}/TDBJava.jar" todir="${web.lib}"/>
58 <copy file="${install.lib}/libTDBJava.so" todir="${jni.lib}"/>
59 <copy file="${install.lib}/libtdb.so" todir="${jni.lib}"/>
60 </target>
61
62 <target name="install" depends="compile,install-tdbjava">
63 <echo>Enable TDB support in Greenstone2 build library</echo>
64 <exec executable="/bin/bash">
65 <arg value="-c"/>
66 <arg value="source setup.bash ; ./enable_tdb.sh "/>
67 </exec>
68 <echo>Reconfigure, recompile, and reinstall Greenstone2 build library"</echo>
69 <subant>
70 <fileset dir="${gsdl3home}" includes="build.xml" />
71 <target name="configure-common-src" />
72 <target name="compile-common-src" />
73 </subant>
74 </target>
75
76 <target name="uninstall">
77 <echo>Remove TDB support in Greenstone2 build library</echo>
78 <exec executable="/bin/bash">
79 <arg value="-c"/>
80 <arg value="source setup.bash ; ./disable_tdb.sh "/>
81 </exec>
82 <echo>Reconfigure, recompile, and reinstall Greenstone2 build library"</echo>
83 <subant>
84 <fileset dir="${gsdl3home}" includes="build.xml" />
85 <target name="configure-common-src" />
86 <target name="compile-common-src" />
87 </subant>
88 <echo>Remove the TDBJava files from Greenstone3/lib/jni</echo>
89 <delete file="${lib.jni}/TDBJava.jar" />
90 <delete file="${lib.jni}/libTDBJava.so" />
91 <delete file="${lib.jni}/libtdb.so" />
92 </target>
93</project>
Note: See TracBrowser for help on using the repository browser.