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 line="--with-gdbm=${mark2.home}/mac/${processor}/gdbm"/>
|
---|
38 | </exec>
|
---|
39 | </target>
|
---|
40 |
|
---|
41 | <target name="tweak-makefiles">
|
---|
42 | <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" />
|
---|
43 | <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" />
|
---|
44 | <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" />
|
---|
45 | <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" />
|
---|
46 | <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" />
|
---|
47 | <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" />
|
---|
48 | </target>
|
---|
49 |
|
---|
50 | <target name="run-make">
|
---|
51 | <exec dir="${basedir}/compiled" executable="make"/>
|
---|
52 | </target>
|
---|
53 |
|
---|
54 | <target name="run-make-install">
|
---|
55 | <exec dir="${basedir}/compiled" executable="make"><arg value="install"/></exec>
|
---|
56 | </target>
|
---|
57 |
|
---|
58 | <target name="copy-library-oai">
|
---|
59 | <exec executable="mv"><arg line="${basedir}/compiled/cgi-bin/library ${basedir}/compiled/bin/darwin/library"/></exec>
|
---|
60 | <exec executable="mv"><arg line="${basedir}/compiled/cgi-bin/oaiserver ${basedir}/compiled/bin/darwin/oaiserver"/></exec>
|
---|
61 | </target>
|
---|
62 |
|
---|
63 | <target name="strip-execs">
|
---|
64 | <exec dir="${basedir}/compiled/bin/darwin" executable="find">
|
---|
65 | <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} ;"/>
|
---|
66 | </exec>
|
---|
67 | </target>
|
---|
68 |
|
---|
69 | <target name="build-demo-collection">
|
---|
70 | <exec dir="${basedir}/compiled" executable="${mark2.home}/resources/build-demo.sh"/>
|
---|
71 | </target>
|
---|
72 |
|
---|
73 | </project>
|
---|