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

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

getting rid of unneeded if wrappers to each target as hacked ant now takes care of that, and replacing calls to custom task addressed calls to builtin antcall, which has been hacked in ant

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