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

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

compile search4j in release process and started standardising java installtion

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