source: main/trunk/release-kits/shared/greenstone3/ant-scripts/greenstone3-shared.xml@ 21652

Last change on this file since 21652 was 21652, checked in by oranfry, 13 years ago

got properties target working for all kits, plus some fixes

File size: 2.9 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3 ..........................................................
4 August 2008
5 Targets for Greenstone3 release kits
6 Oran Fry
7 ..........................................................
8-->
9
10<project name="greenstone3-targets">
11
12 <target name="gs3-init">
13
14 <!-- don't let greenstone3 block and wait for user input to accept
15 the properties for the build -->
16 <property name="forward.properties.accepted" value="true"/>
17
18 <!-- make sure all c++ compilation is done statically on linux -->
19 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
20 <property name="forward.compile.static" value="true"/>
21 </if>
22
23 <!-- show the property set to be forwarded to greenstone3 -->
24 <echo>Properties to be forwarded to greenstone3 build</echo>
25 <echoproperties><propertyset refid="forward.properties"/></echoproperties>
26
27 </target>
28
29 <target name="gs3-properties">
30 <echo>forward.* (eg, forward.proxy.host) (optional) any property to forward to greenstone3 during build</echo>
31 </target>
32
33 <target name="greenstone3-set-version-numbers">
34 <rsr
35 file="${greenstone3basedir}/resources/java/global.properties.in"
36 pattern="@gsdl3version@"
37 replacement="${version}" />
38 <rsr
39 file="${greenstone3basedir}/resources/java/server.properties"
40 pattern="^(Server3Control\.Version=).*$"
41 replacement="$1${version}" />
42
43 </target>
44
45 <!--
46 unused. might need to find a way to get the system ant into the release, as ant no longer comes with the release kits
47 -->
48 <target name="insert-ant">
49
50 <!-- remove any existing ant -->
51 <delete dir="compiled/packages/ant"/>
52
53 <!-- windows copy -->
54 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
55 <copy todir="compiled/packages">
56 <fileset dir="${rk.home}/core" includes="ant/**/*"/>
57 </copy>
58
59 <!-- linux, mac copy-->
60 <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
61 <exec executable="cp">
62 <arg value="-r"/>
63 <arg value="${rk.home}/core/ant"/>
64 <arg value="compiled/packages"/>
65 </exec>
66
67 <!-- otherwise fail -->
68 <else>
69 <fail>this target does not support the current os</fail>
70
71 </else></if></else></if>
72
73 </target>
74
75 <!-- unused. this or something similar might need to go back in, to make the forward.properties permanent -->
76 <target name="generate-build-properties">
77 <copy file="${greenstone3.basedir}/build.properties.in" tofile="${greenstone3.basedir}/build.properties"/>
78 <if><bool><istrue value="${install.flax}"/></bool>
79 <rsr file="${greenstone3.basedir}/build.properties" pattern="^#install.flax\s*[=:].*" replacement="install.flax=true"/>
80 </if>
81 <if><bool><isset property="server.default.servlet"/></bool>
82 <rsr file="${greenstone3.basedir}/build.properties" pattern="^#?server.default.servlet\s*[=:].*" replacement="server.default.servlet=${server.default.servlet}"/>
83 </if>
84 </target>
85
86</project>
Note: See TracBrowser for help on using the repository browser.