Ignore:
Timestamp:
2008-08-13T11:44:24+12:00 (16 years ago)
Author:
oranfry
Message:

changes to mark3 after ant cleaned up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/mark3/ant-scripts/compile.xml

    r16655 r16744  
    11<?xml version="1.0" encoding="utf-8" ?>
    22<project name="mark3-compile" default="compile">
    3 
    43
    54    <target name="compile">
    65
    76        <!-- checkout -->
    8         <addressedcall target="checkout-greenstone3" />
     7        <antcall target="checkout-greenstone3" />
    98
    109        <!-- preparation -->
    11         <addressedcall target="set-version-number-property" />
    12         <addressedcall target="set-gdbm-installed-path" />
    13         <addressedcall target="dist-prepare-unix" />
    14 
     10        <antcall target="set-version-number-property" />
     11        <antcall target="set-gdbm-installed-path" />
     12        <ant target="prepare-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
     13       
    1514        <!-- update -->
    16         <addressedcall target="dist-update-unix" />
     15        <ant target="update-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
    1716
    1817        <!-- configure -->
    19         <addressedcall target="dist-configure-unix" />
    20         <addressedcall target="tweak-makefiles" />
     18        <ant target="configure-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
     19        <antcall target="tweak-makefiles" />
    2120
    2221        <!-- build -->
    23         <addressedcall target="dist-build-unix" />
    24         <addressedcall target="linux-strip-execs" />
     22        <ant target="build-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
     23        <antcall target="linux-strip-execs" />
    2524
    2625        <!-- documentation -->
    27         <addressedcall target="prepare-documentation" />
     26        <antcall target="prepare-documentation" />
    2827
    2928    </target>
    3029
    3130    <target name="checkout-greenstone3">
    32         <if><bool><istrue value="${execute}"/></bool>
    33             <svn>
    34                 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
    35             </svn>
    36         </if>
     31        <svn>
     32            <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
     33        </svn>
    3734    </target>
    3835
    3936    <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" />
    42 
    43         </if>
     37        <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
    4438    </target>
    4539
    4640    <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>
     41        <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/>
    5042    </target>
    5143
     44    <target name="tweak-makefiles">
     45      <rsr
     46            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile"
     47            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
     48            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
    5249
     50        <rsr
     51            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile"
     52            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
     53            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
    5354
    54 
    55     <target name="dist-prepare-unix">
    56         <if><bool><istrue value="${execute}"/></bool>
    57             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix"  inheritAll="false"/>
    58         </if>   
    59     </target>
    60 
    61     <target name="dist-update-unix">
    62         <if><bool><istrue value="${execute}"/></bool>
    63             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix"  inheritAll="false"/>
    64         </if>
    65     </target>
    66 
    67     <target name="dist-configure-unix">
    68         <if><bool><istrue value="${execute}"/></bool>
    69             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
    70         </if>
    71     </target>
    72 
    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" />
    79 
    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 
    92     <target name="dist-build-unix">
    93         <if><bool><istrue value="${execute}"/></bool>
    94             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
    95         </if>
     55        <rsr
     56            file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile"
     57            pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
     58            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
    9659    </target>
    9760
    9861    <target name="linux-strip-execs">
    99         <if><bool><istrue value="${execute}"/></bool>
    100             <exec dir="greenstone3/gs2build/bin/darwin" executable="find">
    101                 <arg line=". ! -name . -exec strip {} &#59;"/>
    102             </exec>
    103         </if>
     62        <exec dir="greenstone3/gs2build/bin/darwin" executable="find">
     63            <arg line=". ! -name . -exec strip {} &#59;"/>
     64        </exec>
    10465    </target>
    10566
    10667    <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"/>
     68        <mkdir dir="greenstone3/gsdl-manuals"/>
     69        <svn>
     70            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
     71            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
     72        </svn>
     73        <javac srcdir="greenstone3/gsdl-manuals/shared"
     74              destdir="greenstone3/gsdl-manuals/shared"
     75              debug="on">
     76            <include name="*.java"/>
     77        </javac>
     78        <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
    11979
    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>
     80        <path id="documentation.compile.classpath">
     81            <fileset dir="greenstone3/gsdl-manuals">
     82                <include name="**/*.jar"/>
     83            </fileset>
     84            <pathelement path="greenstone3/gsdl-manuals/shared"/>
     85            <pathelement path="greenstone3/gsdl-manuals/manuals"/>
     86        </path>
    12787
    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>
     88        <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
     89            <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
     90            <arg value="greenstone3/gli/help/en/help.xml" />
     91            <arg value="greenstone3" />
     92        </java>
    13393
    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=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
    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>
    188             <rsr file="greenstone3/gs2build/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
    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>
     94        <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
     95        <echo>Run generate-pdf.sh</echo>
     96        <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
     97            <arg line="generate-pdf.sh u en" />
     98        </exec>
    19599    </target>
    196100
Note: See TracChangeset for help on using the changeset viewer.