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