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

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

make things compile statically, and don't bother tweaking wget anymore as the new version compiles fine

File size: 4.2 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}/indexers/${branch.path}" destPath="${basedir}/gsdl/indexers"/>
32 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
33 </svn>
34 </if>
35 </target>
36
37 <target name="add-static-to-configure-in">
38 <if><bool><istrue value="${execute}"/></bool>
39 <rsr file="${basedir}/gsdl/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
40 <exec dir="${basedir}/gsdl" executable="autoconf" output="${basedir}/gsdl/configure"><arg value="configure.in"/></exec>
41 </if>
42 </target>
43
44 <target name="set-environment-in-packages-configure">
45 <if><bool><istrue value="${execute}"/></bool>
46 <rsr file="${basedir}/gsdl/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
47 </if>
48 </target>
49
50 <target name="run-configure">
51 <if><bool><istrue value="${execute}"/></bool>
52 <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/configure">
53 <env key="LDFLAGS" value="-static"/>
54 </exec>
55 </if>
56 </target>
57
58 <target name="makefiles-add-static">
59 <if><bool><istrue value="${execute}"/></bool>
60 <rsr file="${basedir}/gsdl/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
61 <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
62 <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
63 <rsr file="${basedir}/gsdl/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static" />
64 </if>
65 </target>
66
67 <target name="run-make">
68 <if><bool><istrue value="${execute}"/></bool>
69 <exec dir="${basedir}/gsdl" executable="make"/>
70 </if>
71 </target>
72
73 <target name="fix-wget">
74 <if><bool><istrue value="${execute}"/></bool>
75 <delete file="${basedir}/gsdl/packages/wget/wget-1.9/src/wget"/>
76 <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>
77 </if>
78 </target>
79
80
81 <target name="run-make-install">
82 <if><bool><istrue value="${execute}"/></bool>
83 <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec>
84 </if>
85 </target>
86
87 <target name="copy-library-oai">
88 <if><bool><istrue value="${execute}"/></bool>
89 <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/linux/library"/></exec>
90 <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/linux/oaiserver"/></exec>
91 </if>
92 </target>
93
94 <target name="strip-execs">
95 <if><bool><istrue value="${execute}"/></bool>
96 <exec dir="${basedir}/gsdl/bin/linux" executable="find">
97 <arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
98 </exec>
99 </if>
100 </target>
101
102 <target name="build-demo-collection">
103 <if><bool><istrue value="${execute}"/></bool>
104 <exec dir="${basedir}/gsdl" executable="${lirk2.home}/resources/build-demo.sh"/>
105 </if>
106 </target>
107
108
109
110</project>
Note: See TracBrowser for help on using the repository browser.