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

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

Standardised names of directories used in release kits

  • gsdl and greenstone3 -> compiled
  • distribution and distributions -> distributions
  • greenstone3 and web -> web

And, expect more specifically named properties files, e.g., lirk3-build.properties, wirk2-build.properties

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