source: release-kits/lirk3/ant-scripts/compile.xml@ 17422

Last change on this file since 17422 was 17422, checked in by oranfry, 14 years ago

made the create-components targets more stable

File size: 5.8 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk3-compile" default="compile">
3
4 <target name="compile">
5
6 <!-- checkout -->
7 <antcall target="checkout-greenstone3" />
8
9 <!-- preparation -->
10 <antcall target="greenstone3-set-version-numbers">
11 <param name="greenstone3basedir" value="${basedir}/greenstone3"/>
12 </antcall>
13 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/>
14
15 <antcall target="tweak-configure-scripts" />
16
17 <!-- update -->
18 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/>
19
20 <!-- configure -->
21 <antcall target="regenerate-configure"/>
22 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
23 <antcall target="tweak-makefiles" />
24
25 <!-- build -->
26 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
27 <antcall target="linux-strip-execs" />
28
29 <!-- search4j -->
30 <antcall target="compile-search4j-unix" /> <!-- from rk3-targets -->
31
32 <!-- uninstaller -->
33 <antcall target="compile-uninstaller" /> <!-- from rk3-targets -->
34
35 <!-- documentation -->
36 <antcall target="prepare-documentation" />
37
38 </target>
39
40 <target name="checkout-greenstone3">
41 <svn>
42 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
43 </svn>
44 </target>
45
46 <target name="tweak-configure-scripts">
47 <antcall target="mgpp-add-static" />
48 <antcall target="mg-add-static" />
49 <antcall target="gs2build-add-static" />
50 </target>
51
52 <target name="regenerate-configure">
53 <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure">
54 <arg line="configure.in"/>
55 </exec>
56 <chmod file="greenstone3/gs2build/configure" perm="+x"/>
57 </target>
58
59 <target name="tweak-makefiles">
60 <antcall target="wv-add-static" />
61 <antcall target="xlhtml-add-static" />
62 <antcall target="ppthtml-add-static" />
63 <antcall target="rtftohtml-add-static" />
64 <antcall target="gdbm-add-static" />
65 </target>
66
67 <target name="linux-strip-execs">
68 <exec dir="greenstone3/gs2build/bin/linux" executable="find">
69 <arg line="! -name . -exec strip {} &#59;"/>
70 </exec>
71 </target>
72
73 <target name="prepare-documentation">
74 <mkdir dir="greenstone3/gsdl-manuals"/>
75 <svn>
76 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
77 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
78 </svn>
79 <javac srcdir="greenstone3/gsdl-manuals/shared"
80 destdir="greenstone3/gsdl-manuals/shared"
81 debug="on">
82 <include name="*.java"/>
83 </javac>
84 <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
85
86 <path id="documentation.compile.classpath">
87 <fileset dir="greenstone3/gsdl-manuals">
88 <include name="**/*.jar"/>
89 </fileset>
90 <pathelement path="greenstone3/gsdl-manuals/shared"/>
91 <pathelement path="greenstone3/gsdl-manuals/manuals"/>
92 </path>
93
94 <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
95 <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
96 <arg value="greenstone3/gli/help/en/help.xml" />
97 <arg value="greenstone3" />
98 </java>
99
100 <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
101 <echo>Run generate-pdf.sh</echo>
102 <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
103 <arg line="generate-pdf.sh u en" />
104 </exec>
105 </target>
106
107 <!--
108
109 third level targets
110
111 -->
112
113 <target name="mgpp-add-static">
114 <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
115 <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure">
116 <arg line="configure.in"/>
117 </exec>
118 </target>
119
120 <target name="mg-add-static">
121 <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
122 <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure">
123 <arg line="configure.in"/>
124 </exec>
125 </target>
126
127 <target name="gs2build-add-static">
128 <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
129 <rsr file="greenstone3/gs2build/build-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
130 <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" />
131 </target>
132
133 <target name="wv-add-static">
134 <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
135 </target>
136
137 <target name="xlhtml-add-static">
138 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
139 </target>
140
141 <target name="ppthtml-add-static">
142 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
143 </target>
144
145 <target name="rtftohtml-add-static">
146 <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
147 </target>
148
149 <target name="gdbm-add-static">
150 <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
151 </target>
152
153
154</project>
Note: See TracBrowser for help on using the repository browser.