Show
Ignore:
Timestamp:
25.09.2013 21:27:04 (6 years ago)
Author:
ak19
Message:

Since the configure files and Makefile.in in build-src have been updated to compile gnome-lib for GS3 (the greenstone2 toplevel configure files were updated to configure gnome-lib for GS2), build.xml no longer awkwardly compiles gnome-lib during ant prepare, expecting the user to source devel.bash, which itself was only necessary owing to devel.bash not sourcing dot-slash-script. Now build.xml checks out gnome-lib during ant-prepare, but compiles it near the start of ant install. Then greenstone3 compilation proceeds as usual and succeeds with the current changes to build-src files.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r28297 r28311  
    445445  </condition> 
    446446 
     447  <!-- if we're told to work with gnome-lib, or if there's a gnome-lib-minimal that the user 
     448       has placed in gs2build/ext, then compile gs2build after sourcing gnome-lib environment --> 
     449  <condition property="opt.gnomelibext.arg"  
     450         value="--enable-gnome-lib-ext" else=" "> 
     451    <or> 
     452      <available file="${gs2build.home}/ext/gnome-lib-minimal" type="dir"/> 
     453      <istrue value="${use.gnomelib.ext}"/> 
     454      <istrue value="${checkout.gnomelib.ext}"/> 
     455    </or> 
     456   </condition> 
     457 
    447458<!-- if you want to disable wvware, do so here: set the value (not else) field to contain minus-minus-disable-wvware --> 
    448   <condition property="gs2.opt.args" value=" " else="--disable-mg --disable-mgpp --disable-accentfold --disable-gdbm --disable-sqlite"> 
     459  <condition property="gs2.opt.args" value="${opt.gnomelibext.arg} " else="--disable-mg --disable-mgpp --disable-accentfold --disable-gdbm --disable-sqlite"> 
    449460    <istrue value="${with.jni}"/> 
    450461  </condition> 
     
    633644    <chmod dir="${basedir}/bin/script" perm="ugo+rx"  
    634645      includes="*.sh,*.pl"/> 
    635  
    636     <!-- if the user has set checkout.gnomelib.ext to true, and is using a compiled version of gnome-lib 
    637      (it would have been compiled up by this stage), remind them to source devel.bash before compiling --> 
    638     <condition property="run.source.devel"> 
    639       <available file="${basedir}/gs2build/ext/gnome-lib/${os.bin.dir}" type="dir"/> 
    640     </condition> 
    641     <if><bool> 
    642     <and> 
    643       <istrue value="${checkout.gnomelib.ext}"/> 
    644       <istrue value="${run.source.devel}"/> 
    645     </and> 
    646       </bool> 
    647 <!-- This is automatically done now in the gs2build/common-src/packages/configure script if the 
    648      gnomelib.ext directory is detected  
    649  
    650       <echo> 
    651     ********************************************* 
    652     As you have set checkout.gnomelib.ext,  
    653     before running ant install next, 
    654     run source devel.bash from  
    655     ${basedir}/gs2build/ext/gnome-lib  
    656     *********************************************</echo> 
    657 --> 
    658     </if> 
    659646  </target> 
    660647 
    661648  <!-- install-common-src and install-collection-building are mutually exclusive and either one or the other will be done depending on whether collection building is enabled or not --> 
    662   <target name="install" depends="init,install-common-src,install-collection-building,install-runtime,install-solr-ext,setup-for-eclipse" 
     649  <!--before configuring build-src, make sure that gnome-lib is compiled up--> 
     650  <target name="install" depends="init,compile-gnome-lib,install-common-src,install-collection-building,install-runtime,install-solr-ext,setup-for-eclipse" 
    663651    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare new-install'."/> 
    664652 
     
    26312619    <property name="gnome.lib.compiled.dir" value="${basedir}/gs2build/ext/gnome-lib/${os.bin.dir}"/> 
    26322620 
    2633     <condition property="gnome.src.lib.present"> 
    2634       <available file="${gnome.lib.src.dir}" type="dir" /> 
    2635     </condition> 
    2636     <condition property="gnome.compiled.lib.present"> 
     2621    <condition property="gnome.compiled.lib.present" value="true" else="false"> 
    26372622      <available file="${gnome.lib.compiled.dir}" type="dir"/> 
    26382623    </condition> 
    2639     <condition property="gnome.lib.min.present"> 
     2624    <condition property="gnome.lib.min.present" value="true" else="false"> 
    26402625      <available file="${basedir}/gs2build/ext/gnome-lib-minimal" type="dir" /> 
    26412626    </condition> 
    26422627 
     2628    <!-- Make sure to checkout gnome-lib if it was not checked out at this stage  
     2629     since we're instructed to do so in th pre-condition to this target --> 
    26432630    <if> 
    26442631      <bool> 
    26452632    <and> 
    2646       <!-- <istrue value="${checkout.gnomelib.ext}"/> make sure user wants gnome-lib --> 
    2647       <not><isset property="${gnome.lib.min.present}"/></not> <!-- no gnome-lib-minimal binary present --> 
     2633      <istrue value="${checkout.gnomelib.ext}"/> 
     2634      <not><istrue value="${gnome.lib.min.present}"/></not> 
     2635      <not><istrue value="${gnome.src.lib.present}"/></not> 
     2636    </and> 
     2637      </bool> 
     2638      <antcall target="checkout-gnome-lib"/> 
     2639    </if> 
     2640 
     2641    <!-- Now check we have the gnome-lib src folder at last --> 
     2642    <condition property="gnome.src.lib.present" value="true" else="false"> 
     2643      <available file="${gnome.lib.src.dir}" type="dir" /> 
     2644    </condition> 
     2645 
     2646    <!--<echo>MIN: ${gnome.lib.min.present} 
     2647      SRC LIB: ${gnome.src.lib.present} 
     2648      COMPILED: ${gnome.compiled.lib.present}</echo>--> 
     2649 
     2650    <if> 
     2651      <bool> 
     2652    <and> 
     2653      <isfalse value="${gnome.lib.min.present}"/> <!-- no gnome-lib-minimal binary present --> 
    26482654      <istrue value="${gnome.src.lib.present}"/> <!-- gnome-lib folder for compilation is present--> 
    2649       <not><istrue value="${gnome.compiled.lib.present}"/></not> <!-- gnome-lib not yet compiled, so no gnome-lib/os subfolder yet --> 
     2655      <isfalse value="${gnome.compiled.lib.present}"/> <!-- gnome-lib not yet compiled, so no gnome-lib/os subfolder yet --> 
    26502656    </and> 
    26512657      </bool> 
     
    26662672 
    26672673      <antcall target="checkout-gnome-lib"/> 
    2668       <antcall target="compile-gnome-lib"/> 
     2674      <!--Compilation of gnome-lib happens during ant install, just before configuring (common-src and) build-src--> 
    26692675 
    26702676      <else>