source: release-kits/mark2/ant-scripts/compile.xml@ 18854

Last change on this file since 18854 was 18854, checked in by oranfry, 15 years ago

getting apache going for mac too

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