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

Last change on this file since 30271 was 30259, checked in by jmt12, 9 years ago

Extending the install and uninstall targets to correctly call the respective enable/disable script and recompile the gs2build common-src library on change

File size: 2.8 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="installdir" value="${basedir}/linux"/>
7 <property name="install.lib" value="${basedir}/linux/lib"/>
8 <property name="lib.jni" value="${gsdl3home}/lib/jni"/>
9
10 <target name="help">
11 <echo>Targets:</echo>
12 <echo />
13 <echo> help - this message</echo>
14 <echo> compile - configure and compile TDB libraries, binaries, and</echo>
15 <echo> drivers</echo>
16 <echo> install - add TDB support to Greenstone2/Greenstone3</echo>
17 <echo> uninstall - remove TDB support from Greenstone2/Greenstone3</echo>
18 <echo> clean - uninstall and remove compiled libraries, binaries,</echo>
19 <echo> and drivers</echo>
20 <echo />
21 </target>
22
23 <target name="compile">
24 <echo message=" * Configure and compile TDB" />
25 <exec executable="/bin/bash">
26 <arg value="-c"/>
27 <arg value="source setup.bash ; ./CASCADE-MAKE.sh"/>
28 </exec>
29 </target>
30
31 <target name="clean" depends="uninstall">
32 <exec executable="/bin/bash">
33 <arg value="-c"/>
34 <arg value="./CASCADE-MAKE.sh distclean"/>
35 </exec>
36 <delete dir="${installdir}"/>
37 </target>
38
39 <target name="install" depends="compile">
40 <echo>Enable TDB support in Greenstone2 build library</echo>
41 <exec executable="/bin/bash">
42 <arg value="-c"/>
43 <arg value="source setup.bash ; ./enable_tdb.sh "/>
44 </exec>
45 <echo>Reconfigure, recompile, and reinstall Greenstone2 build library"</echo>
46 <subant>
47 <fileset dir="${gsdl3home}" includes="build.xml" />
48 <target name="configure-common-src" />
49 <target name="compile-common-src" />
50 </subant>
51 <echo>Install the TDBJava files into Greenstone3/lib/jni</echo>
52 <copy file="${install.lib}/TDBJava.jar" todir="${lib.jni}"/>
53 <copy file="${install.lib}/libTDBJava.so" todir="${lib.jni}"/>
54 <copy file="${install.lib}/libtdb.so" todir="${lib.jni}"/>
55 </target>
56
57 <target name="uninstall">
58 <echo>Remove TDB support in Greenstone2 build library</echo>
59 <exec executable="/bin/bash">
60 <arg value="-c"/>
61 <arg value="source setup.bash ; ./disable_tdb.sh "/>
62 </exec>
63 <echo>Reconfigure, recompile, and reinstall Greenstone2 build library"</echo>
64 <subant>
65 <fileset dir="${gsdl3home}" includes="build.xml" />
66 <target name="configure-common-src" />
67 <target name="compile-common-src" />
68 </subant>
69 <echo>Remove the TDBJava files from Greenstone3/lib/jni</echo>
70 <delete file="${lib.jni}/TDBJava.jar" />
71 <delete file="${lib.jni}/libTDBJava.so" />
72 <delete file="${lib.jni}/libtdb.so" />
73 </target>
74</project>
Note: See TracBrowser for help on using the repository browser.