root/branches/rk-oran/lirk2/ant-scripts/compile.xml @ 18926

Revision 18926, 3.8 KB (checked in by oranfry, 12 years ago)

passing in the script format param to compile-gli

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="drop-in-docs"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
9        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
10        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
11
12        <!-- configure -->
13        <antcall target="add-static-to-configure-in"/>
14        <antcall target="set-environment-in-packages-configure"/>
15        <antcall target="run-configure"/>
16        <antcall target="makefiles-add-static"/>
17
18        <!-- make common-src and reconfigure -->
19        <!-- this is a workaround to a problem with the gsdl build code -->
20        <!-- expat needs to be compiled before the perl XML Parser is configured -->
21        <antcall target="make-common-src"/>
22        <antcall target="run-configure"/>
23
24        <!-- make -->
25        <antcall target="run-make"/>
26        <antcall target="run-make-install"/>
27        <antcall target="run-make-apache-for-dist"/>
28        <antcall target="strip-execs"/>
29
30        <!-- gli -->
31        <antcall target="compile-gli">
32            <param name="script.format"  value="sh"/>
33            <param name="glibasedir"  value="${basedir}/compiled/gli"/>
34            <param name="gsdlbasedir" value="${basedir}/compiled"/>
35        </antcall>
36
37        <!-- uninstaller -->
38        <antcall target="compile-uninstaller" /> <!-- from init -->
39
40        <!-- build collections -->
41        <antcall target="build-demo-collection" />
42
43    </target>
44
45    <target name="add-static-to-configure-in">
46        <rsr
47            file="${basedir}/compiled/configure.in"
48            pattern="^LDFLAGS=.*$"
49            replacement="LDFLAGS=-static" />
50        <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure"><arg value="configure.in"/></exec>
51    </target>
52
53    <target name="set-environment-in-packages-configure">
54        <rsr
55            file="${basedir}/compiled/common-src/packages/configure"
56            pattern="^ENVIRONMENT=.*$"
57            replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
58        <rsr
59            file="${basedir}/compiled/build-src/packages/configure"
60            pattern="^ENVIRONMENT=.*$"
61            replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
62    </target>
63
64    <target name="run-configure">
65        <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
66            <arg line="--enable-apache-httpd"/>
67            <env key="LDFLAGS" value="-static"/>
68        </exec>
69    </target>
70
71    <target name="makefiles-add-static">
72        <rsr
73            file="${basedir}/compiled/build-src/packages/wv/wv-gs/Makefile"
74            pattern="^LDFLAGS =.*$"
75            replacement="LDFLAGS = -static" />
76        <rsr
77            file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile"
78            pattern="^LDFLAGS =.*$"
79            replacement="LDFLAGS = -static" />
80        <rsr
81            file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile"
82            pattern="^LDFLAGS =.*$"
83            replacement="LDFLAGS = -static" />
84        <rsr
85            file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile"
86            pattern="(-o rtftohtml.{2}EXEEXT.{1})"
87            replacement="$1 -static" />
88    </target>
89
90    <target name="run-make">
91        <exec dir="${basedir}/compiled" executable="make" failonerror="true"/>
92    </target>
93
94
95    <target name="run-make-install">
96        <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec>
97    </target>
98
99    <target name="run-make-apache-for-dist">
100        <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec>
101    </target>
102
103    <target name="strip-execs">
104        <exec dir="${basedir}/compiled/bin/linux" executable="find" failonerror="true">
105            <arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
106        </exec>
107    </target>
108
109    <target name="build-demo-collection">
110        <exec dir="${basedir}/compiled" executable="${lirk2.home}/resources/build-demo.sh" failonerror="true"/>
111    </target>
112
113
114</project>
Note: See TracBrowser for help on using the browser.