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

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

changes to the way binaries are stored in the cgi-bin and bin/(os) directories

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