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

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

make sure the build.properties file has been created before trying to modify it

File size: 4.1 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 <if>
47 <bool><not><available file="compiled/build.properties"/></not></bool>
48 <copy file="compiled/build.properties.in" tofile="compiled/build.properties"/>
49 </if>
50 <rsr file="compiled/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/>
51 </target>
52
53 <target name="tweak-makefiles">
54 <rsr
55 file="${basedir}/compiled/gs2build/common-src/src/gdbmedit/db2txt/Makefile"
56 pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
57 replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
58
59 <rsr
60 file="${basedir}/compiled/gs2build/common-src/src/gdbmedit/txt2db/Makefile"
61 pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
62 replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
63
64 <rsr
65 file="${basedir}/compiled/src/packages/javagdbm/jni/Makefile"
66 pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
67 replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
68 </target>
69
70 <target name="linux-strip-execs">
71 <exec dir="compiled/gs2build/bin/darwin" executable="find">
72 <arg line=". ! -name . -exec strip {} &#59;"/>
73 </exec>
74 </target>
75
76 <target name="prepare-documentation">
77 <mkdir dir="compiled/gsdl-manuals"/>
78 <svn>
79 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="compiled/gsdl-manuals/manuals"/>
80 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="compiled/gsdl-manuals/shared"/>
81 </svn>
82 <javac
83 srcdir="compiled/gsdl-manuals/shared"
84 destdir="compiled/gsdl-manuals/shared"
85 debug="on">
86 <include name="*.java"/>
87 </javac>
88 <unzip src="compiled/gsdl-manuals/shared/fop.zip" dest="compiled/gsdl-manuals/shared"/>
89
90 <path id="documentation.compile.classpath">
91 <fileset dir="compiled/gsdl-manuals">
92 <include name="**/*.jar"/>
93 </fileset>
94 <pathelement path="compiled/gsdl-manuals/shared"/>
95 <pathelement path="compiled/gsdl-manuals/manuals"/>
96 </path>
97
98 <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="compiled/gsdl-manuals/manuals/xml-source/en/help-en.xml">
99 <arg value="compiled/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
100 <arg value="compiled/gli/help/en/help.xml" />
101 <arg value="compiled" />
102 </java>
103
104 <chmod perm="a+x" file="compiled/gsdl-manuals/shared/fop/fop.sh"/>
105 <echo>Run generate-pdf.sh</echo>
106 <exec dir="compiled/gsdl-manuals/manuals" executable="/bin/sh">
107 <arg line="generate-pdf.sh u en" />
108 </exec>
109 </target>
110
111</project>
112
113
Note: See TracBrowser for help on using the repository browser.