root/release-kits/mark3/ant-scripts/compile.xml @ 17268

Revision 17268, 4.0 KB (checked in by oranfry, 11 years ago)

compile search4j in release process and started standardising java installtion

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="mark3-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="set-gdbm-installed-path" />
12        <ant target="prepare-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
13       
14        <!-- update -->
15        <ant target="update-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
16
17        <!-- configure -->
18        <ant target="configure-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
19        <antcall target="tweak-makefiles" />
20
21        <!-- build -->
22        <ant target="build-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
23        <antcall target="linux-strip-execs" />
24
25        <!-- search4j -->
26        <antcall target="compile-search4j" /> <!-- from rk3-targets -->
27
28        <!-- uninstaller -->
29        <antcall target="compile-uninstaller" /> <!-- from rk3-targets -->
30
31        <!-- documentation -->
32        <antcall target="prepare-documentation" />
33
34    </target>
35
36    <target name="checkout-greenstone3">
37        <svn javahl="false">
38            <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
39        </svn>
40    </target>
41
42    <target name="set-version-number-property">
43        <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
44    </target>
45
46    <target name="set-gdbm-installed-path">
47        <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/>
48    </target>
49
50    <target name="tweak-makefiles">
51        <rsr
52            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile"
53            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
54            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
55
56        <rsr
57            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile"
58            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
59            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
60
61        <rsr
62            file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile"
63            pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
64            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
65    </target>
66
67    <target name="linux-strip-execs">
68        <exec dir="greenstone3/gs2build/bin/darwin" executable="find">
69            <arg line=". ! -name . -exec strip {} &#59;"/>
70        </exec>
71    </target>
72
73    <target name="prepare-documentation">
74        <mkdir dir="greenstone3/gsdl-manuals"/>
75        <svn javahl="false">
76            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
77            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
78        </svn>
79        <javac srcdir="greenstone3/gsdl-manuals/shared"
80              destdir="greenstone3/gsdl-manuals/shared"
81              debug="on">
82            <include name="*.java"/>
83        </javac>
84        <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
85
86        <path id="documentation.compile.classpath">
87            <fileset dir="greenstone3/gsdl-manuals">
88                <include name="**/*.jar"/>
89            </fileset>
90            <pathelement path="greenstone3/gsdl-manuals/shared"/>
91            <pathelement path="greenstone3/gsdl-manuals/manuals"/>
92        </path>
93
94        <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
95            <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
96            <arg value="greenstone3/gli/help/en/help.xml" />
97            <arg value="greenstone3" />
98        </java>
99
100        <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
101        <echo>Run generate-pdf.sh</echo>
102        <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
103            <arg line="generate-pdf.sh u en" />
104        </exec>
105    </target>
106
107</project>
108
Note: See TracBrowser for help on using the browser.