Ignore:
Timestamp:
2008-08-08T13:07:16+12:00 (16 years ago)
Author:
oranfry
Message:

getting rid of unneeded if wrappers to each target as hacked ant now takes care of that, and replacing calls to custom task addressed calls to builtin antcall, which has been hacked in ant

File:
1 edited

Legend:

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

    r16622 r16684  
    11<?xml version="1.0" encoding="utf-8" ?>
    22<project name="lirk3-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="dist-prepare-unix" />
    13         <addressedcall target="tweak-configure-scripts" />
     10        <antcall target="set-version-number-property" />
     11        <antcall target="dist-prepare-unix" />
     12        <antcall target="tweak-configure-scripts" />
    1413
    1514        <!-- update -->
    16         <addressedcall target="dist-update-unix" />
     15        <antcall target="dist-update-unix" />
    1716
    1817        <!-- configure -->
    19         <addressedcall target="dist-configure-unix" />
    20         <addressedcall target="tweak-makefiles" />
     18        <antcall target="dist-configure-unix" />
     19        <antcall target="tweak-makefiles" />
    2120
    2221        <!-- build -->
    23         <addressedcall target="dist-build-unix" />
    24         <addressedcall target="fix-wget" />
    25         <addressedcall target="linux-strip-execs" />
     22        <antcall target="dist-build-unix" />
     23        <antcall target="linux-strip-execs" />
    2624
    2725        <!-- documentation -->
    28         <addressedcall target="prepare-documentation" />
     26        <antcall target="prepare-documentation" />
    2927
    3028    </target>
    3129
    3230    <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>
     31        <svn>
     32            <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
     33        </svn>
    3834    </target>
    3935
    4036    <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>
     37        <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
    4438    </target>
    4539
    4640    <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>   
     41        <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix"  inheritAll="false"/>
    5042    </target>
    5143    <target name="tweak-configure-scripts">
    52         <addressedcall target="mgpp-add-static" />
    53         <addressedcall target="mg-add-static" />
    54         <addressedcall target="gs2build-add-static" />
     44        <antcall target="mgpp-add-static" />
     45        <antcall target="mg-add-static" />
     46        <antcall target="gs2build-add-static" />
    5547    </target>
    5648
    5749    <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>
     50        <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix"  inheritAll="false"/>
    6151    </target>
    6252
    6353    <target name="dist-configure-unix">
    64 
    65         <if><bool><istrue value="${execute}"/></bool>
    66             <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure">
    67                 <arg line="configure.in"/>
    68             </exec>
    69             <chmod file="greenstone3/gs2build/configure" perm="+x"/>
    70             <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
    71         </if>
    72 
     54        <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure">
     55            <arg line="configure.in"/>
     56        </exec>
     57        <chmod file="greenstone3/gs2build/configure" perm="+x"/>
     58        <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
    7359    </target>
    7460
    7561    <target name="tweak-makefiles">
    76         <addressedcall target="wv-add-static" />
    77         <addressedcall target="xlhtml-add-static" />
    78         <addressedcall target="ppthtml-add-static" />
    79         <addressedcall target="rtftohtml-add-static" />
    80         <addressedcall target="gdbm-add-static" />
     62        <antcall target="wv-add-static" />
     63        <antcall target="xlhtml-add-static" />
     64        <antcall target="ppthtml-add-static" />
     65        <antcall target="rtftohtml-add-static" />
     66        <antcall target="gdbm-add-static" />
    8167    </target>
    8268
    8369    <target name="dist-build-unix">
    84         <if><bool><istrue value="${execute}"/></bool>
    85             <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
    86         </if>
    87     </target>
    88 
    89     <target name="fix-wget">
    90         <if><bool><istrue value="${execute}"/></bool>
    91             <!-- fix this !!! -->
    92           <delete file="greenstone3/gs2build/packages/wget/wget-1.9/src/wget"/>
    93         </if>
     70        <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
    9471    </target>
    9572
    9673    <target name="linux-strip-execs">
    97         <if><bool><istrue value="${execute}"/></bool>
    98             <exec dir="greenstone3/gs2build/bin/linux" executable="find">
    99                 <arg line="! -name . -exec strip {} &#59;"/>
    100             </exec>
    101         </if>
     74        <exec dir="greenstone3/gs2build/bin/linux" executable="find">
     75            <arg line="! -name . -exec strip {} &#59;"/>
     76        </exec>
    10277    </target>
    10378
    10479    <target name="prepare-documentation">
    105         <if><bool><istrue value="${execute}"/></bool>
    106             <mkdir dir="greenstone3/gsdl-manuals"/>
    107             <svn>
    108                 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
    109                 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
    110             </svn>
    111             <javac srcdir="greenstone3/gsdl-manuals/shared"
    112                   destdir="greenstone3/gsdl-manuals/shared"
    113                   debug="on">
    114                 <include name="*.java"/>
    115             </javac>
    116             <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
     80        <mkdir dir="greenstone3/gsdl-manuals"/>
     81        <svn>
     82            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
     83            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
     84        </svn>
     85        <javac srcdir="greenstone3/gsdl-manuals/shared"
     86              destdir="greenstone3/gsdl-manuals/shared"
     87              debug="on">
     88            <include name="*.java"/>
     89        </javac>
     90        <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
    11791
    118             <path id="documentation.compile.classpath">
    119                 <fileset dir="greenstone3/gsdl-manuals">
    120                     <include name="**/*.jar"/>
    121                 </fileset>
    122                 <pathelement path="greenstone3/gsdl-manuals/shared"/>
    123                 <pathelement path="greenstone3/gsdl-manuals/manuals"/>
    124             </path>
     92        <path id="documentation.compile.classpath">
     93            <fileset dir="greenstone3/gsdl-manuals">
     94                <include name="**/*.jar"/>
     95            </fileset>
     96            <pathelement path="greenstone3/gsdl-manuals/shared"/>
     97            <pathelement path="greenstone3/gsdl-manuals/manuals"/>
     98        </path>
    12599
    126             <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
    127                 <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
    128                 <arg value="greenstone3/gli/help/en/help.xml" />
    129                 <arg value="greenstone3" />
    130             </java>
     100        <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
     101            <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
     102            <arg value="greenstone3/gli/help/en/help.xml" />
     103            <arg value="greenstone3" />
     104        </java>
    131105
    132             <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
    133             <echo>Run generate-pdf.sh</echo>
    134             <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
    135                 <arg line="generate-pdf.sh u en" />
    136             </exec>
    137         </if>
     106        <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
     107        <echo>Run generate-pdf.sh</echo>
     108        <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
     109            <arg line="generate-pdf.sh u en" />
     110        </exec>
    138111    </target>
    139112
     
    145118
    146119    <target name="mgpp-add-static">
    147         <if><bool><istrue value="${execute}"/></bool>
    148             <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
    149             <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure">
    150                 <arg line="configure.in"/>
    151             </exec>
    152         </if>
     120        <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
     121        <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure">
     122            <arg line="configure.in"/>
     123        </exec>
    153124    </target>
     125
    154126    <target name="mg-add-static">
    155         <if><bool><istrue value="${execute}"/></bool>
    156             <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
    157             <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure">
    158                 <arg line="configure.in"/>
    159             </exec>
    160         </if>
     127        <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
     128        <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure">
     129            <arg line="configure.in"/>
     130        </exec>
    161131    </target>
     132
    162133    <target name="gs2build-add-static">
    163         <if><bool><istrue value="${execute}"/></bool>
    164             <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
    165             <rsr file="greenstone3/gs2build/build-src/packages/configure"  pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
    166             <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" />
    167         </if>
     134        <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
     135        <rsr file="greenstone3/gs2build/build-src/packages/configure"  pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
     136        <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" />
    168137    </target>
    169138
    170139    <target name="wv-add-static">
    171         <if><bool><istrue value="${execute}"/></bool>
    172             <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
    173         </if>
     140        <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
    174141    </target>
     142
    175143    <target name="xlhtml-add-static">
    176         <if><bool><istrue value="${execute}"/></bool>
    177             <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
    178         </if>
     144        <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
    179145    </target>
     146
    180147    <target name="ppthtml-add-static">
    181         <if><bool><istrue value="${execute}"/></bool>
    182             <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
    183         </if>
     148        <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
    184149    </target>
     150
    185151    <target name="rtftohtml-add-static">
    186         <if><bool><istrue value="${execute}"/></bool>
    187             <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
    188         </if>
     152        <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
    189153    </target>
     154
    190155    <target name="gdbm-add-static">
    191         <if><bool><istrue value="${execute}"/></bool>
    192             <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
    193         </if>
     156        <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
    194157    </target>
    195158
    196159
    197 
    198160</project>
Note: See TracChangeset for help on using the changeset viewer.