Changeset 23852

Show
Ignore:
Timestamp:
05.04.2011 15:27:16 (8 years ago)
Author:
davidb
Message:

Additional capability introduced to control how Perl is found.

1. if perl.path is set in build.properies then this is used ('perl' is concatenated on to the end)
2. failing that, if the environment variable PERLPATH is set this is used (again 'perl' is concatenated)
3. failing that, for Unix systems, 'which' is used to locate it on the path

Files:
1 modified

Legend:

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

    r23849 r23852  
    7979       environment variable PERLPATH, and failing that assumes 'perl'  
    8080       is on environment PATH --> 
     81 
    8182  <if><bool><isset property="env.PERLPATH"/></bool> 
    8283      <property name="perl.path" value="${env.PERLPATH}"/> 
     84  <else> 
     85     <echo> 
     86  Using PATH enviroment variable to locate Perl. 
     87    <exec executable="which"  spawn="false" outputproperty="full.perl.path"> 
     88      <arg value="perl" /> 
     89    </exec> 
     90    <echo> 
     91      <if><equals  arg1="${full.perl.path}" arg2="/usr/bin/perl" /> 
     92    Non-stanard location of Perl found: ${full.perl.path} 
     93    Set the environment variable PERLPATH or the perl.path property in 
     94      build.properties to explicitly control the version of Perl used. 
     95    </echo> 
     96  </else> 
    8397  </if> 
     98 
     99<!-- 
     100  <if><bool><isset property="perl.on.path"/></bool> 
     101    <propertyregex property="perl.path" 
     102          input="perl.on.path" 
     103          regexp=".*([^\/]*)" 
     104          select="\1" /> 
     105  </if> 
     106--> 
    84107 
    85108  <!-- full.perl.path is for pretty-printing only, e.g. used in target "start" --> 
     
    14601483    </exec> 
    14611484 
    1462     <!-- windows: just the java stuff. Calling without the "compile" argument first will run winMake.bat with "all" which will then perform both the compile AND link targets in jni/win32.mak (thereby also generating gdbmjava.dll). Then we run the same command with the "install" argument to copy the gdbmjava.dll into the correct location. --> 
     1485    <!-- windows: Calling without the "compile" argument first will run winMake.bat with  
     1486         "all" which will then perform both the compile AND link targets in jni/win32.mak  
     1487         (thereby also generating gdbmjava.dll). Then we run the same command with  
     1488         the "install" argument to copy the gdbmjava.dll into the correct location. --> 
    14631489    <echo>Windows: compile javagdbm</echo> 
    1464     <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}" failonerror="true" /> 
    14651490    <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}" failonerror="true"> 
    1466 <!--      <env key="GSDLHOME" path="${gs2build.home}"/> --> 
     1491      <env key="GSDLHOME" path="${gs2build.home}"/> 
     1492    </exec> 
     1493    <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}" failonerror="true"> 
     1494      <env key="GSDLHOME" path="${gs2build.home}"/> 
    14671495      <arg value="install"/> 
    14681496    </exec>