source: release-kits/lirk2/ant-scripts/compile.xml@ 16457

Last change on this file since 16457 was 16457, checked in by oranfry, 16 years ago

no longer have to check out indexers explicitly

File size: 4.1 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk2-compile" default="compile">
3
4 <target name="compile">
5
6 <!-- checkout -->
7 <addressedcall target="checkout-gsdl-indexers-gli" />
8
9 <!-- configure -->
10 <addressedcall target="add-static-to-configure-in"/>
11 <addressedcall target="set-environment-in-packages-configure"/>
12 <addressedcall target="run-configure"/>
13 <addressedcall target="makefiles-add-static"/>
14
15 <!-- make -->
16 <addressedcall target="run-make"/>
17 <!-- <addressedcall target="fix-wget"/> upgraded wget, mightn't need to do this now -->
18 <addressedcall target="run-make-install"/>
19 <addressedcall target="copy-library-oai"/>
20 <addressedcall target="strip-execs"/>
21
22 <!-- build collections -->
23 <addressedcall target="build-demo-collection" />
24
25 </target>
26
27 <target name="checkout-gsdl-indexers-gli">
28 <if><bool><istrue value="${execute}"/></bool>
29 <svn>
30 <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/>
31 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
32 </svn>
33 </if>
34 </target>
35
36 <target name="add-static-to-configure-in">
37 <if><bool><istrue value="${execute}"/></bool>
38 <rsr file="${basedir}/gsdl/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
39 <exec dir="${basedir}/gsdl" executable="autoconf" output="${basedir}/gsdl/configure"><arg value="configure.in"/></exec>
40 </if>
41 </target>
42
43 <target name="set-environment-in-packages-configure">
44 <if><bool><istrue value="${execute}"/></bool>
45 <rsr file="${basedir}/gsdl/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
46 </if>
47 </target>
48
49 <target name="run-configure">
50 <if><bool><istrue value="${execute}"/></bool>
51 <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/configure">
52 <env key="LDFLAGS" value="-static"/>
53 </exec>
54 </if>
55 </target>
56
57 <target name="makefiles-add-static">
58 <if><bool><istrue value="${execute}"/></bool>
59 <rsr file="${basedir}/gsdl/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
60 <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
61 <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
62 <rsr file="${basedir}/gsdl/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static" />
63 </if>
64 </target>
65
66 <target name="run-make">
67 <if><bool><istrue value="${execute}"/></bool>
68 <exec dir="${basedir}/gsdl" executable="make"/>
69 </if>
70 </target>
71
72 <target name="fix-wget">
73 <if><bool><istrue value="${execute}"/></bool>
74 <delete file="${basedir}/gsdl/packages/wget/wget-1.9/src/wget"/>
75 <exec dir="${basedir}/gsdl/packages/wget/wget-1.9/src" executable="gcc"><arg line="-O2 -Wall -Wno-implicit -o wget cmpt.o connect.o convert.o cookies.o ftp.o ftp-basic.o ftp-ls.o ftp-opie.o hash.o headers.o host.o html-parse.o html-url.o http.o init.o log.o main.o gen-md5.o netrc.o progress.o rbuf.o recur.o res.o retr.o safe-ctype.o snprintf.o gen_sslfunc.o url.o utils.o version.o -lssl -lcrypto -ldl -static"/></exec>
76 </if>
77 </target>
78
79
80 <target name="run-make-install">
81 <if><bool><istrue value="${execute}"/></bool>
82 <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec>
83 </if>
84 </target>
85
86 <target name="copy-library-oai">
87 <if><bool><istrue value="${execute}"/></bool>
88 <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/linux/library"/></exec>
89 <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/linux/oaiserver"/></exec>
90 </if>
91 </target>
92
93 <target name="strip-execs">
94 <if><bool><istrue value="${execute}"/></bool>
95 <exec dir="${basedir}/gsdl/bin/linux" executable="find">
96 <arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
97 </exec>
98 </if>
99 </target>
100
101 <target name="build-demo-collection">
102 <if><bool><istrue value="${execute}"/></bool>
103 <exec dir="${basedir}/gsdl" executable="${lirk2.home}/resources/build-demo.sh"/>
104 </if>
105 </target>
106
107
108
109</project>
Note: See TracBrowser for help on using the repository browser.