Changeset 28044

Show
Ignore:
Timestamp:
14.08.2013 18:49:59 (6 years ago)
Author:
ak19
Message:

Related to previous commit: all exec tasks specific to windows now check osfamily=windows rather than checking os=os.winows, where the latter is a property string defined by Greenstone as a list of recognised Windows versions and which can grow in future, requiring constant maintenance. Using osfamily does not require maintenance and at least won't fail silently when using tasks such as ant start and start-tomcat. Can't use osfamily=unix in the same way, since osfamily=mac is defined as separate from unix (and doesn't include os/2), so sticking to the os=os.unix test for when exec should behave the same on mac as on linux, since the os.unix property is defined to be unix/mac/solaris as a group and thus works fine for the intentions in build.xml.

Files:
1 modified

Legend:

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

    r28043 r28044  
    737737            </exec> 
    738738 
    739         <exec executable="${gs2build.home}/bin/windows/which" os="${os.windows}" spawn="false" outputproperty="full.perl.path"> 
     739        <exec executable="${gs2build.home}/bin/windows/which" osfamily="windows" spawn="false" outputproperty="full.perl.path"> 
    740740              <arg value="perl" /> 
    741741            </exec> 
     
    10681068   
    10691069  <target name="prepare-solr-ext" depends="init" > 
    1070     <exec executable="ant.bat" os="${os.windows}" dir="${solr-ext.home}" spawn="false"> 
     1070    <exec executable="ant.bat" osfamily="windows" dir="${solr-ext.home}" spawn="false"> 
    10711071      <arg value="add-service"/> 
    10721072    </exec> 
     
    13511351      <env key="FEDORA_HOME" path="${fedora.home}"/> 
    13521352    </exec> 
    1353     <exec executable="${catalina.home}/bin/catalina.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true"> 
     1353    <exec executable="${catalina.home}/bin/catalina.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="true"> 
    13541354      <arg value="jpda" /> 
    13551355      <arg value="start" /> 
     
    13921392 
    13931393    <!-- using osfamily instead of testing os against os.windows list of recognised windows versions 
    1394      so that future windows versions are included. See http://simonharrer.wordpress.com/tag/osfamily/ --> 
     1394     so that future windows versions are included. See http://simonharrer.wordpress.com/tag/osfamily/  
     1395    Can't use the osfamily test for linux-type machines as a group since osfamily=unix is separate from osfamily=mac, 
     1396    see http://ant-contrib.sourceforge.net/tasks/tasks/osfamily.html --> 
    13951397 
    13961398    <exec executable="${catalina.home}/bin/startup.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false"> 
     
    15531555    </exec> 
    15541556 
    1555     <exec executable="cmd" os="${os.windows}" dir="${catalina.home}/logs" spawn="false"> 
     1557    <exec executable="cmd" osfamily="windows" dir="${catalina.home}/logs" spawn="false"> 
    15561558      <arg line="/c echo. > catalina.out"/> 
    15571559    </exec> 
    1558     <exec executable="cmd" os="${os.windows}" dir="${web.writablehome}/logs" spawn="false"> 
     1560    <exec executable="cmd" osfamily="windows" dir="${web.writablehome}/logs" spawn="false"> 
    15591561      <arg line="/c echo. > greenstone.log"/> 
    15601562    </exec> 
    1561     <exec executable="cmd" os="${os.windows}" dir="${web.writablehome}/logs" spawn="false"> 
     1563    <exec executable="cmd" osfamily="windows" dir="${web.writablehome}/logs" spawn="false"> 
    15621564      <arg line="/c echo. > server.log"/> 
    15631565    </exec> 
     
    20712073         the "install" argument to copy the gdbmjava.dll into the correct location. --> 
    20722074    <echo>Windows: compile javagdbm</echo> 
    2073     <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}" failonerror="true">      
     2075    <exec executable="${javagdbm.home}/winMake.bat" osfamily="windows" dir="${javagdbm.home}" failonerror="true">      
    20742076      <env key="GSDL3SRCHOME" path="${basedir}"/> 
    20752077    </exec> 
    2076     <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}" failonerror="true"> 
     2078    <exec executable="${javagdbm.home}/winMake.bat" osfamily="windows" dir="${javagdbm.home}" failonerror="true"> 
    20772079      <env key="GSDL3SRCHOME" path="${basedir}"/> 
    20782080      <arg value="install"/> 
     
    22372239    </if> 
    22382240    <!-- windows: -->     
    2239     <exec executable="nmake" dir="${common.src.home}" os="${os.windows}" failonerror="true"> 
     2241    <exec executable="nmake" dir="${common.src.home}" osfamily="windows" failonerror="true"> 
    22402242      <arg value="/f"/> 
    22412243      <arg value="win32.mak"/> 
     
    22522254    </if> 
    22532255    <!-- windows: distclean = clean + remove configure products (remove makefiles). But on Windows there is no removing makefiles, so we just call clean -->     
    2254     <exec executable="nmake" dir="${common.src.home}" os="${os.windows}" failonerror="true"> 
     2256    <exec executable="nmake" dir="${common.src.home}" osfamily="windows" failonerror="true"> 
    22552257      <arg value="/f"/> 
    22562258      <arg value="win32.mak"/> 
     
    22652267    </exec> 
    22662268    <!-- windows: --> 
    2267     <exec executable="nmake" dir="${common.src.home}" os="${os.windows}" failonerror="true"> 
     2269    <exec executable="nmake" dir="${common.src.home}" osfamily="windows" failonerror="true"> 
    22682270      <arg value="/f"/> 
    22692271      <arg value="win32.mak"/> 
     
    23112313       
    23122314    <!-- windows: --> 
    2313     <exec executable="nmake" dir="${common.src.home}" os="${os.windows}" failonerror="true"> 
     2315    <exec executable="nmake" dir="${common.src.home}" osfamily="windows" failonerror="true"> 
    23142316      <arg value="/f"/> 
    23152317      <arg value="win32.mak"/> 
     
    24052407      resolveExecutable="true" failonerror="true"/> 
    24062408    <!-- windows --> 
    2407     <exec executable="clean.bat" os="${os.windows}" dir="${gli.home}" 
     2409    <exec executable="clean.bat" osfamily="windows" dir="${gli.home}" 
    24082410      resolveExecutable="true" failonerror="true"/> 
    24092411  </target> 
     
    24202422        resolveExecutable="true" failonerror="true"/> 
    24212423      <!-- windows --> 
    2422       <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}" resolveExecutable="true" failonerror="true"/> 
     2424      <exec executable="makegli.bat" osfamily="windows" dir="${gli.home}" resolveExecutable="true" failonerror="true"/> 
    24232425      <!--remote gli--> 
    2424       <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}" 
     2426      <exec executable="makejar.bat" osfamily="windows" dir="${gli.home}" 
    24252427        resolveExecutable="true" failonerror="true"/>  
    24262428      <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" /> 
     
    24382440      <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.home}/lib"/> 
    24392441    </exec> 
    2440     <exec executable="${basedir}/gli/gli.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true"> 
     2442    <exec executable="${basedir}/gli/gli.bat" osfamily="windows" dir="${basedir}/gli" spawn="true"> 
    24412443      <env key="GSDL3PATH" path="${basedir}"/> 
    24422444      <env key="GSDLPATH" path="${gs2build.home}"/> 
     
    26952697    </if> 
    26962698    <!-- windows: -->     
    2697     <exec executable="nmake" dir="${build.src.home}" os="${os.windows}" failonerror="true"> 
     2699    <exec executable="nmake" dir="${build.src.home}" osfamily="windows" failonerror="true"> 
    26982700      <arg value="/f"/> 
    26992701      <arg value="win32.mak"/> 
     
    27122714    </if> 
    27132715    <!-- windows: distclean = clean + remove configure products (remove makefiles). But on Windows there is no removing makefiles, so we just call clean -->     
    2714     <exec executable="nmake" dir="${build.src.home}" os="${os.windows}" failonerror="true"> 
     2716    <exec executable="nmake" dir="${build.src.home}" osfamily="windows" failonerror="true"> 
    27152717      <arg value="/f"/> 
    27162718      <arg value="win32.mak"/> 
     
    27412743 
    27422744    <!-- run the setup script --> 
    2743     <!-- <exec executable="${compile.windows.c++.setup}" os="${os.windows}" failonerror="true"/>--> 
     2745    <!-- <exec executable="${compile.windows.c++.setup}" osfamily="windows" failonerror="true"/>--> 
    27442746      <!--Above does not work: even though vcvars.bat executes, the env changes it makes don't get saved. Need user to run vcvars.bat first before calling ant-->  
    2745       <exec executable="nmake" dir="${build.src.home}" os="${os.windows}" failonerror="true"> 
     2747      <exec executable="nmake" dir="${build.src.home}" osfamily="windows" failonerror="true"> 
    27462748        <arg value="/f"/> 
    27472749        <arg value="win32.mak"/> 
    27482750    <arg value="GSDLHOME=${gs2build.home}"/> 
    27492751      </exec> 
    2750       <exec executable="nmake" dir="${build.src.home}" os="${os.windows}" failonerror="true"> 
     2752      <exec executable="nmake" dir="${build.src.home}" osfamily="windows" failonerror="true"> 
    27512753        <arg value="/f"/> 
    27522754        <arg value="win32.mak"/>