root/release-kits/lirk2/ant-scripts/compile.xml @ 16629

Revision 16629, 3.6 KB (checked in by oranfry, 11 years ago)

changes after gsdl divided into common, build and runtime

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-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="run-make-install"/>
18        <addressedcall target="copy-library-oai"/>
19        <addressedcall target="strip-execs"/>
20
21        <!-- build collections -->
22        <addressedcall target="build-demo-collection" />
23
24    </target>
25
26    <target name="checkout-gsdl-gli">
27        <if><bool><istrue value="${execute}"/></bool>
28            <svn>
29                <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/>
30                <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
31            </svn>
32        </if>
33    </target>
34
35    <target name="add-static-to-configure-in">
36        <if><bool><istrue value="${execute}"/></bool>
37            <rsr file="${basedir}/gsdl/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
38            <exec dir="${basedir}/gsdl" executable="autoconf" output="${basedir}/gsdl/configure"><arg value="configure.in"/></exec>
39        </if>
40    </target>
41
42    <target name="set-environment-in-packages-configure">
43        <if><bool><istrue value="${execute}"/></bool>
44            <rsr file="${basedir}/gsdl/common-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
45            <rsr file="${basedir}/gsdl/build-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
46
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/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
61            <rsr file="${basedir}/gsdl/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
62            <rsr file="${basedir}/gsdl/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
63            <rsr file="${basedir}/gsdl/build-src/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
74    <target name="run-make-install">
75        <if><bool><istrue value="${execute}"/></bool>
76            <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec>
77        </if>
78    </target>
79
80    <target name="copy-library-oai">
81        <if><bool><istrue value="${execute}"/></bool>
82            <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/linux/library"/></exec>
83            <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/linux/oaiserver"/></exec>
84        </if>
85    </target>
86
87    <target name="strip-execs">
88        <if><bool><istrue value="${execute}"/></bool>
89            <exec dir="${basedir}/gsdl/bin/linux" executable="find">
90                <arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
91            </exec>
92        </if>
93    </target>
94
95    <target name="build-demo-collection">
96        <if><bool><istrue value="${execute}"/></bool>
97            <exec dir="${basedir}/gsdl" executable="${lirk2.home}/resources/build-demo.sh"/>
98        </if>
99    </target>
100
101
102
103</project>
Note: See TracBrowser for help on using the browser.