[14982] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
[16655] | 2 | <project name="mark3-compile" default="compile">
|
---|
[14982] | 3 |
|
---|
| 4 |
|
---|
| 5 | <target name="compile">
|
---|
| 6 |
|
---|
| 7 | <!-- checkout -->
|
---|
| 8 | <addressedcall target="checkout-greenstone3" />
|
---|
| 9 |
|
---|
| 10 | <!-- preparation -->
|
---|
| 11 | <addressedcall target="set-version-number-property" />
|
---|
[16655] | 12 | <addressedcall target="set-gdbm-installed-path" />
|
---|
[14982] | 13 | <addressedcall target="dist-prepare-unix" />
|
---|
| 14 |
|
---|
| 15 | <!-- update -->
|
---|
| 16 | <addressedcall target="dist-update-unix" />
|
---|
| 17 |
|
---|
| 18 | <!-- configure -->
|
---|
| 19 | <addressedcall target="dist-configure-unix" />
|
---|
| 20 | <addressedcall target="tweak-makefiles" />
|
---|
| 21 |
|
---|
| 22 | <!-- build -->
|
---|
| 23 | <addressedcall target="dist-build-unix" />
|
---|
| 24 | <addressedcall target="linux-strip-execs" />
|
---|
| 25 |
|
---|
| 26 | <!-- documentation -->
|
---|
| 27 | <addressedcall target="prepare-documentation" />
|
---|
| 28 |
|
---|
| 29 | </target>
|
---|
| 30 |
|
---|
| 31 | <target name="checkout-greenstone3">
|
---|
| 32 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[16655] | 33 | <svn>
|
---|
[14982] | 34 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
|
---|
[16655] | 35 | </svn>
|
---|
[14982] | 36 | </if>
|
---|
| 37 | </target>
|
---|
| 38 |
|
---|
| 39 | <target name="set-version-number-property">
|
---|
| 40 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 41 | <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
|
---|
[16655] | 42 |
|
---|
[14982] | 43 | </if>
|
---|
| 44 | </target>
|
---|
| 45 |
|
---|
[16655] | 46 | <target name="set-gdbm-installed-path">
|
---|
| 47 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 48 | <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/>
|
---|
| 49 | </if>
|
---|
| 50 | </target>
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 |
|
---|
[14982] | 55 | <target name="dist-prepare-unix">
|
---|
| 56 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[16655] | 57 | <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/>
|
---|
[14982] | 58 | </if>
|
---|
| 59 | </target>
|
---|
| 60 |
|
---|
| 61 | <target name="dist-update-unix">
|
---|
| 62 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[16655] | 63 | <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/>
|
---|
[14982] | 64 | </if>
|
---|
| 65 | </target>
|
---|
| 66 |
|
---|
| 67 | <target name="dist-configure-unix">
|
---|
| 68 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[16655] | 69 | <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
|
---|
[14982] | 70 | </if>
|
---|
| 71 | </target>
|
---|
| 72 |
|
---|
[16655] | 73 | <target name="tweak-makefiles">
|
---|
| 74 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 75 | <rsr
|
---|
| 76 | file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile"
|
---|
| 77 | pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
|
---|
| 78 | replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
|
---|
[14982] | 79 |
|
---|
[16655] | 80 | <rsr
|
---|
| 81 | file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile"
|
---|
| 82 | pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
|
---|
| 83 | replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
|
---|
| 84 | <rsr
|
---|
| 85 | file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile"
|
---|
| 86 | pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
|
---|
| 87 | replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
|
---|
| 88 |
|
---|
| 89 | </if>
|
---|
| 90 | </target>
|
---|
| 91 |
|
---|
[14982] | 92 | <target name="dist-build-unix">
|
---|
| 93 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[16655] | 94 | <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
|
---|
[14982] | 95 | </if>
|
---|
| 96 | </target>
|
---|
| 97 |
|
---|
| 98 | <target name="linux-strip-execs">
|
---|
| 99 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[16655] | 100 | <exec dir="greenstone3/gs2build/bin/darwin" executable="find">
|
---|
| 101 | <arg line=". ! -name . -exec strip {} ;"/>
|
---|
[14982] | 102 | </exec>
|
---|
| 103 | </if>
|
---|
| 104 | </target>
|
---|
| 105 |
|
---|
| 106 | <target name="prepare-documentation">
|
---|
| 107 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 108 | <mkdir dir="greenstone3/gsdl-manuals"/>
|
---|
| 109 | <svn>
|
---|
| 110 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
|
---|
| 111 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
|
---|
| 112 | </svn>
|
---|
| 113 | <javac srcdir="greenstone3/gsdl-manuals/shared"
|
---|
| 114 | destdir="greenstone3/gsdl-manuals/shared"
|
---|
| 115 | debug="on">
|
---|
| 116 | <include name="*.java"/>
|
---|
| 117 | </javac>
|
---|
| 118 | <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
|
---|
| 119 |
|
---|
| 120 | <path id="documentation.compile.classpath">
|
---|
| 121 | <fileset dir="greenstone3/gsdl-manuals">
|
---|
| 122 | <include name="**/*.jar"/>
|
---|
| 123 | </fileset>
|
---|
| 124 | <pathelement path="greenstone3/gsdl-manuals/shared"/>
|
---|
| 125 | <pathelement path="greenstone3/gsdl-manuals/manuals"/>
|
---|
| 126 | </path>
|
---|
| 127 |
|
---|
| 128 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
|
---|
| 129 | <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
| 130 | <arg value="greenstone3/gli/help/en/help.xml" />
|
---|
| 131 | <arg value="greenstone3" />
|
---|
| 132 | </java>
|
---|
| 133 |
|
---|
| 134 | <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
|
---|
| 135 | <echo>Run generate-pdf.sh</echo>
|
---|
| 136 | <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
|
---|
| 137 | <arg line="generate-pdf.sh u en" />
|
---|
| 138 | </exec>
|
---|
| 139 | </if>
|
---|
| 140 | </target>
|
---|
| 141 |
|
---|
| 142 | <!--
|
---|
| 143 |
|
---|
| 144 | third level targets
|
---|
| 145 |
|
---|
| 146 | -->
|
---|
| 147 |
|
---|
| 148 | <target name="mgpp-add-static">
|
---|
| 149 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 150 | <rsr file="greenstone3/gs2build/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
| 151 | <exec dir="greenstone3/gs2build/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/indexers/mgpp/configure">
|
---|
| 152 | <arg line="configure.in"/>
|
---|
| 153 | </exec>
|
---|
| 154 | </if>
|
---|
| 155 | </target>
|
---|
| 156 | <target name="mg-add-static">
|
---|
| 157 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 158 | <rsr file="greenstone3/gs2build/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
| 159 | <exec dir="greenstone3/gs2build/indexers/mg" executable="autoconf" output="greenstone3/gs2build/indexers/mg/configure">
|
---|
| 160 | <arg line="configure.in"/>
|
---|
| 161 | </exec>
|
---|
| 162 | </if>
|
---|
| 163 | </target>
|
---|
| 164 | <target name="gs2buildextra-add-static">
|
---|
| 165 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 166 | <rsr file="greenstone3/gs2build/gs2build-extra/packages.configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" />
|
---|
| 167 | <rsr file="greenstone3/gs2build/gs2build-extra/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
| 168 | </if>
|
---|
| 169 | </target>
|
---|
| 170 |
|
---|
| 171 | <target name="wv-add-static">
|
---|
| 172 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 173 | <rsr file="greenstone3/gs2build/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
| 174 | </if>
|
---|
| 175 | </target>
|
---|
| 176 | <target name="xlhtml-add-static">
|
---|
| 177 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 178 | <rsr file="greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
| 179 | </if>
|
---|
| 180 | </target>
|
---|
| 181 | <target name="ppthtml-add-static">
|
---|
| 182 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 183 | <rsr file="greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
| 184 | </if>
|
---|
| 185 | </target>
|
---|
| 186 | <target name="rtftohtml-add-static">
|
---|
| 187 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[15142] | 188 | <rsr file="greenstone3/gs2build/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
|
---|
[14982] | 189 | </if>
|
---|
| 190 | </target>
|
---|
| 191 | <target name="gdbm-add-static">
|
---|
| 192 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 193 | <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
|
---|
| 194 | </if>
|
---|
| 195 | </target>
|
---|
| 196 |
|
---|
[16655] | 197 | </project>
|
---|
[14982] | 198 |
|
---|