# 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
# 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
# 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
# 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
* 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
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));
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);
}
# 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)
# 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
# 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)
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)