[30246] | 1 | <project name="tdb" basedir="." default="compile">
|
---|
| 2 | <echo>os.name: ${os.name}</echo>
|
---|
[23905] | 3 | <property environment="env"/>
|
---|
[30246] | 4 | <!-- Eventually install.lib needs to be OS aware -->
|
---|
[30259] | 5 | <property name="gsdl3home" value="${env.GSDL3SRCHOME}" />
|
---|
[30276] | 6 | <property name="classdir" value="${basedir}/build/classes"/>
|
---|
[30246] | 7 | <property name="installdir" value="${basedir}/linux"/>
|
---|
| 8 | <property name="install.lib" value="${basedir}/linux/lib"/>
|
---|
[30276] | 9 | <property name="jni.lib" value="${gsdl3home}/lib/jni"/>
|
---|
| 10 | <property name="web.lib" value="${gsdl3home}/web/WEB-INF/lib"/>
|
---|
[30246] | 11 |
|
---|
[30276] | 12 | <path id="gsdl3jars">
|
---|
| 13 | <fileset dir="${web.lib}" includes="**/*.jar" />
|
---|
| 14 | </path>
|
---|
| 15 |
|
---|
[30259] | 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>
|
---|
[30276] | 23 | <echo> install-tdbjava - install just the TBDJava support into Greenstone3</echo>
|
---|
[30259] | 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 |
|
---|
[30246] | 30 | <target name="compile">
|
---|
[30259] | 31 | <echo message=" * Configure and compile TDB" />
|
---|
[23905] | 32 | <exec executable="/bin/bash">
|
---|
| 33 | <arg value="-c"/>
|
---|
| 34 | <arg value="source setup.bash ; ./CASCADE-MAKE.sh"/>
|
---|
| 35 | </exec>
|
---|
[30276] | 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>
|
---|
[23905] | 45 | </target>
|
---|
| 46 |
|
---|
[30246] | 47 | <target name="clean" depends="uninstall">
|
---|
[23905] | 48 | <exec executable="/bin/bash">
|
---|
| 49 | <arg value="-c"/>
|
---|
| 50 | <arg value="./CASCADE-MAKE.sh distclean"/>
|
---|
| 51 | </exec>
|
---|
| 52 | <delete dir="${installdir}"/>
|
---|
| 53 | </target>
|
---|
[30246] | 54 |
|
---|
[30276] | 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">
|
---|
[30259] | 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>
|
---|
[30246] | 74 | </target>
|
---|
| 75 |
|
---|
| 76 | <target name="uninstall">
|
---|
[30259] | 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>
|
---|
[30246] | 89 | <delete file="${lib.jni}/TDBJava.jar" />
|
---|
| 90 | <delete file="${lib.jni}/libTDBJava.so" />
|
---|
| 91 | <delete file="${lib.jni}/libtdb.so" />
|
---|
| 92 | </target>
|
---|
[23905] | 93 | </project>
|
---|