From: Adam Dickmeiss Date: Mon, 20 Nov 1995 11:57:46 +0000 (+0000) Subject: Support for YAZ in standard located directories, such as /usr/local/.. X-Git-Tag: ZEBRA.1.0~675 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=b5af7db2dbda2c0a8e705c58da25a50f56214265;p=idzebra-moved-to-github.git Support for YAZ in standard located directories, such as /usr/local/.. --- diff --git a/Makefile b/Makefile index 778ea1b..9bc0bff 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,29 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.35 1995-11-01 16:25:37 quinn Exp $ +# $Id: Makefile,v 1.36 1995-11-20 11:57:46 adam Exp $ SHELL=/bin/sh MAKE=make -SUBDIR=util str bfile dfa dict isam rset index RANLIB=ranlib -YAZ=../../yaz -OSILIB=../../xtimosi/src/libmosi.a $(YAZ)/lib/librfc.a + +# Where are Yaz libraries located? +YAZLIB=-lyaz +# Where are Yaz header files located? +#YAZINC=-I/usr/local/include +# If Yaz is compiled with mosi support uncomment and specify. +OSILIB=../../xtimosi/src/libmosi.a -lrfc + +# Some systems have seperate socket libraries #NETLIB=-lnsl -lsocket +SUBDIR=util str bfile dfa dict isam rset index + all: - for i in $(SUBDIR); do cd $$i; if $(MAKE) OSILIB="$(OSILIB)" YAZ="$(YAZ)" RANLIB="$(RANLIB)" NETLIB="$(NETLIB)" CFLAGS="$(CFLAGS)" CC="$(CC)"; then cd ..; else exit 1; fi; done + for i in $(SUBDIR); do cd $$i; if $(MAKE) OSILIB="$(OSILIB)" YAZLIB="$(YAZLIB)" YAZINC="$(YAZINC)" RANLIB="$(RANLIB)" NETLIB="$(NETLIB)" CFLAGS="$(CFLAGS)" CC="$(CC)"; then cd ..; else exit 1; fi; done dep depend: - for i in $(SUBDIR); do cd $$i; if $(MAKE) YAZ="$(YAZ)" depend; then cd ..; else exit 1; fi; done + for i in $(SUBDIR); do cd $$i; if $(MAKE) YAZINC="$(YAZINC)" depend; then cd ..; else exit 1; fi; done clean: for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done diff --git a/bfile/Makefile b/bfile/Makefile index 9b15ff9..fd07e99 100644 --- a/bfile/Makefile +++ b/bfile/Makefile @@ -1,13 +1,15 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.13 1995-10-30 14:10:47 adam Exp $ +# $Id: Makefile,v 1.14 1995-11-20 11:57:54 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZ=../../yaz -YAZLIB=$(YAZ)/lib/libyaz.a -INCLUDE=-I../include -I$(YAZ)/include + +YAZLIB=-lyaz +YAZINC= + +INCLUDE=-I../include $(YAZINC) #CFLAGS=-g -Wall -pedantic -ansi DEFS=$(INCLUDE) TPROG=btest diff --git a/dfa/Makefile b/dfa/Makefile index 7c78a60..d6b50c2 100644 --- a/dfa/Makefile +++ b/dfa/Makefile @@ -1,13 +1,15 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.11 1995-10-30 14:10:50 adam Exp $ +# $Id: Makefile,v 1.12 1995-11-20 11:57:58 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZ=../../yaz -YAZLIB=$(YAZ)/lib/libyaz.a -INCLUDE=-I../include -I$(YAZ)/include + +YAZLIB=-lyaz +YAZINC= + +INCLUDE=-I../include $(YAZINC) TPROG1=agrep TPROG2=lexer TPROG3=grepper diff --git a/dict/Makefile b/dict/Makefile index 71a6de8..d38942d 100644 --- a/dict/Makefile +++ b/dict/Makefile @@ -1,13 +1,15 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.17 1995-10-30 14:10:52 adam Exp $ +# $Id: Makefile,v 1.18 1995-11-20 11:58:03 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZ=../../yaz -YAZLIB=$(YAZ)/lib/libyaz.a -INCLUDE=-I../include -I$(YAZ)/include + +YAZLIB=-lyaz +YAZINC= + +INCLUDE=-I../include $(YAZINC) TPROG1=dicttest TPROG2=dictext #CFLAGS=-g -Wall -pedantic -ansi diff --git a/dict/scan.c b/dict/scan.c index 13897da..d0bcaf7 100644 --- a/dict/scan.c +++ b/dict/scan.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: scan.c,v $ - * Revision 1.5 1995-10-09 16:18:32 adam + * Revision 1.6 1995-11-20 11:58:04 adam + * Support for YAZ in standard located directories, such as /usr/local/.. + * + * Revision 1.5 1995/10/09 16:18:32 adam * Function dict_lookup_grep got extra client data parameter. * * Revision 1.4 1995/10/06 13:52:00 adam @@ -103,6 +106,8 @@ int dict_scan_r (Dict dict, Dict_ptr ptr, int pos, Dict_char *str, char *info; dict_bf_readp (dict->dbf, ptr, &p); + if (!p) + return 0; mid = lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_pagesize(dict)-sizeof(short)); @@ -191,8 +196,6 @@ int dict_scan (Dict dict, Dict_char *str, int *before, int *after, int (*f)(Dict_char *name, const char *info, int pos, void *client)) { - int i; - i = dict_scan_r (dict, 1, 0, str, before, after, client, f); - return i; + return dict_scan_r (dict, 1, 0, str, before, after, client, f); } diff --git a/isam/Makefile b/isam/Makefile index a48d20a..55da064 100644 --- a/isam/Makefile +++ b/isam/Makefile @@ -1,12 +1,14 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.14 1995-10-30 14:10:55 adam Exp $ +# $Id: Makefile,v 1.15 1995-11-20 11:58:07 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZ=../../yaz -YAZLIB=$(YAZ)/lib/libyaz.a + +YAZLIB=-lyaz +YAZINC= + INCLUDE=-I../include -I$(YAZ)/include #CFLAGS=-g -Wall -pedantic -ansi DEFS=$(INCLUDE) diff --git a/rset/Makefile b/rset/Makefile index fafcfc9..7644092 100644 --- a/rset/Makefile +++ b/rset/Makefile @@ -1,12 +1,15 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.8 1995-10-30 14:10:59 adam Exp $ +# $Id: Makefile,v 1.9 1995-11-20 11:58:10 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZ=../../yaz -INCLUDE=-I../include -I$(YAZ)/include + +YAZLIB=-lyaz +YAZINC= + +INCLUDE=-I../include $(YAZINC) #CFLAGS=-g -Wall -pedantic -ansi DEFS=$(INCLUDE) LIB=../lib/rset.a diff --git a/util/Makefile b/util/Makefile index cc3cd37..acbf716 100644 --- a/util/Makefile +++ b/util/Makefile @@ -1,13 +1,15 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.20 1995-11-01 13:58:30 quinn Exp $ +# $Id: Makefile,v 1.21 1995-11-20 11:58:16 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZ=../../yaz -YAZLIB=$(YAZ)/lib/libyaz.a -INCLUDE=-I../include -I$(YAZ)/include + +YAZLIB=-lyaz +YAZINC= + +INCLUDE=-I../include $(YAZINC) TPROG=opt-test #CFLAGS=-g -Wall -pedantic -ansi DEFS=$(INCLUDE) @@ -19,7 +21,7 @@ all: $(LIB) alll: res-test all -res-test: res-test.o $(LIB) $(YAZLIB) +res-test: res-test.o $(LIB) $(CC) -o res-test res-test.o $(LIB) $(YAZLIB) $(LIB): $(PO)