Changeset 27034

Show
Ignore:
Timestamp:
08.03.2013 15:57:30 (7 years ago)
Author:
ak19
Message:

After checking out gnome-lib, it is compiled up by running its CASCADE-MAKE.sh script which already sources devel.bash for its temporary environment. Also added a message at the end of the prepare step, telling the developer (if they turned on use.support.lib) to source devel.bash before compiling gs3 with ant install.

Files:
1 modified

Legend:

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

    r27028 r27034  
    535535    <chmod dir="${basedir}/bin/script" perm="ugo+rx"  
    536536      includes="*.sh,*.pl"/> 
     537 
     538    <!-- if the user has set use.support.lib to true, and is using a compiled version of gnome-lib 
     539     (it would have been compiled up by this stage), remind them to source devel.bash before compiling --> 
     540    <condition property="run.source.devel"> 
     541      <available file="${basedir}/gs2build/ext/gnome-lib/${os.bin.dir}" type="dir"/> 
     542    </condition> 
     543    <if><bool> 
     544    <and> 
     545      <istrue value="${use.support.lib}"/> 
     546      <istrue value="${run.source.devel}"/> 
     547    </and> 
     548      </bool> 
     549      <echo> 
     550    ********************************************* 
     551    As you have set use.support.lib,  
     552    before running ant install next, 
     553    run source devel.bash from  
     554    ${basedir}/gs2build/ext/gnome-lib  
     555    *********************************************</echo> 
     556    </if> 
    537557  </target> 
    538558 
     
    22272247  </target> 
    22282248 
     2249 
     2250  <!-- Compile up gnome-lib src folder if: use.support.lib is turned on, and if not using the binary 
     2251       version (gnome-lib-minimal), and if the gnome-lib src folder is not already compiled up. --> 
     2252  <target name="compile-gnome-lib" if="use.support.lib"> 
     2253 
     2254    <!-- http://stackoverflow.com/questions/3290307/sourcing-a-shell-profile-in-an-ant-build-file  
     2255     TODO: CASCADE-MAKE already sources devel.bash, but we still want to source it more globally,  
     2256     so that the rest of the GS3 compilation process also has access to those env variables --> 
     2257     
     2258    <property name="gnome.lib.src.dir" value="${basedir}/gs2build/ext/gnome-lib"/> 
     2259    <property name="gnome.lib.compiled.dir" value="${basedir}/gs2build/ext/gnome-lib/${os.bin.dir}"/> 
     2260 
     2261    <condition property="gnome.src.lib.present"> 
     2262      <available file="${gnome.lib.src.dir}" type="dir" /> 
     2263    </condition> 
     2264    <condition property="gnome.compiled.lib.present"> 
     2265      <available file="${gnome.lib.compiled.dir}" type="dir"/> 
     2266    </condition> 
     2267    <condition property="gnome.lib.min.present"> 
     2268      <available file="${basedir}/gs2build/ext/gnome-lib-minimal" type="dir" /> 
     2269    </condition> 
     2270 
     2271    <if> 
     2272      <bool> 
     2273    <and> 
     2274      <!-- <istrue value="${use.support.lib}"/> make sure user wants gnome-lib --> 
     2275      <not><isset property="${gnome.lib.min.present}"/></not> <!-- no gnome-lib-minimal binary present --> 
     2276      <istrue value="${gnome.src.lib.present}"/> <!-- gnome-lib folder for compilation is present--> 
     2277      <not><istrue value="${gnome.compiled.lib.present}"/></not> <!-- gnome-lib not yet compiled, so no gnome-lib/os subfolder yet --> 
     2278    </and> 
     2279      </bool> 
     2280 
     2281      <!-- then compile it. Only necessary for mac/linux, since windows doesn't need gnome lib --> 
     2282      <exec executable="/bin/bash" dir="${gnome.lib.src.dir}" failonerror="true"> 
     2283        <arg value="CASCADE-MAKE.sh"/> 
     2284      </exec>   
     2285    </if> 
     2286  </target> 
     2287 
     2288 
    22292289  <target name="prepare-gnome-lib" depends="init" if="collection.building.enabled" unless="gnome-lib.present"> 
    22302290    <antcall target="checkout-gnome-lib"/> 
     2291    <antcall target="compile-gnome-lib"/> 
    22312292  </target> 
    22322293