Ignore:
Timestamp:
2010-05-06T21:23:54+12:00 (14 years ago)
Author:
ak19
Message:

Changes to makefiles to 1. incorporate USE_GDBM and USE_JDBM flags (and USE_SQLITE) in most places so that the DEFINES variable is set at all times. This is necessary to ensure that all classes that contain objects with gdbm and jdbm members are of a consistent size. Else we've had experience with Greenstone crashing with memory errors (to do with the similar ENABLE_indexer flags). 2. ENABLE_JDBM is now USE_JDBM. 3. Not everything works now. It still compiles the default way, but the disable-gdbm flag is causing trouble when compiling argdb in recpt since it uses that.

Location:
main/trunk/greenstone2/common-src/indexers/mg
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mg/Makefile.in

    r16583 r22058  
    11# Main Makefile for MG
    22# Copyright (C) 1994, 1995 Free Software Foundation, Inc.
    3  
     3
    44# This program is free software; you can redistribute it and/or modify
    55# it under the terms of the GNU General Public License as published by
    66# the Free Software Foundation; either version 2, or (at your option)
    77# any later version.
    8  
     8
    99# This program is distributed in the hope that it will be useful,
    1010# but WITHOUT ANY WARRANTY; without even the implied warranty of
    1111# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1212# GNU General Public License for more details.
    13  
     13
    1414# You should have received a copy of the GNU General Public License
    1515# along with this program; if not, write to the Free Software
    1616# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    17  
     17
    1818PACKAGE = @PACKAGE@
    1919VERSION = @VERSION@
    20  
     20
    2121@SET_MAKE@
    2222SHELL = /bin/sh
     
    2525prefix = @prefix@
    2626srcdir = @srcdir@
    27  
     27
    2828
    2929CC = @CC@
     
    3535LIBS = @LIBS@ 
    3636TOUCH = echo timestamp >
    37  
     37
    3838bindir = $(exec_prefix)/bin
    3939infodir = $(prefix)/info
    4040libexecdir = $(exec_prefix)/libexec
    41  
     41
    4242MDEFINES =
    4343#CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
  • main/trunk/greenstone2/common-src/indexers/mg/configure

    r19835 r22058  
    310310#endif"
    311311
    312 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PACKAGE VERSION COMPAT32BITFLAGS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT AWK YACC CC CFLAGS ac_ct_CC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP U ANSI2KNR ALLOCA LIBOBJS JNIINC JNISUFFIX JNIFLAGS LTLIBOBJS'
     312ac_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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PACKAGE VERSION COMPAT32BITFLAGS USE_JDBM USE_GDBM CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT AWK YACC CC CFLAGS ac_ct_CC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP U ANSI2KNR ALLOCA LIBOBJS JNIINC JNISUFFIX JNIFLAGS LTLIBOBJS'
    313313ac_subst_files=''
    314314
     
    855855
    856856  cat <<\_ACEOF
     857
     858Optional Features:
     859  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
     860  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
     861  --disable-jdbm        Disable JDBM compilation
     862  --disable-gdbm        Disable GDBM compilation
    857863
    858864Optional Packages:
     
    14711477  fi
    14721478fi
     1479
     1480
     1481
     1482# Check whether --enable-jdbm or --disable-jdbm was given.
     1483if test "${enable_jdbm+set}" = set; then
     1484  enableval="$enable_jdbm"
     1485  USE_JDBM=$enableval
     1486else
     1487  USE_JDBM=yes
     1488fi;
     1489if test $USE_JDBM = "yes" -o $USE_JDBM = "1" ; then
     1490  USE_JDBM=1
     1491  cat >>confdefs.h <<\_ACEOF
     1492#define USE_JDBM
     1493_ACEOF
     1494
     1495else
     1496  USE_JDBM=0
     1497fi
     1498
     1499
     1500# Check whether --enable-gdbm or --disable-gdbm was given.
     1501if test "${enable_gdbm+set}" = set; then
     1502  enableval="$enable_gdbm"
     1503  USE_GDBM=$enableval
     1504else
     1505  USE_GDBM=yes
     1506fi;
     1507if test $USE_GDBM = "yes" -o $USE_GDBM = "1" ; then
     1508  USE_GDBM=1
     1509  cat >>confdefs.h <<\_ACEOF
     1510#define USE_GDBM
     1511_ACEOF
     1512
     1513else
     1514  USE_GDBM=0
     1515fi
     1516
    14731517
    14741518
     
    72457289s,@VERSION@,$VERSION,;t t
    72467290s,@COMPAT32BITFLAGS@,$COMPAT32BITFLAGS,;t t
     7291s,@USE_JDBM@,$USE_JDBM,;t t
     7292s,@USE_GDBM@,$USE_GDBM,;t t
    72477293s,@CXX@,$CXX,;t t
    72487294s,@CXXFLAGS@,$CXXFLAGS,;t t
  • main/trunk/greenstone2/common-src/indexers/mg/configure.in

    r19835 r22058  
    3636fi
    3737AC_SUBST(COMPAT32BITFLAGS)
     38
     39
     40dnl
     41dnl Set use of JDBM (enabled by default)
     42dnl
     43AC_ARG_ENABLE(jdbm, [  --disable-jdbm        Disable JDBM compilation], USE_JDBM=$enableval, USE_JDBM=yes)
     44if test $USE_JDBM = "yes" -o $USE_JDBM = "1" ; then
     45  USE_JDBM=1
     46  AC_DEFINE(USE_JDBM,[])
     47else
     48  USE_JDBM=0
     49fi
     50AC_SUBST(USE_JDBM)
     51
     52dnl
     53dnl Set use of GDBM (enabled by default)
     54dnl
     55AC_ARG_ENABLE(gdbm, [  --disable-gdbm        Disable GDBM compilation], USE_GDBM=$enableval, USE_GDBM=yes)
     56if test $USE_GDBM = "yes" -o $USE_GDBM = "1" ; then
     57  USE_GDBM=1
     58  AC_DEFINE(USE_GDBM,[])
     59else
     60  USE_GDBM=0
     61fi
     62AC_SUBST(USE_GDBM)
     63
    3864
    3965dnl Checks for programs.
  • main/trunk/greenstone2/common-src/indexers/mg/jni/Makefile.in

    r18445 r22058  
    1111transform = @program_transform_name@
    1212
     13USE_GDBM = @USE_GDBM@
     14ifeq ($(USE_GDBM), 1)
     15GDBM_DEFINES = -DUSE_GDBM
     16else
     17GDBM_DEFINES =
     18endif
     19
     20USE_JDBM = @USE_JDBM@
     21ifeq ($(USE_JDBM), 1)
     22JDBM_DEFINES = -DUSE_JDBM
     23else
     24JDBM_DEFINES =
     25endif
     26
     27USE_SQLITE = @USE_SQLITE@
     28ifeq ($(USE_SQLITE), 1)
     29SQLITE_DEFINES = -DUSE_SQLITE
     30else
     31SQLITE_DEFINES =
     32endif
     33
    1334AR = ar
    1435CC = @CC@
    1536CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -ansi -fpic -DSILENT -DSHORT_SUFFIX -DNZDL -DQUIET -DPARADOCNUM
    16 DEFS = @DEFS@
     37DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
    1738RANLIB = @RANLIB@
    1839INSTALL = @INSTALL@
  • main/trunk/greenstone2/common-src/indexers/mg/lib/Makefile.in

    r16583 r22058  
    2525PACKAGE = @PACKAGE@
    2626VERSION = @VERSION@
    27  
     27
    2828SHELL = /bin/sh
    2929srcdir = @srcdir@
    3030subdir = lib
    3131VPATH = @srcdir@
    32  
     32
     33USE_GDBM = @USE_GDBM@
     34ifeq ($(USE_GDBM), 1)
     35GDBM_DEFINES = -DUSE_GDBM
     36else
     37GDBM_DEFINES =
     38endif
     39
     40USE_JDBM = @USE_JDBM@
     41ifeq ($(USE_JDBM), 1)
     42JDBM_DEFINES = -DUSE_JDBM
     43else
     44JDBM_DEFINES =
     45endif
     46
     47USE_SQLITE = @USE_SQLITE@
     48ifeq ($(USE_SQLITE), 1)
     49SQLITE_DEFINES = -DUSE_SQLITE
     50else
     51SQLITE_DEFINES =
     52endif
     53
    3354AR = ar
    3455CC = @CC@
    3556CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -fpic
    36 DEFS = @DEFS@
     57DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
    3758RANLIB = @RANLIB@
    3859
     
    4364##########################################
    4465
    45  
     66
    4667prefix = @prefix@
    4768datadir = $(prefix)/share
    4869localedir = $(datadir)/locale
    49  
     70
    5071COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
    51  
     72
    5273.SUFFIXES:
    5374.SUFFIXES: .c .o
     
    5778ANSI2KNR = @ANSI2KNR@
    5879o = .@U@o
    59  
     80
    6081.SUFFIXES: ._c ._o
    6182.c._c:
     
    7192    @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
    7293
    73  
     94
    7495INCLUDES = -I../../.. -I.. -I$(srcdir)
    75  
     96
    7697HEADERS = \
    7798    bitio_m_random.h   filestats.h        local_strings.h    lovinstem.h \
     
    123144
    124145DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
    125  
     146
    126147all : libmglib.a gsdllibmg.a
    127148
     
    137158    $(AR) cru gsdllibmg.a $(LIB_OBJECTS)
    138159    $(RANLIB) gsdllibmg.a
    139  
     160
    140161
    141162install:
     
    146167maninstall:
    147168manuninstall:
    148  
     169
    149170dist: $(DISTFILES)
    150171    for file in $(DISTFILES); do \
     
    155176mostlyclean:
    156177    rm -f *.o *_.o
    157  
     178
    158179clean: mostlyclean
    159180    rm -f libmglib.a gsdllibmg.a
    160  
     181
    161182distclean: clean
    162183    rm -f Makefile
    163  
     184
    164185maintainer-clean: distclean
    165186    @echo "This command is intended only for maintainers to use;"
     
    168189#Makefile: Makefile.in ../../../config.status
    169190#   cd ../../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
    170  
     191
    171192# Tell versions [3.59,3.63) of GNU make not to export all variables.
    172193# Otherwise a system limit (for SysV at least) may be exceeded.
  • main/trunk/greenstone2/common-src/indexers/mg/src/text/Makefile.in

    r16583 r22058  
    2424PACKAGE = @PACKAGE@
    2525VERSION = @VERSION@
    26  
     26
    2727SHELL = /bin/sh
    2828VPATH = @srcdir@
     
    3535transform = @program_transform_name@
    3636
     37USE_GDBM = @USE_GDBM@
     38ifeq ($(USE_GDBM), 1)
     39GDBM_DEFINES = -DUSE_GDBM
     40else
     41GDBM_DEFINES =
     42endif
     43
     44USE_JDBM = @USE_JDBM@
     45ifeq ($(USE_JDBM), 1)
     46JDBM_DEFINES = -DUSE_JDBM
     47else
     48JDBM_DEFINES =
     49endif
     50
     51USE_SQLITE = @USE_SQLITE@
     52ifeq ($(USE_SQLITE), 1)
     53SQLITE_DEFINES = -DUSE_SQLITE
     54else
     55SQLITE_DEFINES =
     56endif
     57
    3758AR = ar
    3859CC = @CC@
    3960CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -fpic
    40 DEFS = @DEFS@
     61DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
    4162RANLIB = @RANLIB@
    4263INSTALL = @INSTALL@
     
    5980localedir = $(datadir)/locale
    6081mandir = $(prefix)/man/man1
    61  
     82
    6283COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CFLAGS)
    6384LINK = $(CC) $(LDFLAGS) -o $@
     
    6788.c.o:
    6889    $(COMPILE) $<
    69  
     90
    7091
    7192ANSI2KNR = @ANSI2KNR@
    7293o = .@U@o
    73  
     94
    7495.SUFFIXES: ._c ._o
    7596.c._c:
     
    84105    @rm -f _$*.c
    85106    @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
    86  
     107
    87108INCLUDES = -I../../../.. -I../.. -I../../lib -I.
    88109
     
    360381mostlyclean:
    361382    rm -f *$o _*.c _*.o *._c *._o core core.*
    362  
     383
    363384clean: mostlyclean
    364385    rm -f $(EXEC) libmgtext.a libmgpass.a
    365  
     386
    366387distclean: clean
    367388    rm -f ansi2knr
    368389    rm -f Makefile
    369  
     390
    370391maintainer-clean: distclean
    371392    @echo "This command is intended only for maintainers to use;"
    372393    @echo "rebuilding the deleted files may require special tools."
    373  
     394
    374395dist: $(DISTFILES)
    375396    for file in $(DISTFILES); do \
     
    377398      || cp -p $(srcdir)/$$file $(distdir); \
    378399    done
    379  
     400
    380401# Tell versions [3.59,3.63) of GNU make not to export all variables.
    381402# Otherwise a system limit (for SysV at least) may be exc
Note: See TracChangeset for help on using the changeset viewer.