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

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

changes to lirk3 after ant hack cleaned up

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