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="greenstone3-set-version-numbers">
|
---|
11 | <param name="greenstone3basedir" value="${basedir}/greenstone3"/>
|
---|
12 | </antcall>
|
---|
13 | <antcall target="set-gdbm-installed-path" />
|
---|
14 | <ant target="prepare-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
|
---|
15 |
|
---|
16 | <!-- update -->
|
---|
17 | <ant target="update-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
|
---|
18 |
|
---|
19 | <!-- configure -->
|
---|
20 | <ant target="configure-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
|
---|
21 | <antcall target="tweak-makefiles" />
|
---|
22 |
|
---|
23 | <!-- build -->
|
---|
24 | <ant target="build-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
|
---|
25 | <antcall target="linux-strip-execs" />
|
---|
26 |
|
---|
27 | <!-- search4j -->
|
---|
28 | <antcall target="compile-search4j-unix" /> <!-- from rk3-targets -->
|
---|
29 |
|
---|
30 | <!-- uninstaller -->
|
---|
31 | <antcall target="compile-uninstaller" /> <!-- from rk3-targets -->
|
---|
32 |
|
---|
33 | <!-- documentation -->
|
---|
34 | <antcall target="prepare-documentation" />
|
---|
35 |
|
---|
36 | </target>
|
---|
37 |
|
---|
38 | <target name="checkout-greenstone3">
|
---|
39 | <svn javahl="false">
|
---|
40 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
|
---|
41 | </svn>
|
---|
42 | </target>
|
---|
43 |
|
---|
44 | <target name="set-version-number-property">
|
---|
45 | <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
|
---|
46 | </target>
|
---|
47 |
|
---|
48 | <target name="set-gdbm-installed-path">
|
---|
49 | <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/>
|
---|
50 | </target>
|
---|
51 |
|
---|
52 | <target name="tweak-makefiles">
|
---|
53 | <rsr
|
---|
54 | file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile"
|
---|
55 | pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
|
---|
56 | replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
|
---|
57 |
|
---|
58 | <rsr
|
---|
59 | file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile"
|
---|
60 | pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
|
---|
61 | replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
|
---|
62 |
|
---|
63 | <rsr
|
---|
64 | file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile"
|
---|
65 | pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
|
---|
66 | replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
|
---|
67 | </target>
|
---|
68 |
|
---|
69 | <target name="linux-strip-execs">
|
---|
70 | <exec dir="greenstone3/gs2build/bin/darwin" executable="find">
|
---|
71 | <arg line=". ! -name . -exec strip {} ;"/>
|
---|
72 | </exec>
|
---|
73 | </target>
|
---|
74 |
|
---|
75 | <target name="prepare-documentation">
|
---|
76 | <mkdir dir="greenstone3/gsdl-manuals"/>
|
---|
77 | <svn javahl="false">
|
---|
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"/>
|
---|
87 |
|
---|
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>
|
---|
95 |
|
---|
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>
|
---|
101 |
|
---|
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>
|
---|
107 | </target>
|
---|
108 |
|
---|
109 | </project>
|
---|
110 |
|
---|