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

Revision 16744, 3.8 KB (checked in by oranfry, 12 years ago)

changes to mark3 after ant cleaned up

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