Changeset 19931

Show
Ignore:
Timestamp:
26.06.2009 15:01:50 (10 years ago)
Author:
kjdon
Message:

working on configure and compile common-src always, then configure and compile build-src if necessary. don't want the workaround of reconfiguring build-src after compiling comon-src

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/build.xml

    r19930 r19931  
    180180  </condition> 
    181181   
     182  <condition property="static.arg" value="LDFLAGS=-static"> 
     183    <isset property="compile.static"/> 
     184  </condition> 
     185  <condition property="static.arg" value=" "> 
     186    <not> 
     187      <isset property="compile.static"/> 
     188    </not> 
     189  </condition> 
     190   
    182191  <!-- where is search4j tool --> 
    183192  <condition property="search4j.exec" value="bin/search4j.exe">  
     
    202211    <isset property="disable.collection.building"/> 
    203212  </condition> 
    204  
     213   
     214  <property name="build.src.home" value="${gs2build.home}/build-src"/> 
    205215  <property name="gdbm.home" value="${common.src.home}/packages/gdbm"/> 
    206216  <property name="mg.home" value="${common.src.home}/indexers/mg"/> 
     
    318328    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare new-install'."/> 
    319329 
    320   <target name="install-common-src" depends="init" if="collection.building.disabled" 
    321     description="Install (configure, compile, install) only the common-src package (shared code from Greenstone 2. This is only needed when not installing the collection building package." > 
     330  <target name="install-common-src" depends="init"  
     331    description="Install (configure, compile, install) only the common-src package (shared code from Greenstone 2). " > 
    322332    <antcall target="configure-common-src"/> 
    323333    <antcall target="compile-common-src"/> 
     
    329339    description="Install (configure, compile, install) the Greenstone 2 collection building package." > 
    330340    <antcall target="configure-collection-building"/> 
     341    <antcall target="tweak-makefiles" /> 
    331342    <antcall target="compile-collection-building"/> 
    332     <antcall target="install-auxiliary-jar-files"/> 
    333     <antcall target="install-jni-files"/> 
    334343  </target> 
    335344     
     
    10631072    </svn> 
    10641073  </target> 
     1074 
    10651075   
    10661076  <target name="configure-packages" depends="init,configure-javagdbm"  
     
    11281138 
    11291139  <!-- unix --> 
    1130     <exec executable="${src.packages.home}/search4j/configure" os="${os.unix}" dir="${src.packages.home}/search4j" failonerror="true"><arg line="--bindir=${basedir}/bin"/></exec> 
     1140    <exec executable="${src.packages.home}/search4j/configure" os="${os.unix}" dir="${src.packages.home}/search4j" failonerror="true"><arg line="--bindir=${basedir}/bin"/> 
     1141      <arg line="${static.arg}"/> 
     1142    </exec> 
    11311143    <exec executable="make" os="${os.unix}" dir="${src.packages.home}/search4j" failonerror="true"/> 
    11321144 
     
    11781190  <target name="update-common-src" depends="init" if="collection.building.disabled"> 
    11791191  </target> 
     1192 
    11801193  <target name="svnupdate-common-src" depends="init" if="collection.building.disabled" unless="nosvn.mode"> 
    11811194    <svn> 
     
    11961209  </target> 
    11971210     
    1198   <target name="configure-common-src" depends="init" if="collection.building.disabled"> 
     1211  <target name="configure-common-src" depends="init"> 
    11991212    <exec executable="${common.src.home}/configure" os="${os.unix}" 
    12001213      dir="${common.src.home}" failonerror="true"> 
    1201       <arg value="--prefix=${common.src.home}"/> <!-- what value to use?? --> 
    1202     </exec> 
    1203   </target> 
    1204  
    1205   <target name="clean-common-src" depends="init" if="collection.building.disabled"> 
     1214      <arg value="--prefix=${gs2build.home}"/> <!-- what value to use?? --> 
     1215      <arg line="${static.arg}"/> 
     1216    </exec> 
     1217  </target> 
     1218 
     1219  <target name="clean-common-src" depends="init"> 
    12061220    <!-- unix:  --> 
    12071221    <exec executable="make" os="${os.unix}" dir="${common.src.home}" failonerror="true"> 
     
    12151229    </exec> 
    12161230  </target> 
    1217   <target name="distclean-common-src" depends="init" if="collection.building.disabled"> 
     1231  <target name="distclean-common-src" depends="init"> 
    12181232    <exec executable="make" os="${os.unix}" dir="${common.src.home}" failonerror="true"> 
    12191233      <arg value="distclean"/> 
    12201234    </exec> 
    12211235  </target> 
    1222   <target name="compile-common-src" depends="init" if="collection.building.disabled"> 
     1236  <target name="compile-common-src" depends="init"> 
    12231237    <!-- unix: --> 
    12241238    <exec executable="make" os="${os.unix}" dir="${common.src.home}" failonerror="true"> 
     
    12341248 
    12351249  <target name="update-collection-building" if="collection.building.enabled"  
    1236     depends="init,svnupdate-collection-building,gs2build-edit-setup-bat,configure-collection-building,clean-collection-building,compile-collection-building" 
     1250    depends="init,svnupdate-collection-building,gs2build-edit-setup-bat,configure-common-src,clean-common-src,compile-common-src,configure-collection-building,clean-collection-building,compile-collection-building" 
    12371251    description="Update (SVN update, configure, compile etc) only the collection building components"/> 
    12381252 
     
    12441258  </target> 
    12451259 
    1246   <target name="configure-collection-building" depends="init" if="collection.building.enabled" 
    1247     description="Configure only the collection building components"> 
    1248     <exec executable="${gs2build.home}/configure" os="${os.unix}" 
    1249       dir="${gs2build.home}" failonerror="true"> 
    1250       <arg value="--prefix=${gs2build.home}"/> 
    1251     </exec> 
     1260  <target name="configure-collection-building" depends="init,configure-build-src" if="collection.building.enabled" 
     1261    description="Configure the collection building components"> 
    12521262  </target> 
    12531263 
     
    12601270    if="collection.building.enabled"/> 
    12611271 
    1262   <target name="compile-collection-building" depends="init,compile-gs2build,compile-gli" if="collection.building.enabled" 
     1272  <target name="compile-collection-building" depends="init,compile-build-src,compile-gli" if="collection.building.enabled" 
    12631273    description="Compile only the collection building components"> 
     1274    <!-- make install for common-src --> 
     1275    <!-- unix: --> 
     1276    <exec executable="make" os="${os.unix}" dir="${common.src.home}" failonerror="true"> 
     1277      <arg value="install"/> 
     1278    </exec> 
     1279       
     1280    <!-- windows: --> 
     1281    <exec executable="nmake" dir="${common.src.home}" os="${os.windows}" failonerror="true"> 
     1282      <arg value="/f"/> 
     1283      <arg value="win32.mak"/> 
     1284      <arg value="install"/>     
     1285    </exec> 
     1286 
     1287    <!-- install gs2build indexers for windows --> 
     1288      <if> 
     1289    <bool><istrue value="${current.os.iswindows}"/></bool>  
     1290    <copy todir="${gs2build.home}/bin/windows"> 
     1291      <fileset dir="${gs2build.home}/common-src/indexers/bin"> 
     1292        <include name="*.*"/> 
     1293      </fileset> 
     1294    </copy> 
     1295      </if> 
     1296 
     1297    <!-- LuceneWrapper jar file not installed by default --> 
     1298    <mkdir dir="${gs2build.home}/bin/java"/> 
     1299    <copy file="${lucene.home}/LuceneWrapper.jar" todir="${gs2build.home}/bin/java"/> 
     1300 
    12641301  </target> 
    12651302 
     
    14271464  </target> 
    14281465  
    1429   <target name="compile-gs2build" depends="init" if="collection.building.enabled"> 
    1430  
    1431     <!-- unix: make, make install --> 
    1432     <if> 
    1433       <bool><istrue value="${current.os.isunix}"/></bool> 
    1434  
    1435       <!-- WORKAROUND: make common-src and reconfigure --> 
    1436       <!-- this is a workaround to a problem with the gsdl build code --> 
    1437       <!-- expat needs to be compiled before the perl XML Parser is configured --> 
    1438       <exec executable="make" dir="${gs2build.home}/common-src" failonerror="true"/> 
    1439       <antcall target="configure-collection-building"/> 
    1440       <!-- /WORKAROUND --> 
    1441  
    1442       <exec executable="make" dir="${gs2build.home}" failonerror="true"/> 
    1443       <exec executable="make" dir="${gs2build.home}" failonerror="true"> 
    1444         <arg value="install"/> 
    1445       </exec> 
    1446  
    1447     <!-- windows: nmake, nmake install --> 
    1448     <else><if> 
    1449       <bool><istrue value="${current.os.iswindows}"/></bool> 
    1450       <!-- run the setup script --> 
    1451       <!-- <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/>--> 
     1466  <target name="configure-build-src" depends="init" if="collection.building.enabled" 
     1467    description="Configure the build-src component"> 
     1468    <exec executable="${build.src.home}/configure" os="${os.unix}" 
     1469      dir="${build.src.home}" failonerror="true"> 
     1470      <arg value="--prefix=${gs2build.home}"/> 
     1471      <arg line="${static.arg}"/> 
     1472    </exec> 
     1473  </target> 
     1474 
     1475  <!-- common-src is done separately and needs to be compiled first --> 
     1476  <target name="compile-build-src" depends="init" if="collection.building.enabled"> 
     1477     
     1478    <exec executable="make" dir="${build.src.home}" os="${os.unix}" failonerror="true"/> 
     1479    <exec executable="make" dir="${build.src.home}" os="${os.unix}" failonerror="true"> 
     1480      <arg value="install"/> 
     1481    </exec> 
     1482 
     1483    <!-- run the setup script --> 
     1484    <!-- <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/>--> 
    14521485      <!--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-->  
    1453       <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" failonerror="true"> 
     1486      <exec executable="nmake" dir="${build.src.home}" os="${os.windows}" failonerror="true"> 
    14541487        <arg value="/f"/> 
    14551488        <arg value="win32.mak"/> 
    14561489      </exec> 
    1457       <exec executable="nmake" dir="${gs2build.home}" failonerror="true"> 
     1490      <exec executable="nmake" dir="${build.src.home}" os="${os.windows}" failonerror="true"> 
    14581491        <arg value="/f"/> 
    14591492        <arg value="win32.mak"/> 
    14601493        <arg value="install"/> 
    14611494      </exec> 
    1462  
    1463       <!-- install gs2build indexers --> 
    1464       <copy todir="${gs2build.home}/bin/windows"> 
    1465         <fileset dir="${gs2build.home}/common-src/indexers/bin"> 
    1466           <include name="*.*"/> 
    1467         </fileset> 
    1468       </copy> 
    1469  
    1470     </if></else></if> 
    1471  
    1472     <!-- LuceneWrapper jar file not installed by default --> 
    1473     <mkdir dir="${gs2build.home}/bin/java"/> 
    1474     <copy file="${lucene.home}/LuceneWrapper.jar" todir="${gs2build.home}/bin/java"/> 
    1475  
    14761495  </target> 
    14771496   
     
    16261645  </target> 
    16271646 
    1628  
     1647  <!-- ============= tweaks for making compilation static ========== -->   
     1648  <target name="tweak-makefiles" depends="init" if="compile.static"> 
     1649    <antcall target="rtftohtml-add-static" /> 
     1650  </target> 
     1651     
     1652  <target name="rtftohtml-add-static" depends="init" if="collection.building.enabled"> 
     1653    <rsr file="${gs2build.home}/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" /> 
     1654  </target> 
     1655     
    16291656</project>