Changeset 21328
- Timestamp:
- 2009-12-09T21:49:32+13:00 (13 years ago)
- Location:
- main/trunk/greenstone2/common-src/indexers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/Makefile.in
r19876 r21328 37 37 endif 38 38 39 INDEXERDIRS = $(UNAC) mg mgpp lucene-gs 39 ENABLE_MG=@ENABLE_MG@ 40 ifeq ($(ENABLE_MG), 1) 41 MG=mg 42 else 43 MG= 44 endif 45 46 ENABLE_MGPP=@ENABLE_MGPP@ 47 ifeq ($(ENABLE_MGPP), 1) 48 MGPP=mgpp 49 else 50 MGPP= 51 endif 52 53 ENABLE_LUCENE=@ENABLE_LUCENE@ 54 ifeq ($(ENABLE_LUCENE), 1) 55 LUCENE=lucene-gs 56 else 57 LUCENE= 58 endif 59 60 INDEXERDIRS = $(UNAC) $(MG) $(MGPP) $(LUCENE) 61 40 62 41 63 all install clean: 42 64 for odir in $(INDEXERDIRS); do \ 43 echo making $@ in $$odir; \ 44 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 65 if test -d $$odir; then \ 66 echo making $@ in $$odir; \ 67 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 68 fi; \ 45 69 done 46 70 … … 50 74 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \ 51 75 done 52 for odir in mg mgpp; do \76 for odir in $(MG) $(MGPP); do \ 53 77 echo making $@ in $$odir; \ 54 78 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ … … 60 84 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \ 61 85 done 62 for odir in mg mgpp; do \86 for odir in $(MG) $(MGPP); do \ 63 87 echo making $@ in $$odir; \ 64 88 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ … … 66 90 67 91 javaonly: 68 for odir in mg mgpp; do \92 for odir in $(MG) $(MGPP); do \ 69 93 echo making $@ in $$odir; \ 70 94 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 71 95 done 72 for odir in lucene-gs; do \96 for odir in $(LUCENE); do \ 73 97 echo making $@ in $$odir; \ 74 98 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \ … … 76 100 77 101 install-javaonly: 78 for odir in mg mgpp; do \102 for odir in $(MG) $(MGPP); do \ 79 103 echo making $@ in $$odir; \ 80 104 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 81 105 done 82 for odir in lucene-gs; do \106 for odir in $(LUCENE); do \ 83 107 echo making $@ in $$odir; \ 84 108 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \ … … 87 111 # make everything except jni stuff 88 112 gs2: 89 for odir in $(UNAC) lucene-gs; do \113 for odir in $(UNAC) $(LUCENE); do \ 90 114 echo making $@ in $$odir; \ 91 115 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \ 92 116 done 93 for odir in mg mgpp; do \117 for odir in $(MG) $(MGPP); do \ 94 118 echo making $@ in $$odir; \ 95 119 (cd $$odir && $(MAKE) $(MDEFINES) nojava) || exit 1; \ … … 97 121 98 122 install-gs2: 99 for odir in $(UNAC) lucene-gs; do \123 for odir in $(UNAC) $(LUCENE); do \ 100 124 echo making $@ in $$odir; \ 101 125 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \ 102 126 done 103 for odir in mg mgpp; do \127 for odir in $(MG) $(MGPP); do \ 104 128 echo making $@ in $$odir; \ 105 129 (cd $$odir && $(MAKE) $(MDEFINES) install-nojava) || exit 1; \ … … 108 132 distclean: 109 133 for odir in $(INDEXERDIRS); do \ 110 echo making $@ in $$odir; \ 111 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 134 if test -d $$odir; then \ 135 echo making $@ in $$odir; \ 136 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 137 fi; \ 112 138 done 113 139 rm -f Makefile config.status config.log -
main/trunk/greenstone2/common-src/indexers/configure
r20832 r21328 272 272 PACKAGE_BUGREPORT= 273 273 274 ac_unique_file="mgpp/text/MGQuery.cpp"275 274 ac_subdirs_all="$ac_subdirs_all packages/unac" 276 ac_subdirs_all="$ac_subdirs_all mg mgpp" 277 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ENABLE_ACCENTFOLD COMPAT32BITFLAGS JAVAC JAVA uudecode subdirs LIBOBJS LTLIBOBJS' 275 ac_subdirs_all="$ac_subdirs_all mg" 276 ac_subdirs_all="$ac_subdirs_all mgpp" 277 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ENABLE_ACCENTFOLD ENABLE_MG ENABLE_MGPP ENABLE_LUCENE COMPAT32BITFLAGS JAVAC JAVA uudecode subdirs LIBOBJS LTLIBOBJS' 278 278 ac_subst_files='' 279 279 … … 786 786 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 787 787 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 788 --disable-accentfold Disable Accent Folding support 788 --disable-accentfolding Disable Accent Folding support 789 --disable-mg Disable MG compilation 790 --disable-mgpp Disable MGPP compilation 791 --disable-lucene Disable Lucene compilation 789 792 790 793 Optional Packages: … … 1242 1245 1243 1246 1247 1248 # Check whether --enable-mg or --disable-mg was given. 1249 if test "${enable_mg+set}" = set; then 1250 enableval="$enable_mg" 1251 ENABLE_MG=$enableval 1252 else 1253 ENABLE_MG=yes 1254 fi; 1255 if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then 1256 ENABLE_MG=1 1257 cat >>confdefs.h <<\_ACEOF 1258 #define ENABLE_MG 1259 _ACEOF 1260 1261 else 1262 ENABLE_MG=0 1263 fi 1264 1265 1266 1267 # Check whether --enable-mgpp or --disable-mgpp was given. 1268 if test "${enable_mgpp+set}" = set; then 1269 enableval="$enable_mgpp" 1270 ENABLE_MGPP=$enableval 1271 else 1272 ENABLE_MGPP=yes 1273 fi; 1274 if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then 1275 ENABLE_MGPP=1 1276 cat >>confdefs.h <<\_ACEOF 1277 #define ENABLE_MGPP 1278 _ACEOF 1279 1280 else 1281 ENABLE_MGPP=0 1282 fi 1283 1284 1285 # Check whether --enable-lucene or --disable-lucene was given. 1286 if test "${enable_lucene+set}" = set; then 1287 enableval="$enable_lucene" 1288 ENABLE_LUCENE=$enableval 1289 else 1290 ENABLE_LUCENE=yes 1291 fi; 1292 if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then 1293 ENABLE_LUCENE=1 1294 cat >>confdefs.h <<\_ACEOF 1295 #define ENABLE_LUCENE 1296 _ACEOF 1297 1298 else 1299 ENABLE_LUCENE=0 1300 fi 1301 1302 1303 1244 1304 cat >>confdefs.h <<_ACEOF 1245 1305 #define COMPAT32BITFLAGS $COMPAT32BITFLAGS … … 1348 1408 CLASS_TEST=Test.class 1349 1409 cat << \EOF > $JAVA_TEST 1350 /* #line 1 350 "configure" */1410 /* #line 1410 "configure" */ 1351 1411 public class Test { 1352 1412 } … … 1518 1578 ac_cv_prog_uudecode_base64=yes 1519 1579 else 1520 echo "configure: 15 20: uudecode had trouble decoding base 64 file 'Test.uue'" >&51580 echo "configure: 1580: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 1521 1581 echo "configure: failed file was:" >&5 1522 1582 cat Test.uue >&5 … … 1636 1696 CLASS_TEST=Test.class 1637 1697 cat << \EOF > $JAVA_TEST 1638 /* #line 16 38 "configure" */1698 /* #line 1698 "configure" */ 1639 1699 public class Test { 1640 1700 } … … 1673 1733 TEST=Test 1674 1734 cat << \EOF > $JAVA_TEST 1675 /* [#]line 1 675 "configure" */1735 /* [#]line 1735 "configure" */ 1676 1736 public class Test { 1677 1737 public static void main (String args[]) { … … 1765 1825 1766 1826 1767 1768 subdirs="$subdirs mg mgpp" 1769 1827 if test $ENABLE_MG = 1; then 1828 if test ! -d mg; then 1829 echo "***** Folder mg does not exist, cannot ENABLE_MG."; 1830 exit 1; 1831 fi 1832 1833 1834 subdirs="$subdirs mg" 1835 1836 fi 1837 1838 if test $ENABLE_MGPP = 1; then 1839 if test ! -d mgpp; then 1840 echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP."; 1841 exit 1; 1842 fi 1843 1844 1845 subdirs="$subdirs mgpp" 1846 1847 fi 1848 1849 if test $ENABLE_LUCENE = 1; then 1850 if test ! -d lucene-gs; then 1851 echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE."; 1852 exit 1; 1853 fi 1854 fi 1770 1855 1771 1856 ac_config_files="$ac_config_files Makefile" … … 2405 2490 s,@LIBS@,$LIBS,;t t 2406 2491 s,@ENABLE_ACCENTFOLD@,$ENABLE_ACCENTFOLD,;t t 2492 s,@ENABLE_MG@,$ENABLE_MG,;t t 2493 s,@ENABLE_MGPP@,$ENABLE_MGPP,;t t 2494 s,@ENABLE_LUCENE@,$ENABLE_LUCENE,;t t 2407 2495 s,@COMPAT32BITFLAGS@,$COMPAT32BITFLAGS,;t t 2408 2496 s,@JAVAC@,$JAVAC,;t t -
main/trunk/greenstone2/common-src/indexers/configure.ac
r20832 r21328 3 3 dnl 4 4 5 AC_INIT(mgpp/text/MGQuery.cpp) 6 AC_ARG_ENABLE(accentfolding, [ --disable-accentfold Disable Accent Folding support], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1) 5 dnl AC_INIT(mgpp/text/MGQuery.cpp) 6 dnl http://www.gnu.org/software/hello/manual/autoconf/Initializing-configure.html 7 AC_INIT() 8 AC_ARG_ENABLE(accentfolding, [ --disable-accentfolding Disable Accent Folding support], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1) 7 9 AC_DEFINE_UNQUOTED(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD) 8 10 AC_SUBST(ENABLE_ACCENTFOLD) 11 12 13 dnl 14 dnl Set compilation of MG (enabled by default) 15 dnl 16 AC_ARG_ENABLE(mg, [ --disable-mg Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes) 17 if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then 18 ENABLE_MG=1 19 AC_DEFINE(ENABLE_MG,[]) 20 else 21 ENABLE_MG=0 22 fi 23 AC_SUBST(ENABLE_MG) 24 25 26 dnl 27 dnl Set compilation of MGPP (enabled by default) 28 dnl 29 AC_ARG_ENABLE(mgpp, [ --disable-mgpp Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes) 30 if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then 31 ENABLE_MGPP=1 32 AC_DEFINE(ENABLE_MGPP,[]) 33 else 34 ENABLE_MGPP=0 35 fi 36 AC_SUBST(ENABLE_MGPP) 37 38 dnl 39 dnl Set compilation of Lucene (enabled by default) 40 dnl 41 AC_ARG_ENABLE(lucene, [ --disable-lucene Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes) 42 if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then 43 ENABLE_LUCENE=1 44 AC_DEFINE(ENABLE_LUCENE,[]) 45 else 46 ENABLE_LUCENE=0 47 fi 48 AC_SUBST(ENABLE_LUCENE) 49 9 50 10 51 AC_DEFINE_UNQUOTED(COMPAT32BITFLAGS, $COMPAT32BITFLAGS) … … 32 73 fi 33 74 34 AC_CONFIG_SUBDIRS(mg mgpp) 75 dnl AC_CONFIG_SUBDIRS(mg mgpp) 76 77 if test $ENABLE_MG = 1; then 78 if test ! -d mg; then 79 echo "***** Folder mg does not exist, cannot ENABLE_MG."; 80 exit 1; 81 fi 82 AC_CONFIG_SUBDIRS(mg) 83 fi 84 85 if test $ENABLE_MGPP = 1; then 86 if test ! -d mgpp; then 87 echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP."; 88 exit 1; 89 fi 90 AC_CONFIG_SUBDIRS(mgpp) 91 fi 92 93 if test $ENABLE_LUCENE = 1; then 94 if test ! -d lucene-gs; then 95 echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE."; 96 exit 1; 97 fi 98 fi 35 99 36 100 AC_OUTPUT(Makefile) -
main/trunk/greenstone2/common-src/indexers/winMake.bat
r20861 r21328 10 10 ) 11 11 12 :: ENABLE_MG/MGPP/LUCENE are guaranteed to be set to either 1 or 0 at this point 13 set MAKE_VARS=%MAKE_VARS% ENABLE_MG=%ENABLE_MG% 14 set MAKE_VARS=%MAKE_VARS% ENABLE_MGPP=%ENABLE_MGPP% 15 set MAKE_VARS=%MAKE_VARS% ENABLE_LUCENE=%ENABLE_LUCENE% 16 17 if "%ENABLE_MG%" == "1" if not exist mg ( 18 echo ***** Folder mg does not exist, cannot ENABLE_MG. 19 goto failed 20 ) 21 22 if "%ENABLE_MGPP%" == "1" if not exist mgpp ( 23 echo ***** Folder mgpp does not exist, cannot ENABLE_MGPP. 24 goto failed 25 ) 26 27 if "%ENABLE_LUCENE%" == "1" if not exist lucene-gs ( 28 echo ***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE. 29 goto failed 30 ) 31 12 32 if ""%1"" == """" goto all 13 33 if ""%1"" == ""all"" goto go … … 17 37 :unknown 18 38 echo Error: Unrecognized argument %1. 19 goto done39 goto failed 20 40 21 41 :clean … … 41 61 cd ..\.. 42 62 43 cd mg 44 call winMake.bat %1 45 cd .. 63 if "%ENABLE_MG%" == "1" ( 64 cd mg 65 call winMake.bat %1 66 cd .. 67 ) 46 68 47 cd mgpp 48 call winMake.bat %1 49 cd .. 50 51 cd lucene-gs 52 call winMake.bat %1 53 cd .. 69 if "%ENABLE_MGPP%" == "1" ( 70 cd mgpp 71 call winMake.bat %1 72 cd .. 73 ) 74 75 if "%ENABLE_LUCENE%" == "1" ( 76 cd lucene-gs 77 call winMake.bat %1 78 cd .. 79 ) 54 80 55 81 if ""%1"" == ""clean"" goto clean2 … … 63 89 64 90 :java 65 cd mg 66 call winMake.bat %1 javaonly 67 cd .. 91 if "%ENABLE_MG%" == "1" ( 92 cd mg 93 call winMake.bat %1 javaonly 94 cd .. 95 ) 68 96 69 cd mgpp 70 call winMake.bat %1 javaonly 71 cd .. 97 if "%ENABLE_MGPP%" == "1" ( 98 cd mgpp 99 call winMake.bat %1 javaonly 100 cd .. 101 ) 72 102 73 cd lucene-gs 74 call winMake.bat %1 75 cd .. 103 if "%ENABLE_LUCENE%" == "1" ( 104 cd lucene-gs 105 call winMake.bat %1 106 cd .. 107 ) 76 108 goto done 77 109 … … 86 118 cd ..\.. 87 119 88 cd mg 89 call winMake.bat %1 nojava 90 cd .. 91 92 cd mgpp 93 call winMake.bat %1 nojava 94 cd .. 120 if "%ENABLE_MG%" == "1" ( 121 cd mg 122 call winMake.bat %1 nojava 123 cd .. 124 ) 125 126 if "%ENABLE_MGPP%" == "1" ( 127 cd mgpp 128 call winMake.bat %1 nojava 129 cd .. 130 ) 95 131 goto done 96 132 … … 107 143 cd ..\.. 108 144 109 cd mg 110 call winMake.bat %1 nojava 111 cd .. 145 if "%ENABLE_MG%" == "1" ( 146 cd mg 147 call winMake.bat %1 nojava 148 cd .. 149 ) 112 150 113 cd mgpp 114 call winMake.bat %1 nojava 115 cd .. 116 117 cd lucene-gs 118 call winMake.bat %1 119 cd .. 151 if "%ENABLE_MGPP%" == "1" ( 152 cd mgpp 153 call winMake.bat %1 nojava 154 cd .. 155 ) 156 157 if "%ENABLE_LUCENE%" == "1" ( 158 cd lucene-gs 159 call winMake.bat %1 160 cd .. 161 ) 120 162 goto done 121 163 164 165 :failed 166 echo ***** Compilation terminated with failure in %~dp0%0 167 exit /b 1 168 122 169 :done
Note:
See TracChangeset
for help on using the changeset viewer.