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

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

fail if the compilation fails

File size: 3.5 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 <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="add-static-to-configure-in"/>
12 <antcall target="set-environment-in-packages-configure"/>
13 <antcall target="run-configure"/>
14 <antcall target="makefiles-add-static"/>
15
16 <!-- make -->
17 <antcall target="run-make"/>
18 <antcall target="run-make-install"/>
19 <antcall target="copy-library-oai"/>
20 <antcall target="strip-execs"/>
21
22 <!-- uninstaller -->
23 <antcall target="compile-uninstaller" /> <!-- from rk2-targets -->
24
25 <!-- build collections -->
26 <antcall target="build-demo-collection" />
27
28 </target>
29
30 <target name="checkout-gsdl-gli">
31 <svn>
32 <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
33 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
34 </svn>
35 </target>
36
37 <target name="add-static-to-configure-in">
38 <rsr
39 file="${basedir}/compiled/configure.in"
40 pattern="^LDFLAGS=.*$"
41 replacement="LDFLAGS=-static" />
42 <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure"><arg value="configure.in"/></exec>
43 </target>
44
45 <target name="set-environment-in-packages-configure">
46 <rsr
47 file="${basedir}/compiled/common-src/packages/configure"
48 pattern="^ENVIRONMENT=.*$"
49 replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
50 <rsr
51 file="${basedir}/compiled/build-src/packages/configure"
52 pattern="^ENVIRONMENT=.*$"
53 replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
54 </target>
55
56 <target name="run-configure">
57 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
58 <arg line="--enable-apache-httpd"/>
59 <env key="LDFLAGS" value="-static"/>
60 </exec>
61 </target>
62
63 <target name="makefiles-add-static">
64 <rsr
65 file="${basedir}/compiled/build-src/packages/wv/wv-gs/Makefile"
66 pattern="^LDFLAGS =.*$"
67 replacement="LDFLAGS = -static" />
68 <rsr
69 file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile"
70 pattern="^LDFLAGS =.*$"
71 replacement="LDFLAGS = -static" />
72 <rsr
73 file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile"
74 pattern="^LDFLAGS =.*$"
75 replacement="LDFLAGS = -static" />
76 <rsr
77 file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile"
78 pattern="(-o rtftohtml.{2}EXEEXT.{1})"
79 replacement="$1 -static" />
80 </target>
81
82 <target name="run-make">
83 <exec dir="${basedir}/compiled" executable="make" failonerror="true"/>
84 </target>
85
86
87 <target name="run-make-install">
88 <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec>
89 </target>
90
91 <target name="copy-library-oai">
92 <exec executable="mv" failonerror="true"><arg line="${basedir}/compiled/cgi-bin/library.cgi ${basedir}/compiled/bin/linux/library.cgi"/></exec>
93 <exec executable="mv" failonerror="true"><arg line="${basedir}/compiled/cgi-bin/oaiserver.cgi ${basedir}/compiled/bin/linux/oaiserver.cgi"/></exec>
94 </target>
95
96 <target name="strip-execs">
97 <exec dir="${basedir}/compiled/bin/linux" executable="find" failonerror="true">
98 <arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
99 </exec>
100 </target>
101
102 <target name="build-demo-collection">
103 <exec dir="${basedir}/compiled" executable="${lirk2.home}/resources/build-demo.sh" failonerror="true"/>
104 </target>
105
106
107
108</project>
Note: See TracBrowser for help on using the repository browser.