Show
Ignore:
Timestamp:
22.06.2009 12:41:14 (10 years ago)
Author:
kjdon
Message:

more tidying up and generally hackign at the build file. not tested at all, but I want to do a fresh checkout with the file

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/build.xml

    r19843 r19871  
    6262  <property name="src.packages.home" value="${basedir}/src/packages"/> 
    6363  <!-- get rid of one of these --> 
    64   <property name="gdbm.home" value="${gs2build.home}/common-src/packages/gdbm"/> 
    65   <property name="gdbm.installed.path" value="${gs2build.home}/common-src/packages/gdbm"/>   
     64 <!-- <property name="gdbm.home" value="${gs2build.home}/common-src/packages/gdbm"/> 
     65  <property name="gdbm.installed.path" value="${gs2build.home}/common-src/packages/gdbm"/>  --> 
    6666  <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/> 
    6767  <property file="build.properties"/> 
     
    160160    </not> 
    161161  </condition> 
     162  <condition property="collection.building.disabled"> 
     163    <isset property="disable.collection.building"/> 
     164  </condition> 
    162165 
    163166  <condition property="collection.building.enabled.windows"> 
     
    175178  </condition> 
    176179   
    177   <condition property="independent-indexers"> 
     180<!--  <condition property="independent-indexers"> 
    178181    <isset property="disable.collection.building"/> 
    179   </condition> 
     182  </condition>--> 
    180183 
    181184  <!-- where is search4j tool --> 
     
    187190   
    188191  <!-- ============= Base dirs for each package and component ============ --> 
    189   <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/> 
     192<!--  <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/>--> 
    190193  <property name="src.gsdl3.home" value="${src.home}/org/greenstone/gsdl3"/> 
    191194  <property name="anttasks.home" value="${src.home}/org/greenstone/anttasks"/> 
     
    193196  <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/> 
    194197   
    195   <condition property="indexers.home" value="${basedir}/src/packages/indexers"> 
     198<!--  <condition property="indexers.home" value="${basedir}/src/packages/indexers"> 
    196199    <isset property="disable.collection.building"/> 
    197   </condition> 
    198   <condition property="indexers.home" value="${gs2build.home}/common-src/indexers"> 
     200  </condition>--> 
     201   
     202<!--  <condition property="indexers.home" value="${gs2build.home}/common-src/indexers"> 
     203    <not> 
     204      <isset property="disable.collection.building"/> 
     205    </not> 
     206  </condition>--> 
     207 
     208  <condition property="common.src.home" value="${gs2build.home}/common-src"> 
    199209    <not> 
    200210      <isset property="disable.collection.building"/> 
     
    202212  </condition> 
    203213 
    204   <property name="mg.home" value="${indexers.home}/mg"/> 
    205   <property name="mgpp.home" value="${indexers.home}/mgpp"/> 
    206   <property name="lucene.home" value="${indexers.home}/lucene-gs"/> 
     214  <condition property="common.src.home" value="${basedir}/common-src"> 
     215    <isset property="disable.collection.building"/> 
     216  </condition> 
     217 
     218  <property name="gdbm.home" value="${common.src.home}/packages/gdbm"/> 
     219  <property name="mg.home" value="${common.src.home}/indexers/mg"/> 
     220  <property name="mgpp.home" value="${common.src.home}/indexers/mgpp"/> 
     221  <property name="lucene.home" value="${common.src.home}/indexers/lucene-gs"/> 
    207222 
    208223  <!--  ==================== Compilation Control Options ==================== --> 
     
    316331  </target> 
    317332 
    318   <target name="new-install" depends="init,install-collection-building,install-runtime" 
     333  <!-- 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 --> 
     334  <target name="new-install" depends="init,install-common-src,install-collection-building,install-runtime" 
    319335    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare new-install'."/> 
    320336 
     337  <target name="install-common-src" depends="init,configure-common-src,compile-common-src"/> 
    321338  <target name="install-collection-building" depends="init,configure-collection-building,compile-collection-building"/> 
    322339  <target name="install-runtime" depends="init,configure,configure-packages,configure-core,compile-web,compile-packages,compile-core"/> 
    323340   
    324341    
    325   <target name="install" depends="init,install-indexer-files,configure,configure-c++,compile"  
     342<!--  <target name="install" depends="init,install-indexer-files,configure,configure-c++,compile" --> 
     343  <target name="install" depends="init,configure,configure-c++,compile"  
    326344    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/> 
    327345   
     
    11241142  <!-- these targets refer to the greenstone source packages - these need  
    11251143  updating less often, so are in  separate targets to the core --> 
    1126   <target name="prepare-packages" depends="init,prepare-indexers"/> 
    1127    
    1128   <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nosvn.mode"> 
     1144  <target name="prepare-packages" depends="init"/> 
     1145   
     1146<!--  <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nosvn.mode"> 
    11291147    <svn> 
    11301148      <checkout url="${svn.root}/indexers/${branch.path}" destPath="${src.packages.home}/indexers" revision="${branch.revision}"/> 
     
    11341152  <target name="prepare-indexers" depends="init" if="independent-indexers" unless="indexers.present"> 
    11351153    <antcall target="checkout-indexers"/> 
    1136   </target> 
     1154  </target> --> 
    11371155 
    11381156  <target name="update-packages" depends="init,svnupdate-packages,configure-packages,clean-packages,compile-packages" 
     
    11451163  </target> 
    11461164   
    1147   <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers"  
     1165<!--  <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers" add common-src here instead.--> 
     1166  <target name="configure-packages" depends="init,configure-javagdbm"  
    11481167    description="Configure only the packages."/> 
    11491168   
     
    11651184  Shouldn't they be configured when collection building is ENabled? --> 
    11661185 
    1167   <!-- <target name="configure-indexers" depends="init" if="independent-indexers"> --> 
     1186<!--  <target name="configure-indexers" depends="init" if="independent-indexers"> 
    11681187  <target name="configure-indexers" depends="init"> 
    11691188    <echo>Configuring Indexers</echo> 
    11701189    <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}"> 
    1171       <arg value="--prefix=${basedir}"/> 
    1172       <arg value="--libdir=${lib.jni}"/> 
     1190      <arg value="- -prefix=${basedir}"/> 
     1191      <arg value="- -libdir=${lib.jni}"/> 
    11731192    </exec>           
    1174   </target> 
    1175  
    1176   <target name="clean-packages" depends="init,clean-javagdbm,clean-indexers" description="Clean only the packages"/> 
     1193  </target> --> 
     1194 
     1195  <target name="clean-packages" depends="init,clean-javagdbm" description="Clean only the packages"/> 
    11771196 
    11781197  <target name="clean-javagdbm" depends="init"> 
     
    11831202  </target> 
    11841203   
    1185   <target name="clean-indexers" depends="init" if="independent-indexers"> 
     1204<!--  <target name="clean-indexers" depends="init" if="independent-indexers"> 
    11861205    <exec executable="make" os="${os.unix}" 
    11871206      dir="${indexers.home}"> 
     
    11921211      <arg value="clean"/> 
    11931212    </exec> 
    1194   </target> 
    1195  
    1196   <target name="distclean-packages" depends="init,distclean-javagdbm,distclean-indexers" description="Distclean only the packages"/> 
     1213  </target> --> 
     1214 
     1215  <target name="distclean-packages" depends="init,distclean-javagdbm" description="Distclean only the packages"/> 
    11971216 
    11981217  <target name="distclean-javagdbm" depends="init"> 
     
    12031222  </target> 
    12041223   
    1205   <target name="distclean-indexers" depends="init" if="independent-indexers"> 
     1224<!--  <target name="distclean-indexers" depends="init" if="independent-indexers"> 
    12061225    <exec executable="make" os="${os.unix}" 
    12071226      dir="${indexers.home}"> 
     
    12121231      <arg value="clean"/> 
    12131232    </exec> 
    1214   </target> 
     1233  </target>--> 
    12151234   
    12161235  <target name="compile-packages" description="Compile only the source packages"> 
     
    12411260 
    12421261    <!-- this may be in gs2build - we will be recompiling, but never mind --> 
    1243     <echo>Indexers: make (from ${indexers.home})</echo> 
     1262<!--    <echo>Indexers: make (from ${indexers.home})</echo> 
    12441263    <exec executable="make" os="${os.unix}" dir="${indexers.home}"/> 
    12451264    <echo>Indexers: make install</echo> 
     
    12561275      <arg value="install"/> 
    12571276    </exec> 
    1258  
     1277--> 
    12591278    <!-- install the jar and jni files --> 
    1260     <echo>Install the indexers' jar and jni files</echo> 
     1279  <!--  <echo>Install the indexers' jar and jni files</echo> 
    12611280    <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/> 
    12621281    <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/> 
    12631282    <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/> 
    1264     <antcall target="install-jni-files"/> 
     1283    <antcall target="install-jni-files"/>--> 
    12651284  </target> 
    12661285 
     
    12821301  </target> 
    12831302 
     1303  <target name="install-auxiliary-jar-files" depends="init"> 
     1304    <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/> 
     1305    <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/> 
     1306    <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>     
     1307  </target> 
     1308   
    12841309  <target name="install-jni-files" depends="init,install-jni-files-linux,install-jni-files-windows,install-jni-files-macos"/> 
    12851310 
     
    13091334  </target> 
    13101335   
     1336  <!-- ========common-src targets =================================--> 
     1337  <!-- these are used to get common-src (for indexers, gdbm, sqlite etc) when 
     1338  collection building is not enabled --> 
     1339 
     1340  <target name="update-common-src" depends="init" if="collection.building.disabled"> 
     1341  </target> 
     1342  <target name="svnupdate-common-src" depends="init" if="collection.building.disabled" unless="nosvn.mode"> 
     1343    <svn> 
     1344      <update dir="{common.src.home}" revision="${branch.revision}"/> 
     1345    </svn>     
     1346  </target> 
     1347 
     1348  <target name="prepare-common-src" depends="init" if="collection.building.disabled"> 
     1349    <antcall target="checkout-common-src"/> 
     1350    <antcall target="unzip-windows-packages"/> 
     1351  </target> 
     1352 
     1353  <target name="checkout-common-src" depends="init" if="collection.building.disabled" unless="nosvn.mode"> 
     1354    <echo>checking out common-src</echo> 
     1355    <svn> 
     1356      <checkout url="${svn.root}/gsdl/common-src" destPath="common-src" revision="${branch.revision}"/> 
     1357    </svn> 
     1358  </target> 
     1359     
     1360  <target name="configure-common-src" depends="init" if="collection.building.disabled"> 
     1361    <exec executable="${common.src.home}/configure" os="${os.unix}" 
     1362      dir="${common.src.home}"> 
     1363      <arg value="--prefix=${common.src.home}"/> <!-- ??? --> 
     1364    </exec> 
     1365  </target> 
     1366 
     1367  <target name="clean-common-src" depends="init" if="collection.building.disabled"> 
     1368    <!-- unix:  --> 
     1369    <exec executable="make" os="${os.unix}" dir="${common.src.home}"> 
     1370      <arg value="clean"/> 
     1371    </exec> 
     1372    <!-- windows: -->     
     1373    <exec executable="nmake" dir="${common.src.home}" os="${os.windows}" > 
     1374      <arg value="/f"/> 
     1375      <arg value="win32.mak"/> 
     1376      <arg value="clean"/> 
     1377    </exec> 
     1378  </target> 
     1379  <target name="distclean-common-src" depends="init" if="collection.building.disabled"> 
     1380    <exec executable="make" os="${os.unix}" dir="${common.src.home}"> 
     1381      <arg value="distclean"/> 
     1382    </exec> 
     1383  </target> 
     1384  <target name="compile-common-src" depends="init" if="collection.building.disabled"> 
     1385    <!-- unix: --> 
     1386    <exec executable="make" os="${os.unix}" dir="${common.src.home}"> 
     1387    </exec> 
     1388    <exec executable="make" os="${os.unix}" dir="${common.src.home}"> 
     1389      <arg value="install"/> 
     1390    </exec> 
     1391    <!-- windows: --> 
     1392    <exec executable="nmake" dir="${common.src.home}" os="${os.windows}"> 
     1393      <arg value="/f"/> 
     1394      <arg value="win32.mak"/> 
     1395    </exec> 
     1396    <exec executable="nmake" dir="${common.src.home}" os="${os.windows}"> 
     1397      <arg value="/f"/> 
     1398      <arg value="win32.mak"/> 
     1399      <arg value="install"/> 
     1400    </exec> 
     1401  </target> 
     1402   
    13111403  <!-- ======= collection-building targets ===========================--> 
    13121404 
    13131405  <target name="update-collection-building" if="collection.building.enabled"  
    1314     depends="init,svnupdate-collection-building,rename-gs2build-files,configure-collection-building,clean-collection-building,compile-collection-building" 
     1406    depends="init,svnupdate-collection-building,gs2build-edit-setup-bat,configure-collection-building,clean-collection-building,compile-collection-building" 
    13151407    description="Update (SVN update, configure, compile etc) only the collection building components"/> 
    13161408 
     
    13931485    <exec executable="${basedir}/gli/gli.sh" os="${os.linux},${os.solaris}" dir="${basedir}/gli" spawn="true"> 
    13941486      <env key="gsdl3path" path="${basedir}"/> 
    1395       <env key="gsdlpath" path="${basedir}/gs2build"/> 
     1487      <env key="gsdlpath" path="${gs2build.home}"/> 
    13961488    </exec> 
    13971489    <exec executable="${basedir}/gli/gli.sh" os="${os.mac}" dir="${basedir}/gli" spawn="true"> 
    13981490      <env key="gsdl3path" path="${basedir}"/> 
    1399       <env key="gsdlpath" path="${basedir}/gs2build"/> 
     1491      <env key="gsdlpath" path="${gs2build.home}"/> 
    14001492      <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/> 
    14011493    </exec> 
    14021494    <exec executable="${basedir}/gli/gli.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true"> 
    14031495      <env key="GSDL3PATH" path="${basedir}"/> 
    1404       <env key="GSDLPATH" path="${basedir}/gs2build"/> 
     1496      <env key="GSDLPATH" path="${gs2build.home}"/> 
    14051497    </exec> 
    14061498    <echo>Running GLI from Ant means that you don't get to see any of the terminal output. If you have problems with GLI and want to see the output, please run the script gli.sh/bat from the greenstone3/gli directory. 
     
    14231515    <antcall target="get-windows-binaries"/> 
    14241516    <antcall target="delete-winbin"/> 
    1425     <antcall target="get-macos-extra"/> 
     1517    <!--<antcall target="get-macos-extra"/>--> 
    14261518  </target> 
    14271519 
     
    14561548  </target> 
    14571549   
    1458   <target name="unzip-windows-packages" depends="init" if="collection.building.enabled.windows">   
    1459     <unzip src="${gs2build.home}/common-src/packages/windows/crypt/crypt.zip" 
    1460       dest="${gs2build.home}/common-src/packages/windows/crypt"/> 
    1461     <unzip src="${gs2build.home}/common-src/packages/windows/expat/expat.zip" 
    1462       dest="${gs2build.home}/common-src/packages/windows/expat"/> 
     1550  <target name="unzip-windows-packages" depends="init" if="current.os.iswindows">   
     1551    <unzip src="${common.src.home}/packages/windows/crypt/crypt.zip" 
     1552      dest="${common.src.home}/packages/windows/crypt"/> 
     1553    <unzip src="${common.src.home}/packages/windows/expat/expat.zip" 
     1554      dest="${common.src.home}/packages/windows/expat"/> 
    14631555    <untar compression="gzip"  
    1464       src="${gs2build.home}/common-src/packages/sqlite/${sqlite.targz.version}" 
    1465       dest="${gs2build.home}/common-src/packages/sqlite"/> 
    1466     <unzip src="${gs2build.home}/common-src/indexers/packages/windows/iconv/iconv.zip" 
    1467       dest="${gs2build.home}/common-src/indexers/packages/windows/iconv"/> 
    1468   </target> 
    1469    
    1470   <!-- downloads a good XML-Parser --> 
    1471   <target name="get-macos-extra" depends="init" if="need.macos.extra"> 
    1472     <!-- 
    1473     <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" 
    1474       dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" 
    1475       usetimestamp="true"/> 
    1476       --> 
    1477     <echo>Nothing extra currently needed for MacOS prepare</echo> 
    1478   </target> 
    1479  
    1480   <!-- untars the XML-Parser. need to do this after compiling in gs2build--> 
    1481   <target name="install-macos-extra" depends="init,get-macos-extra" if="need.macos.extra"> 
    1482     <!-- make sure these directories are present, otherwise chmod craps out  
    1483     this chmod is needed in case we are unpacking for a second time --> 
    1484     <!-- 
    1485     <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.8"/> 
    1486     <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.6"/> 
    1487     <chmod dir="${gs2build.home}/perllib/cpan/perl-5.8" perm="ug+w" includes="**"/> 
    1488     <chmod dir="${gs2build.home}/perllib/cpan/perl-5.6" perm="ug+w" includes="**"/> 
    1489     <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" 
    1490       dest="${gs2build.home}/perllib/cpan/" 
    1491       compression="gzip"/> 
    1492     --> 
    1493     <echo>Nothing extra currently needed for MacOs install</echo> 
    1494   </target> 
    1495  
    1496   <target name="install-indexer-files" depends="init" unless="indexers.present"> 
     1556      src="${common.src.home}/packages/sqlite/${sqlite.targz.version}" 
     1557      dest="${common.src.home}/packages/sqlite"/> 
     1558    <unzip src="${common.src.home}/indexers/packages/windows/iconv/iconv.zip" 
     1559      dest="${common.src.home}/indexers/packages/windows/iconv"/> 
     1560  </target> 
     1561   
     1562 
     1563<!--  <target name="install-indexer-files" depends="init" unless="indexers.present"> 
    14971564    <copy todir="${indexers.home}"> 
    14981565      <fileset dir="${gs2build.home}/common-src/indexers" /> 
    14991566    </copy> 
    15001567    <chmod file="${indexers.home}/configure" perm="a+x"/> 
    1501   </target> 
    1502  
    1503   <target name="rename-gs2build-files" depends="gs2build-edit-setup-bat" if="collection.building.enabled"/> 
     1568  </target> --> 
     1569 
     1570<!--  <target name="rename-gs2build-files" depends="gs2build-edit-setup-bat" if="collection.building.enabled"/>--> 
    15041571   
    15051572  <target name="gs2build-edit-setup-bat" if="collection.building.enabled.windows"> 
     
    15181585  
    15191586  <target name="clean-gs2build" depends="init" if="collection.building.enabled"> 
    1520     <!-- gs2build --> 
    1521     <!--linux:  --> 
     1587    <!-- unix:  --> 
    15221588    <exec executable="make" os="${os.unix}" dir="${gs2build.home}"> 
    15231589      <arg value="clean"/> 
    15241590    </exec> 
    15251591    <!-- windows: -->     
    1526     <!-- run the setup script --> 
    1527     <!--<exec executable="${compile.windows.c++.setup}" os="${os.windows}" />--> 
    1528     <!--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-->  
    15291592    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" > 
    15301593      <arg value="/f"/> 
     
    15351598   
    15361599 
    1537   <target name="distclean-gs2build" depends="init" if="collection.building.enabled"> 
     1600  <target name="distclean-gs2build" depends="init,clean-gs2build" if="collection.building.enabled"> 
    15381601    <exec executable="make" os="${os.unix}" dir="${gs2build.home}"> 
    15391602      <arg value="distclean"/> 
     
    15651628    <copy file="${lucene.home}/LuceneWrapper.jar" todir="${gs2build.home}/bin/java"/> 
    15661629    <antcall target="install-gs2build-indexers-windows"/> 
    1567     <antcall target="install-macos-extra"/> 
     1630    <!--<antcall target="install-macos-extra"/>--> 
    15681631  </target> 
    15691632