root/branches/rk-oran/mark2/ant-scripts/compile.xml @ 18907

Revision 18907, 3.5 KB (checked in by oranfry, 12 years ago)

partially tested, partially complete changes for release kits to create dist based on the compiled copy of greenstone

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="mark2-compile" default="compile">
3
4    <target name="compile">
5
6        <!-- checkout -->
7        <antcall target="checkout-gsdl-gli" />
8        <antcall target="drop-in-docs"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
9        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
10        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
11       
12        <!-- configure -->
13        <antcall target="run-configure"/>
14        <antcall target="tweak-makefiles"/>
15
16        <!-- make common-src and reconfigure -->
17        <!-- this is a workaround to a problem with the gsdl build code -->
18        <!-- expat needs to be compiled before the perl XML Parser is configured -->
19        <antcall target="make-common-src"/>
20        <antcall target="run-configure"/>
21
22        <!-- make -->
23        <antcall target="run-make"/>
24        <antcall target="run-make-install"/>
25        <antcall target="run-make-apache-for-dist"/>
26        <antcall target="strip-execs"/>
27
28        <!-- gli -->
29        <antcall target="compile-gli">
30            <param name="glibasedir"  value="${basedir}/compiled/gli"/>
31            <param name="gsdlbasedir" value="${basedir}/compiled"/>
32        </antcall>
33
34        <!-- uninstaller -->
35        <antcall target="compile-uninstaller" /> <!-- from rk2-targets -->
36
37        <!-- build collections -->
38        <antcall target="build-demo-collection" />
39
40    </target>
41
42    <target name="run-configure">
43        <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure">
44            <arg value="--with-gdbm=${mark2.home}/mac/${processor}/gdbm"/>
45            <arg value="--enable-apache-httpd"/>
46        </exec>
47    </target>
48
49    <target name="tweak-makefiles">
50        <rsr file="${basedir}/compiled/runtime-src/src/recpt/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
51        <rsr file="${basedir}/compiled/runtime-src/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
52        <rsr file="${basedir}/compiled/common-src/src/gdbmedit/db2txt/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
53        <rsr file="${basedir}/compiled/common-src/src/gdbmedit/txt2db/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
54        <rsr file="${basedir}/compiled/runtime-src/src/recpt/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3" />
55        <rsr file="${basedir}/compiled/runtime-src/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3" />
56    </target>
57
58    <target name="run-make">
59        <exec dir="${basedir}/compiled" executable="make"/>
60    </target>
61
62    <target name="run-make-install">
63        <exec dir="${basedir}/compiled" executable="make"><arg value="install"/></exec>
64    </target>
65
66    <target name="run-make-apache-for-dist">
67        <exec dir="${basedir}/compiled" executable="make"><arg value="apache-for-dist"/></exec>
68    </target>
69
70    <target name="strip-execs">
71        <exec dir="${basedir}/compiled/bin/darwin" executable="find">
72            <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
73        </exec>
74    </target>
75
76    <target name="build-demo-collection">
77        <exec dir="${basedir}/compiled" executable="${mark2.home}/resources/build-demo.sh"/>
78    </target>
79
80</project>
Note: See TracBrowser for help on using the browser.