source: release-kits/mark3/ant-scripts/compile.xml@ 17932

Last change on this file since 17932 was 17932, checked in by oranfry, 15 years ago

made use of rsrs ability to take a fileset

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