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

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

dont compile search4j and pass param to make-concrete task

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 <!-- 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="greenstone3"/>
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="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure">
51 <arg line="configure.in"/>
52 </exec>
53 <chmod file="greenstone3/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="greenstone3/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="greenstone3/gsdl-manuals"/>
72 <svn>
73 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
74 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
75 </svn>
76 <javac srcdir="greenstone3/gsdl-manuals/shared"
77 destdir="greenstone3/gsdl-manuals/shared"
78 debug="on">
79 <include name="*.java"/>
80 </javac>
81 <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
82
83 <path id="documentation.compile.classpath">
84 <fileset dir="greenstone3/gsdl-manuals">
85 <include name="**/*.jar"/>
86 </fileset>
87 <pathelement path="greenstone3/gsdl-manuals/shared"/>
88 <pathelement path="greenstone3/gsdl-manuals/manuals"/>
89 </path>
90
91 <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
92 <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
93 <arg value="greenstone3/gli/help/en/help.xml" />
94 <arg value="greenstone3" />
95 </java>
96
97 <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
98 <echo>Run generate-pdf.sh</echo>
99 <exec dir="greenstone3/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="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
112 <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/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="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
119 <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/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="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
126 <rsr file="greenstone3/gs2build/build-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
127 <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" />
128 </target>
129
130 <target name="wv-add-static">
131 <rsr file="greenstone3/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="greenstone3/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="greenstone3/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="greenstone3/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="greenstone3/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.