root/release-kits/mark2/ant-scripts/compile.xml @ 18666

Revision 18666, 3.3 KB (checked in by oranfry, 11 years ago)

changes to build the apache httpd and put it into the release (lirk2 and mark2)

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="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
9       
10        <!-- configure -->
11        <antcall target="run-configure"/>
12        <antcall target="tweak-makefiles"/>
13
14        <!-- make -->
15        <antcall target="run-make"/>
16        <antcall target="run-make-install"/>
17        <antcall target="copy-library-oai"/>
18        <antcall target="strip-execs"/>
19
20        <!-- uninstaller -->
21        <antcall target="compile-uninstaller" /> <!-- from rk2-targets -->
22
23        <!-- build collections -->
24        <antcall target="build-demo-collection" />
25
26    </target>
27
28    <target name="checkout-gsdl-gli">
29        <svn javahl="false">
30            <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
31            <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
32        </svn>
33    </target>
34
35    <target name="run-configure">
36        <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure">
37            <arg value="--with-gdbm=${mark2.home}/mac/${processor}/gdbm"/>
38            <arg value="--enable-apache-httpd"/>
39        </exec>
40    </target>
41
42    <target name="tweak-makefiles">
43        <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" />
44        <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" />
45        <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" />
46        <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" />
47        <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" />
48        <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" />
49    </target>
50
51    <target name="run-make">
52        <exec dir="${basedir}/compiled" executable="make"/>
53    </target>
54
55    <target name="run-make-install">
56        <exec dir="${basedir}/compiled" executable="make"><arg value="install"/></exec>
57    </target>
58
59    <target name="copy-library-oai">
60        <exec executable="mv"><arg line="${basedir}/compiled/cgi-bin/library ${basedir}/compiled/bin/darwin/library"/></exec>
61        <exec executable="mv"><arg line="${basedir}/compiled/cgi-bin/oaiserver ${basedir}/compiled/bin/darwin/oaiserver"/></exec>
62    </target>
63
64    <target name="strip-execs">
65        <exec dir="${basedir}/compiled/bin/darwin" executable="find">
66            <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
67        </exec>
68    </target>
69
70    <target name="build-demo-collection">
71        <exec dir="${basedir}/compiled" executable="${mark2.home}/resources/build-demo.sh"/>
72    </target>
73
74</project>
Note: See TracBrowser for help on using the browser.