head     1.19;
branch   ;
access   ;
symbols  ;
locks    lee:1.19; strict;
comment  @# @;


1.19
date     96.05.17.02.30.12;  author lee;  state Exp;
branches ;
next     1.18;

1.18
date     94.08.09.00.21.44;  author lee;  state Exp;
branches ;
next     1.17;

1.17
date     94.05.23.20.49.39;  author lee;  state Exp;
branches ;
next     1.16;

1.16
date     94.05.23.20.49.28;  author lee;  state Exp;
branches ;
next     1.15;

1.15
date     93.04.23.21.07.53;  author lee;  state Exp;
branches ;
next     1.14;

1.14
date     92.08.24.00.27.29;  author lee;  state Exp;
branches ;
next     1.13;

1.13
date     91.03.02.20.23.02;  author lee;  state Exp;
branches ;
next     1.12;

1.12
date     91.03.02.19.34.13;  author lee;  state Exp;
branches ;
next     1.11;

1.11
date     91.03.02.19.16.27;  author lee;  state Exp;
branches ;
next     1.10;

1.10
date     91.02.20.19.33.37;  author lee;  state Exp;
branches ;
next     1.9;

1.9
date     90.10.05.23.40.41;  author lee;  state Exp;
branches ;
next     1.8;

1.8
date     90.10.03.21.39.41;  author lee;  state Exp;
branches ;
next     1.7;

1.7
date     90.10.03.21.14.08;  author lee;  state Exp;
branches ;
next     1.6;

1.6
date     90.10.01.18.28.43;  author lee;  state Exp;
branches ;
next     1.5;

1.5
date     90.09.28.21.52.14;  author lee;  state Exp;
branches ;
next     1.4;

1.4
date     90.09.10.13.25.31;  author lee;  state Exp;
branches ;
next     1.3;

1.3
date     90.07.27.17.50.51;  author lee;  state Exp;
branches ;
next     1.2;

1.2
date     90.03.23.18.57.13;  author lee;  state Exp;
branches ;
next     1.1;

1.1
date     90.03.23.15.11.30;  author lee;  state Exp;
branches ;
next     ;


desc
@Makefile for main lqtext directory
@


1.19
log
@fixed cflags error.
@
text
@# Makefile generated by configure on Sun May  5 14:46:54 EDT 1996
# Makefile for LQ-Text, a full text retrieval package by Liam R. Quin
#
# $Id: Makefile,v 1.17 94/05/23 20:49:39 lee Exp Locker: lee $
#
# If you have not already done so, please read the file lq-text/INSTALL
# before changing this file.
#
# If you need to edit it, see ../config.dir/Makefile.dfl, change
# it as necessary, and then configure again.
#
# Operating system for which this Makefile was generated:
OS = $OS

#
# This Makefile is made up of several sections:
# [1] general definitions
# [2] machine specific definitions
# [3] definitions generated by configure

# Do this first for sanity...:
SHELL=/bin/sh

## [1] General Definitions
##General:

### Some global configuration options.

# You should also look at h/globals.h for more things to change.
#
# Please read and edit this file down to the point marked
# `End of configuration section'.  See also PORTING in this directory,
# and the files in the ../doc directory.
# You shouldn't have to edit any other lq-text Makefiles.  If you do,
# please let me know.  Just doing a "make" in this directory should
# build everything (after editing this file and h/globals.h appropriately).
#
# You might have to work to get "db" (e.g. db.1.85) to work; if so,
# you can build with sdbm, as described here.  db is faster, sometimes
# halving indexing times.  Also use sdbm if you get messages about mmap
# being undefined (see h/globals.h).
#
# DEFS are included in CFLAGS, passed to the C compiler:
# If ASCIITRACE is defined, you can get extra debugging output using -t99
# (or some other number), but there is a slight performance penalty for
# including this, and you'd need to understand the code.

# If you are using sdbm and get messages about L_SET or L_SEEK being
# undefined, add -DSVID to cflaGS (there are other changes, but
# this is a useful symptom...)
#
# -DMALLCTRACE makes malloc.c produce masses of output...
#
# -DCURSESX, if present, says that we have the System V.3.1 or later
# curses that has A_STANDOUT and in which box(win, 0, 0) draws a neat box
# with vt100 characters.  If you're not sure, if the string ACS appears
# in /usr/include/curses.h you should probably use -DCURSESX.
#

##[2] Machine-specific definitions from config.dir/$HARDWARE/$OS/Makefile.tpl
##Machine-specific: (do not change THIS line, configure uses it)
# by default, no definitions need to be overridden.

##End of section [2]


## [3] definitions generated by configure
##Local: (do not change THIS line, configure uses it)
#CC=gcc

CC=gcc
CFLAGS_LOCAL= -Wall -Wshadow -Wpointer-arith -Wcast-qual -fstrength-reduce -fomit-frame-pointer -finline-functions -fdelayed-branch
CFLAGS_OPT=-O6
CFLAGS_DBG=-g
LD=${CC}
LDFLAGS_LOCAL=

#end

# installation directories:

INSTALLDIR_BIN=/usr/local/bin
INSTALLDIR_MAN=/usr/local/man
INSTALLDIR_LIB=/usr/local/lib/lqtext

# confgure options:

# program to run on a .a file before using it: 
RANLIB=ranlib

# LD options to use ndbm (usually empty or -lndbm): 
NDBM_LIB=

SDB_INC=-I/usr/src/cmd/lq-text/src/sdbm
SDB_LIB=-L/usr/src/cmd/lq-text/src/sdbm -lsdbm
DB_VERSION=1.85
DB_MACH=sunos.4.1.1
DB_INC=-I/usr/src/cmd/lq-text/src/db.$(DB_VERSION)/PORT/$(DB_MACH) -I/usr/src/cmd/lq-text/src/db.$(DB_VERSION)/PORT/$(DB_MACH)/include
DB_LIB=-L/usr/src/cmd/lq-text/src/db.$(DB_VERSION)/PORT/$(DB_MACH) -ldb
WHICHDBM="bsddb"
DBMINC=$(DB_INC)
DBMLIBS=$(DB_LIB)
MKDBM=db

##End of section [3]

##[4] Database-specific definitions
##Database-specific: (do not change THIS line, configure uses it)

# This section is not currently updated automatically.
# In the future, configure may be able to read an existing lq-text
# database configuration and make that the default.

##End of section [4]

##[5] Other changes
##Manual: (do not change THIS line, configure uses it)

# Put your own changes here to override anything configure does that you
# don't like, but that is not mchine or database specific...

##End of section [5].

# and the file mode for executables:
MODE=751

# NewsFilter and MailFilter are programs which read news/mail files and
# turn unwanted words (e.g. Received-By lines inside mail headers) into
# "qxxxxx", with the right number of x's so that the total byte count is
# unchanged....
#
# If you don't want these to be in /usr/local/lib/lqtext, define them
# here and add them to FILTERSTUFF

# MAILFILTER=$(INSTALLDIR_LIB)/MailFilter
# NEWSFILTER=$(INSTALLDIR_LIB)/NewsFilter
# SGMLFILTER=$(INSTALLDIR_LIB)/SGMLFilter
# DEFAULTFILTER=$(INSTALLDIR_LIB)/DefaultFilter
FILTERS=
# FILTERS=-DMAILFILTER=\"$(MAILFILTER)\" \
#	-DDEFAULTFILTER=\"$(DEFAULTFILTER)\" \
#	-DSGMLFILTER=\"$(SGMLFILTER)\" \
#	-DNEWSFILTER=\"$(NEWSFILTER)\"

# Lqshow is the document browser.
LQSHOW=$(INSTALLDIR_BIN)/lqshow
LQFILE=$(INSTALLDIR_BIN)/lqfile

# If you have -lmalloc, use it...
# MALLOC=-lmalloc # faster version of malloc
# MALLOC=/usr/lib/debug/mallocmap.o /usr/lib/debug/malloc.o # debug on SunOS 
MALLOC= # BSD Unix doesn't have malloc(3X), only malloc(3)

# CURSES is for linking with curses, and should include termcap on BSD
# systems.  TERMCAP is for linking with only the low-level libtermcap or
# libterminfo library.  Programs use CURSES or TERMCAP but not both.

# CURSES=-lcursesX -ltermcap # ultrix -- cursesx
CURSES=-lcurses -ltermcap
TERMCAP=-ltermcap
# TERMCAP=-ltermlib # SYSV

DEFS=-DASCIITRACE
CFLAGS= $(CFLAGS_LOCAL) $(CFLAGS_DBG) $(DBMINC) $(DEFS) -D$(WHICHDBM) $$(EXTRA)

# Lint flags vary wildly between systems.
# LINTFLAGS=-xv
LINTFLAGS=-a -b -c -h -x 

###
### End of configuration section.  See also the PORTING file.
###
### You should not need to modify the makefile beyond this point.

# Note that liblqerror must be made first so that error.h is installed!
DIRS=liblqerror liblqtext liblqutil lqtext filters menu
# DIRS=liblqerror liblqtext liblqutil lqtext filters menu test
MKTARGETS=lib bin $(MKDBM) $(DIRS)

# Make all does a local install (in src/bin src/lib src/testbin) too...
all: local

.SUFFIXES: .c .o .src .obj

.c.src:
	#load $(CFLAGS) $<

.o.obj:
	#load $(CFLAGS) $<

saber_src:
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=saber_src $(MKTARGETS)

saber_obj:
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=saber_obj $(MKTARGETS)

tidy:
	$(MAKE) -i$(MAKEFLAGS) MAKEWHAT=tidy $(MKTARGETS)
	rm -f core

clean:
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=clean $(MKTARGETS)
	rm -f lib/* bin/* testbin/* core *.o m.log make.log tags ID

depend:
	$(MAKE) -i$(MAKEFLAGS) MAKEWHAT=depend $(MKTARGETS)

local:: lib
	$(MAKE) -$(MAKEFLAGS) $(MKTARGETS)

install: libs
	-@@test -d $(INSTALLDIR_LIB) || mkdir -p $(INSTALLDIR_LIB)
	-@@test -d $(INSTALLDIR_BIN) || mkdir -p $(INSTALLDIR_BIN)
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install DESTDIR="${INSTALLDIR_BIN}" $(MKTARGETS)
	( cd lib ; for i in `ls | grep -v '\.a$'`; do \
	    install -s -c -m $(MODE) $$i ${INSTALLDIR_LIB}; \
	  done; \
	)
	-@@test -d $(INSTALLDIR_MAN) || mkdir -p $(INSTALLDIR_MAN)
	@@-echo Binary Installation complete
	@@-echo Now install manual pages from ../doc if appropriate,
	@@-echo with make installdocs

installdocs:
	cd ../doc; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' install

liblqutil::

lint:
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=lint $(MKTARGETS)

libs:
	@@/bin/test -d ${INSTALLDIR_LIB} || mkdir ${INSTALLDIR_LIB}
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) liblqerror
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) liblqtext
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) liblqutil
	-@@echo libraries up to date

ID:
	mkid `find h $(DIRS) -name '*.[ch]' -print`

# Note to lib and bin:
# If the mkdir -p bombs out, there is a shell-script mkdir you can use
# in the utils directory.  The -p means to create parent directores as needed.

lib:: # see note above about mkdir
	-@@test -d lib || mkdir lib

bin::  # see note above about mkdir
	-@@test -d bin || mkdir bin
	-@@test -d $(INSTALLDIR_BIN) || mkdir -p $(INSTALLDIR_BIN)

filters::
	cd filters; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT) 

liblqtext::
	cd liblqtext; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)

liblqutil::
	cd liblqutil; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)


liblqerror::
	cd liblqerror; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)

lqtext::
	cd lqtext; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' CURSES='$(CURSES)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)

sdbm::
	cd sdbm; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
	RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)

db::
	cd db.$(DB_VERSION)/PORT/$(DB_MACH); \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
	RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' \
	MACH='$(DB_MACH)' $(MAKEWHAT)

test::
	cd test; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' \
	CFLAGS='$(CFLAGS) $(FILTERS)' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
	OWNER='$(OWNER)' RANLIB='$(RANLIB)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)

menu::
	cd menu; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
	MALLOC='$(MALLOC)' RANLIB='$(RANLIB)' \
	CFLAGS='$(CFLAGS) $(FILTERS) -DLQSHOW=\"$(LQSHOW)\" -DLQFILE=\"$(LQFILE)\" ' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' CURSES='$(CURSES)' TERMCAP='$(TERMCAP)' \
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)


# shorthand:

# note: I am not assuming that the Augmented Make macro facility is
# available, so I can't use $(DIRS) directly.

tags::
	ctags $(WHICHDBM)/*.[hc] h/*.h `echo $(DIRS) | tr ' ' '\012' | sed -e 's;$$;/*.[ch];'`

@


1.18
log
@Actally this is now generated automatically by configure.
@
text
@d1 1
d6 8
d15 5
a19 1
# OS=sunos4.1.3
a20 6
# This file generated automatically by "configure";
# if you have not done this,
#	cd ..
#	./configure
# This will also generate h/port.h for you.

d24 3
d38 1
a38 1
# You might have to work to get "db" (e.g. db.1.79) to work; if so,
d60 3
a62 18
## Local Changes, generated by the configure script:
##CC=/usr/xpg2bin/cc
#
#CFLAGS_LOCAL= -I/usr/5include -L/usr/5lib
#CFLAGS_OPT=-O
#CFLAGS_DBG=-g
#LD=${CC}
#LDFLAGS_LOCAL=
#
##CC=/usr/5bin/cc
#
#CFLAGS_LOCAL= -I/usr/5include -L/usr/5lib
#CFLAGS_OPT=-O
#CFLAGS_DBG=-g
#LD=${CC}
#LDFLAGS_LOCAL=
#
# CC=cc
d64 1
a64 5
# CFLAGS_LOCAL=
# CFLAGS_OPT=-O
# CFLAGS_DBG=-g
# LD=${CC}
# LDFLAGS_LOCAL=
d66 5
d72 2
a73 3
CFLAGS_LOCAL= -Wall -I/usr/include -Wshadow -Wpointer-arith -Wcast-qual \
 -fstrength-reduce -fomit-frame-pointer -finline-functions -fdelayed-branch
CFLAGS_OPT=-O
d78 1
a78 1
##end
d80 1
a80 1
## End of Configure output.
d82 43
a124 1
# and the file mode for executables?
a126 1

d135 4
a138 4
# MAILFILTER=$(LIBDIR)/MailFilter
# NEWSFILTER=$(LIBDIR)/NewsFilter
# SGMLFILTER=$(LIBDIR)/SGMLFilter
# DEFAULTFILTER=$(LIBDIR)/DefaultFilter
d146 2
a147 2
LQSHOW=$(BINDIR)/lqshow
LQFILE=$(BINDIR)/lqfile
a153 32
# Choose between bsdhash, ndbm, sdbm, bsdhash, gdbm or dbm -- if you only have
# dbm, you may have some work to do -- see PORTING for gdbm or dbm.
# The necessary changes are in h/smalldb.h and h/Liamdbm.h if you need them.
#
# If you use db or sdbm you must use the fixed versions -- sdbm was posted to
# netnews in 1991, and there were later patches (applied in this distribution).
# 
# Note that the older ozmahash/bsdhash should not be used.  Db replaces it.
#
# The 4.4 BSD db package could be used if you have it, but I advise
# setting ffactor to 256 or higher in the call to hash_open (or in ndbm.c);
# this is the same as the db 1.79 included in this distribution, unless
# a later version of db has been released...
# 

#WHICHDBM=ndbm
#DBMLIBS=-lndbm
# MKDBM= # this is the target if we have to build ndbm...

# WHICHDBM=sdbm
# DBMLIBS=../lib/libsdbm.a
# MKDBM=sdbm
# DBMINC=-I../sdbm
WHICHDBM=bsddb # can't use "db" as that's a variable name in the package
# MKDBM=db
#DBMACH=hpux.8.07
DBMACH=sunos.4.1.1
#DBMACH=osf.1.0.2
DBMINC=-I../db.1.79/PORT/$(DBMACH)/include -I../db.1.79/PORT/$(DBMACH)
# DBMLIBS=../lib/libdb.a
DBMLIBS=../db.1.79/PORT/$(DBMACH)/libdb.a

d163 2
a164 1
RANLIB=ranlib
a165 3
CFLAGS= $(CFLAGS_LOCAL) $(CFLAGS_DBG) $(DBMINC) $(DEFS) $(GCCF) -D$(WHICHDBM) $$(EXTRA)
LDFLAGS=${LDFLAGS} $(LDFLAGS_LOCAL)

d171 1
a171 1
### End of configuration section.  See also PORTING in this directory.
a196 5
lqaddfile.src:
	#cd lqtext
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' CC='$(CC)' WHICHDBM='$(WHICHDBM)' CURSES='$(CURSES)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' lqaddfile.src
	#cd ..

d206 1
a206 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=depend $(MKTARGETS)
d211 4
a214 2
install: lib libs
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install DESTDIR="${BINDIR}" $(MKTARGETS)
d216 1
a216 1
	    /bin/cp $$i ${LIBDIR}; \
d219 1
d221 2
a222 1
	@@-echo Now install manual pages from ../doc if appropriate.
d224 9
d237 1
a237 1
	-/bin/test -d ${LIBDIR} || mkdir ${LIBDIR}
d244 1
a244 1
	mkid `find $(DIRS) -name '*.[ch]' -print`
a251 1
	-@@test -d $(LIBDIR) || mkdir -p $(LIBDIR)
d255 1
a255 1
	-@@test -d $(BINDIR) || mkdir -p $(BINDIR)
d301 2
a302 2
	cd db.1.73; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='-I. $(OPT) $(GCCF)' \
d306 1
a306 1
	MACH='$(DBMACH)' $(MAKEWHAT)
d327 1
a327 1
# note: I am not assuming hat the Augmented Make macro facility is
@


1.17
log
@made it easier to share versions of db.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.15 93/04/23 21:07:53 lee Exp $
d6 8
d25 2
a26 2
# please let me know.  Just doing a "make" inthis directory should
# build everything (after editing this file and h/globals.g appropriately).
d28 1
a28 1
# You might have to work to get "db" (e.g. db.1.73) to work; if so,
a32 1
#
a37 10
# DEFS:
# Use either -UBSD -DSYSV or -USYSV -DBSD as appropriate...
# This affects
# * the choice of default pager ($PAGER) in globals.h
# * whether some extra declarations are used to make lint and gcc -Wall
#   happy about SysV stdio.h
# It isn't very important... if you have System V stdio and curses, you
# might as well use -DSYSV -UBSD even on BSD.  Ultrix diffs are included
# inside #ifdef ultrix; use BSD on Ultrix.
# Lqtext doesn't do explicit locking or signal handling at the moment.
d39 1
a39 1
# undefined, add -DSVID (there are other changes, but
a48 6
# DEFS= -DASCIITRACE -UBSD -DSYSV -DMALLOCTRACE -DCURSESX ### for BIG testing
# DEFS= -DASCIITRACE -DBSD -USYSV -UCURSESX  ### Try this on BSD
DEFS= -DASCIITRACE -DBSD -USYSV ### SunOS 4.1
# DEFS= -DASCIITRACE -DBSD -USYSV ### OSF1
### ...and this on Sys V, or SunOS 4 or later if you prefer it:
# DEFS= -UASCIITRACE -I/usr/5include -L/usr/5lib -UBSD -DSYSV -DCURSESX -DSVID
d50 37
a86 3
# where do the installed binaries go?
BINDIR=/usr/local/bin
LIBDIR=/usr/local/lib/lqtext
d90 1
d127 5
a131 4
# db 1.71 is included in this distribution.
#
# The 4.4 BSD db package could be used instead if you have it, but I advise
# setting ffactor to 256 or higher in the call to hash_open (or in ndbm.c).
d142 1
a142 2
DBMLIBS=../lib/libdb.a
MKDBM=db
d146 3
a148 1
DBMINC=-I../db.1.73/PORT/$(DBMACH)/include -I../db.1.73/PORT/$(DBMACH)
d152 1
a152 1
# libterminfo library.  Pregrams use CURSES or TERMCAP but not both.
a158 2
# on SYSV ranlib is usually "echo"
# RANLIB=echo
d161 2
a162 31
# Choose a C compiler -- GNU's gcc if you have it, or the standard cc.
# GNU cc won't compile lqaddfile.c on some machines, but I don't know why.
## for gcc:
# CC=gcc
# GCCF= -Wall -I/usr/include -Wshadow -Wpointer-arith -Wcast-qual
# -fstrength-reduce -fomit-frame-pointer \
# -finline-functions -fdelayed-branch
##
# CC=/usr/5bin/cc
# GCCF= -I/usr/5include -L/usr/5lib
## for anything else:
CC=cc
GCCF=
#
# Use -O or -O -g for the optimiser.  Or -ql or -p for profiling (sysV)
# -O4 is for SunOS - it works fine under 4.0.3 and 4.1.1 at least.
# With gcc or recent System V compilers, you can use OPT=-O -g
# NOTE to profilers: do not mix -g with -p -- this is often broken!
# Also, if you change OPT to -p, do a make clean first, as otherwise you're
# likely to get core dumps, you can't link -g and -p objects together.
# OPT=-pg
OPT=-O4 -Qoption iropt -l4 -UDEBUGPLACES -UMALLOCTRACE -UWIDINBLOCK 
#OPT=-O -UDEBUGPLACES -UMALLOCTRACE -UWIDINBLOCK 
# DEC Alpha:
#OPT=-std0 -traditional -DNO_PROTO -unsigned -g3 -O -UDEBUGPLACES -UMALLOCTRACE -UWIDINBLOCK 
# if you get core dumps, use -g -DDEBUGPLACES -DWIDINBLOCK for extra checking.
# -DWIDINBLOCK is really for serious debugging -- it uses up 4 out of every
# BLOCKSIZE (32 or 64) data bytes to record the word number for checking...
# -DDEBUGPLACES is even worse, nearly doubling the database size.  It puts
# a { and } round every database entry, and checks that they are there on
# every read.
a163 2
CFLAGS= $(OPT) $(DBMINC) $(DEFS) $(GCCF) -D$(WHICHDBM) $$(EXTRA)

d211 2
a212 2
local:: lib bin
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKTARGETS)
d214 2
a215 7
install: libs
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKTARGETS)
	( cd bin ; for i in *; do \
	    /bin/cp $$i ${BINDIR}; \
	    chmod 755 ${BINDIR}/$$i; \
	  done; \
	)
a217 1
	    chmod 711 ${LIBDIR}/$$i; \
d232 3
@


1.16
log
@*** empty log message ***
@
text
@d117 4
a120 2
DBMINC=-I../db.1.73/PORT/sunos.4.1.1/include -I../db.1.73/PORT/sunos.4.1.1
# DBMINC=-I../db.1.73/PORT/osf.1.0.2/include -I../db.1.73/PORT/osf.1.0.2
a121 1

d138 2
a139 2
#CC=gcc
#GCCF= -Wall -I/usr/include -Wshadow -Wpointer-arith -Wcast-qual
d155 4
a158 3
#OPT=-a
OPT=-O4 -Qoption iropt -l4
# OPT=-g -UDEBUGPLACES -UMALLOCTRACE -UWIDINBLOCK 
d304 2
a305 1
	DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' $(MAKEWHAT)
@


1.15
log
@added SGMLFilter.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.14 92/08/24 00:27:29 lee Exp $
d13 13
a51 7
# -DNEWSYM gives a new, improved but not quite so tested symbol table in
# lqaddfile, that saves scads of memory...  Please don't try and use the old
# one, as I haven't included it!  This option will go away soon.
#
# -DWIDINBLOCK is really for serious debugging -- it uses up 4 out of every
# BLOCKSIZE (32 or 64) data bytes to record the word number for checking...
#
d53 5
a57 2
DEFS= -UWIDINBLOCK -DASCIITRACE -DBSD -USYSV -UCURSESX  ### Try this on BSD
# DEFS= -I/usr/5include -L/usr/5lib -DASCIITRACE -UBSD -DSYSV -DCURSESX -DSVID ### ...and this on Sys V
d69 14
a83 4
MAILFILTER=$(LIBDIR)/MailFilter
NEWSFILTER=$(LIBDIR)/NewsFilter
SGMLFILTER=$(LIBDIR)/SGMLFilter
DEFAULTFILTER=$(LIBDIR)/DefaultFilter
d89 1
d96 4
a99 2
# If you use bsdhash or sdbm you must use the fixed versions -- sdbm was
# posted to netnews in 1991, and bsdhash is included with this distribution.
d101 1
a101 1
# Note that the older ozmahash should not be used.  Bsdhash replaces it.
a108 3
WHICHDBM=bsdhash
DBMLIBS=../lib/libhash.a
MKDBM=mkbsdhash # this is the target if we have to build bsdhash...
d110 9
a118 4
# On BSD systems you need -ltermcap as well as libcurses for "lqshow".
# TERMCAP=-lcursesX -ltermcap # ultrix -- cursesx
TERMCAP=-lcurses -ltermcap
# TERMCAP=-L/usr/5lib -lcurses
d120 10
d137 4
a140 3
# CC=gcc
# GCCF= -Fwriteable-strings -I/usr/include
# GCCF= -Wall -I/usr/include -I../bsdhash
d145 2
a146 2
CC=/usr/5bin/cc
GCCF=-I../bsdhash
d154 1
a154 1
# OPT=-g
d156 8
d165 1
a165 1
CFLAGS= $(OPT) $(DEFS) $(GCCF) -D$(WHICHDBM) $$(EXTRA)
d171 1
d173 2
d177 3
a179 2
DIRS=mkliblqerror mkliblqtext mkliblqutil mklqtext mkfilters mkmenu mktest
MKTARGETS=mklib mkbin $(MKDBM) $(DIRS)
d200 1
a200 1
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' DBMLIBS="${DBMLIBS}" LINTFLAGS='$(LINTFLAGS)' lqaddfile.src
d205 1
d209 1
a209 1
	rm -f lib/* bin/* testbin/* core *.o m.log tags
d214 1
a214 1
local: mklib mkbin # libs
a219 1
	    test -f ${BINDIR}/$$i && /bin/mv ${BINDIR}/$$i ${BINDIR}/$$i.old; \
d221 1
a221 1
	    chmod 711 ${BINDIR}/$$i; \
a224 1
	    test -f ${LIBDIR}/$$i && /bin/mv ${LIBDIR}/$$i ${LIBDIR}/$$i.old; \
d237 3
a239 3
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) mkliblqtext
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) mkliblqutil
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) mkliblqerror
d242 1
a242 1
# Note to mklib and mkbin:
d246 1
a246 1
mklib: # see note above about mkdir
d250 1
a250 1
mkbin:  # see note above about mkdir
d254 1
a254 1
mkfilters:
d257 1
a257 4
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" \
	-DDEFAULTFILTER=\"$(DEFAULTFILTER)\" \
	-DSGMLFILTER=\"$(SGMLFILTER)\" \
	-DNEWSFILTER=\"$(NEWSFILTER)\" ' CC='$(CC)' \
d261 1
a261 1
mkliblqtext:
d264 1
a264 4
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" \
	-DDEFAULTFILTER=\"$(DEFAULTFILTER)\" \
	-DSGMLFILTER=\"$(SGMLFILTER)\" \
	-DNEWSFILTER=\"$(NEWSFILTER)\" ' CC='$(CC)' \
d268 1
a268 2

mkliblqutil:
d271 1
a271 1
	CFLAGS='$(CFLAGS)' CC='$(CC)' \
d276 1
a276 1
mkliblqerror:
d279 1
a279 1
	CFLAGS='$(CFLAGS)' CC='$(CC)' \
d283 1
a283 1
mklqtext:
d286 2
a287 5
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" \
	-DDEFAULTFILTER=\"$(DEFAULTFILTER)\" \
	-DSGMLFILTER=\"$(SGMLFILTER)\" \
	-DNEWSFILTER=\"$(NEWSFILTER)\" ' CC='$(CC)' \
	WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' RANLIB='$(RANLIB)' \
d290 1
a290 1
mksdbm:
d297 3
a299 3
mkbsdhash:
	cd bsdhash; \
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='-I. $(CFLAGS)' \
d304 1
a304 1
mktest:
d306 3
a308 2
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
d312 1
a312 1
mkmenu:
d316 2
a317 2
	CFLAGS='$(CFLAGS) -DLQSHOW=\"$(LQSHOW)\" -DLQFILE=\"$(LQFILE)\" ' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
d323 2
a324 2
ctags:
	ctags $(WHICHDBM)/*.[hc] h/*.h `echo $(DIRS) | tr ' ' '\012' | sed -e 's/^mk//' -e 's;$$;/*.[ch];'`
d326 2
a327 26
lq:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lq

lqaddfile:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqaddfile

lqfile:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqfile

lqkwik:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqkwik

lqphrase:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqphrase

lqshow:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqshow

lqtext:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqtext

lqword:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=lqword

mkwidtable:
	$(MAKE) -$(MAKEFLAGS)  mklqtext MAKEWHAT=mkwidtable
@


1.14
log
@deleted Log, other changes.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.13 91/03/02 20:23:02 lee Exp Locker: lee $
d63 1
d213 1
d223 1
d232 1
a232 3
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" \
	-DDEFAULTFILTER=\"$(DEFAULTFILTER)\" \
	-DNEWSFILTER=\"$(NEWSFILTER)\" ' CC='$(CC)' \
d240 1
a240 3
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" \
	-DDEFAULTFILTER=\"$(DEFAULTFILTER)\" \
	-DNEWSFILTER=\"$(NEWSFILTER)\" ' CC='$(CC)' \
d249 1
@


1.13
log
@Improved install entry.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.12 91/03/02 19:34:13 lee Exp Locker: lee $
d25 1
a25 1
# might as well use -DSYSV -UBSD even on SysV.  Ultrix diffs are included
d28 2
a29 2
# If you are using sdbm (this is what I use) and get messages about L_SET
# or L_SEEK being undefined, add -DSVID (there are other changes, but
d39 7
d47 2
a48 2
DEFS= -UASCIITRACE -DBSD -USYSV   ### Try this on BSD-like Unix ...
# DEFS= -UASCIITRACE -UBSD -DSYSV -DCURSESX -DSVID ### ...and this on Sys V
d50 1
a50 5
# Who owns the installed binaries?
OWNER=lee
# and what group are they in?
GROUP=other
# and where do they go?
d63 1
d68 2
a69 2
MALLOC=-lmalloc # faster version of malloc
# MALLOC= # BSD Unix doesn't have malloc(3X), only malloc(3)
d71 2
a72 2
# Choose between ozmahash, ndbm, sdbm, gdbm or dbm -- if you only have dbm,
# you'll have some work to do -- see PORTING for gdbm or dbm.
d74 8
a81 3
# If you use ozmahash or sdbm you must use the fixed versions -- sdbm was
# posted to netnews in 1991, and ozmahash is included with this distribution.
# If you use ozmahash, copy ozmahash/*.h into h.
d83 2
a84 2
# WHICHDBM=ndbm
# DBMLIBS=-lndbm
d86 1
a86 1
WHICHDBM=ozmahash
d88 1
a88 1
MKDBM=mkozmahash # this is the target if we have to build ndbm...
d93 1
a93 1
# TERMCAP=-lcurses
d102 6
a107 2
#CC=gcc
#GCCF= -Fwriteable-strings -Wall -I/usr/include
d109 3
a111 3
CC=cc
GCCF=
##
d113 1
a113 1
# -O3 (or -O4 if you are feeling brave) is for SunOS
d116 4
a119 1
OPT=-O
a126 1

d129 3
a131 3
TARGETS=mklib mkbin libs mkfilters mktest mkmenu
DIRS=mkfilters mkliblqtext mklqtext mktest mkmenu
MKTARGETS=$(MKDBM) $(DIRS)
d160 1
a160 1
	rm -f lib/* bin/* testbin/* core *.o m.log
d165 1
a165 1
local: mklib mkbin libs
d173 1
a173 2
	    chmod 711 ${BINDIR}/$$i; chgrp ${GROUP} ${BINDIR}/$$i; \
	    chown ${OWNER} ${BINDIR}/$$i;\
d179 1
a179 2
	    chmod 711 ${LIBDIR}/$$i; chgrp ${GROUP} ${LIBDIR}/$$i; \
	    chown ${OWNER} ${LIBDIR}/$$i; \
d191 2
d210 4
a213 3
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" -DNEWSFILTER=\"$(NEWSFILTER)\" ' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
	RANLIB='$(RANLIB)' \
d219 4
a222 3
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" -DNEWSFILTER=\"$(NEWSFILTER)\" ' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
	RANLIB='$(RANLIB)' \
d225 20
a246 3
	RANLIB='$(RANLIB)' \
	CFLAGS='$(CFLAGS) -DMAILFILTER=\"$(MAILFILTER)\" -DNEWSFILTER=\"$(NEWSFILTER)\" ' \
	CC='$(CC)' WHICHDBM='$(WHICHDBM)' TERMCAP='$(TERMCAP)' \
d248 4
d261 2
a262 2
mkozmahash:
	cd ozmahash; \
d277 2
a278 1
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' RANLIB='$(RANLIB)' \
d284 32
a315 41
#
# $Log:	Makefile,v $
# Revision 1.12  91/03/02  19:34:13  lee
# More comments and changed some defaults.
# 
# Revision 1.11  91/03/02  19:16:27  lee
# Now makes ozmahash if necessary, and uses SHELL=/bin/sh.
# 
# Revision 1.10  91/02/20  19:33:37  lee
# Removed duplicate definitions of LIB/LIBDIR, BIB/BINDIR and OWNER;
# OWNER now passed down in mktest correctly.
# 
# Revision 1.9  90/10/05  23:40:41  lee
# More comments for easier configuration -- and added more examples.
# 
# Revision 1.8  90/10/03  21:39:41  lee
# added CURSESX and more comments.
# ;.
# 
# Revision 1.7  90/10/03  21:14:08  lee
# Now passes MAILFILTER and NEWSFILTER.
# 
# Revision 1.6  90/10/01  18:28:43  lee
# Added MAILFLTER and NEWSFILTER to mkfilter
# 
# Revision 1.5  90/09/28  21:52:14  lee
# Now does installation itself...
# 
# Revision 1.4  90/09/10  13:25:31  lee
# Added some saber-C hooks.
# 
# Revision 1.3  90/07/27  17:50:51  lee
# alpha test version shipped
# 
# Revision 1.2  90/03/23  18:57:13  lee
# Added entries for lint and depend.
# 
# Revision 1.1  90/03/23  15:11:30  lee
# Initial revision
# 
#
@


1.12
log
@More comments and changed some defaults.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.11 91/03/02 19:16:27 lee Exp Locker: lee $
d46 1
a46 1
GROUP=bin
d159 3
a161 1
	    chown ${OWNER} ${BINDIR}/$$i; )
d166 4
a169 2
	    chown ${OWNER} ${LIBDIR}/$$i; )
	@@-echo Source Installation complete
d247 3
@


1.11
log
@Now makes ozmahash if necessary, and uses SHELL=/bin/sh.
@
text
@d3 1
a3 1
# $Id$
d72 1
d220 2
a221 2
	cd ozmahash:
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
d243 3
@


1.10
log
@Removed duplicate definitions of LIB/LIBDIR, BIB/BINDIR and OWNER;
OWNER now passed down in mktest correctly.
@
text
@d3 2
a4 1
# $Header: /usr/src/cmd/lq-text/src/RCS/Makefile,v 1.9 90/10/05 23:40:41 lee Exp Locker: lee $
d6 2
d15 2
a16 1
# (or some other number).
d48 2
a49 2
BINDIR=/home/lee/lq-text/src/bin
LIBDIR=/home/lee/lq-text/src/lib
d67 2
a68 2
# Choose between ndbm, sdbm, gdbm or dbm -- if you only have dbm, you'll
# have some work to do -- see PORTING for all except sdbm and ndbm.
d70 2
a71 3
WHICHDBM=sdbm
DBMLIBS=../lib/libsdbm.a
MKDBM=mksdbm # this is the target if we have to build ndbm...
d73 7
d115 1
a115 1
MKTARGETS=sdbm $(DIRS)
d143 1
a143 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=clean $(DIRS)
d175 5
a179 1
mklib:
d181 1
d183 1
a183 1
mkbin:
d185 1
d218 7
d242 4
@


1.9
log
@More comments for easier configuration -- and added more examples.
@
text
@d3 1
a3 1
# $Header: /home/lee/lq-text/src/RCS/Makefile,v 1.8 90/10/03 21:39:41 lee Exp Locker: lee $
d46 2
a99 4
# options for installing
BIN= /usr/local/bin
OWNER=lee
MODE=751
d145 4
a148 4
	    test -f ${BIN}/$$i && /bin/mv ${BIN}/$$i ${BIN}/$$i.old; \
	    /bin/cp $$i ${BIN}; \
	    chmod 711 ${BIN}/$$i; chgrp ${GROUP} ${BIN}/$$i; \
	    chown ${OWNER} ${BIN}/$$i; )
d150 4
a153 4
	    test -f ${LIB}/$$i && /bin/mv ${LIB}/$$i ${LIB}/$$i.old; \
	    /bin/cp $$i ${LIB}; \
	    chmod 711 ${LIB}/$$i; chgrp ${GROUP} ${LIB}/$$i; \
	    chown ${OWNER} ${LIB}/$$i; )
d206 1
a206 1
	RANLIB='$(RANLIB)' \
d219 3
@


1.8
log
@added CURSESX and more comments.
;.
@
text
@d3 1
a3 1
# $Header: /home/lee/lq-text/src/RCS/Makefile,v 1.7 90/10/03 21:14:08 lee Exp Locker: lee $
d24 3
d35 3
a37 2
# DEFS= -DASCIITRACE -UBSD -DSYSV -UMALLOCTRACE -DCURSESX
DEFS= -DASCIITRACE -DBSD -USYSV
d51 1
d54 2
d58 2
a59 2
# MALLOC=-lmalloc # faster version of malloc
MALLOC=
d88 3
a90 2
OPT=-O4
# OPT=-O
d141 1
a141 1
local: libs
a145 2
	-/bin/test -d ${BIN} || mkdir ${BIN}
	-/bin/test -d ${LIB} || mkdir ${LIB}
d163 1
d213 2
a214 1
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
a215 1
	RANLIB='$(RANLIB)' \
d221 4
@


1.7
log
@Now passes MAILFILTER and NEWSFILTER.
@
text
@d3 1
a3 1
# $Header: /home/lee/lq-text/src/RCS/Makefile,v 1.6 90/10/01 18:28:43 lee Exp Locker: lee $
d14 11
a24 1
# use either -UBSD -DSYSV or -USYSV -DBSD as appropriate...
d26 7
a32 1
# DEFS= -DASCIITRACE -DBSD -USYSV -DMALLOCTRACE
d39 1
a39 1
# and where do they go
d101 2
a102 1
all: $(TARGETS)
d133 3
d214 3
@


1.6
log
@Added MAILFLTER and NEWSFILTER to mkfilter
@
text
@d3 1
a3 1
# $Header: /home/lee/lq-text/src/RCS/Makefile,v 1.5 90/09/28 21:52:14 lee Exp Locker: lee $
d27 7
a68 2
# The $$(EXTRA) (yes, $$, not $) is so the individual Makefiles can
# add things like relative include paths...
d148 2
a149 1
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
a151 2
	MAILFILTER='"$(LIBDIR)/MailFilter"' \
	NEWSFILTER='"$(LIBDIR)/NewsFilter"' \
d156 2
a157 1
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
a163 1
	$(MAKE) -$(MAKEFLAGS) MALLOC='$(MALLOC)' CFLAGS='$(CFLAGS)' \
d165 1
d167 1
a167 2
	MAILFILTER='"$(LIBDIR)/MailFilter"' \
	NEWSFILTER='"$(LIBDIR)/NewsFilter"' \
d194 3
@


1.5
log
@Now does installation itself...
@
text
@d3 1
a3 1
# $Header: /home/lee/lq-text/src/RCS/Makefile,v 1.4 90/09/10 13:25:31 lee Exp Locker: lee $
d24 2
a25 2
BINDIR=/usr/local/bin
LIBDIR=/usr/local/lib/lq-text
d57 3
a59 1
OPT=-g
d119 1
a119 1
	    chown ${OWNER} ${BIN/$$i; )
d124 1
a124 1
	    chown ${OWNER} ${LIB/$$i; )
d146 2
d162 2
d190 3
@


1.4
log
@Added some saber-C hooks.
@
text
@d3 1
a3 1
# $Header: /home/lee/lq-text/src/RCS/Makefile,v 1.3 90/07/27 17:50:51 lee Exp Locker: lee $
d10 2
a11 1
# If ASCIITRACE is defined, you can get extra debugging output using -t 99
d15 2
d19 8
d76 1
d89 1
a89 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=saber_src all
d92 1
a92 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=saber_obj all
d100 1
a100 1
	$(MAKE) -i$(MAKEFLAGS) MAKEWHAT=tidy all
d107 1
a107 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=depend all
d109 16
a124 2
install:
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install all
d127 1
a127 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=lint all
d130 1
a130 1
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=install $(MKDBM) mkliblqtext mklqtext
d184 3
@


1.3
log
@alpha test version shipped
@
text
@d3 1
a3 1
# $Header: Makefile,v 1.2 90/03/23 18:57:13 lee Exp $
d63 2
a64 1
TARGETS=mklib mkbin $(MKDBM) mkliblqtext mklqtext mkfilters mktest mkmenu
d68 19
d91 2
a92 2
	$(MAKE) -$(MAKEFLAGS) MAKEWHAT=clean all
	rm -f lib/* bin/* testbin/*
d103 4
d155 1
d158 3
@


1.2
log
@Added entries for lint and depend.
@
text
@d3 1
a3 1
# $Header: Makefile,v 1.1 90/03/23 15:11:30 lee Locked $
a9 8
# If UNDERHOME is defined, the libraries/programs will look for a database
# directory as follows:
# * first, check for a "-d directory" command line option.
# * if that is not given, look for an environment variable ${LQTEXTDIR}
# * if that is not given, look for $HOME/$(UNDERHOME) (not a shell variable)
# * finally, if there is a default database directory defined in globals.h
# (as shipped, /tmp/lqtext -- you may want to change this!), use that.
#
d14 1
a14 1
DEFS= -DUNDERHOME=\"LQTEXTDIR\" -DASCIITRACE -UBSD -DSYSV
d17 2
a18 2
# MALLOC=
MALLOC=-lmalloc # faster version of malloc
d22 4
a25 1
DBM=sdbm
d27 4
a30 3
# On BSD systems you need this as well as libcurses for "lqshow".
# TERMCAP=-ltermcap
TERMCAP=
d32 4
d39 2
a40 2
# CC=gcc
# GCCF=-traditional -Fwriteable-strings -Wall -I/usr/include
d45 2
a46 2
# Use -O or -O -g for the optimiser.
OPT=-O -g
d48 3
a50 1
CFLAGS= $(OPT) $(DEFS) -UBSD -DSYSV $(GCCF)
d52 3
a54 2
#
LINTFLAGS=-xv
d63 1
a63 1
TARGETS=mklib mkbin mkfilters mklqlib mklqtext mk$(DBM) mktest
d67 7
d77 3
d84 1
a84 1
	-mkdir lib
d87 1
a87 1
	-mkdir bin
d92 3
a94 2
	CC='$(CC)' DBM='$(DBM)' TERMCAP=$(TERMCAP) LINTFLAGS='$(LINTFLAGS)' \
		$(MAKEWHAT) 
d96 2
a97 2
mklqlib:
	cd lqlib; \
d99 3
a101 2
	CC='$(CC)' DBM='$(DBM)' TERMCAP=$(TERMCAP) LINTFLAGS='$(LINTFLAGS)' \
		$(MAKEWHAT)
d106 3
a108 2
	CC='$(CC)' DBM='$(DBM)' TERMCAP=$(TERMCAP) LINTFLAGS='$(LINTFLAGS)' \
		$(MAKEWHAT)
d110 2
a111 2
mk$(DBM):
	cd $(DBM); \
d113 3
a115 2
	CC='$(CC)' DBM='$(DBM)' TERMCAP=$(TERMCAP) LINTFLAGS='$(LINTFLAGS)' \
		$(MAKEWHAT)
d120 3
a122 2
	CC='$(CC)' DBM='$(DBM)' TERMCAP=$(TERMCAP) LINTFLAGS='$(LINTFLAGS)' \
		$(MAKEWHAT)
d124 7
d133 3
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
# Makefile for NX-Text, a full text retrieval package by Liam R. Quin
d3 6
a8 1
# $Header: Makefile,v 1.1 89/09/07 21:07:21 lee Locked $
d10 7
a16 4
# $Log:	Makefile,v $
# Revision 1.1  89/09/07  21:07:21  lee
# Initial revision
# 
d18 2
a19 5

TARGETS = lqaddfile lqfiles lqword lqphrase lqshow filters
TESTS = numtest TryNum dbmtry put pmap TryRoot testsix
BINFILES =lqaddfile lqfiles lqword lqshow lqphrase
LIBFILES = MailFilter NewsFilter CFilter CDMSFilter RoffFilter
d21 14
a34 3
BIN= /usr/local/bin
OWNER=lee
MODE=751
d36 3
a38 42
# If you want, use 
# -DUNDERHOME=LQtextdir
# here and leave off the trailing "/" -- e.g., have -DDATABASE=\"data\" -- 
# so that the default database is under one's home directory.
# I don't do this becasue we don't have enough disk space.
# All the programs should by now take a -d dir option to specify a
# directory containing the following files -- if no -d is given, $LQTEXT
# (the UNIX environment variable) is given, and then if that's empty,
# either $HOME/$(UNDERHOME) (UNDERHOME defined here) or whatever default
# you put in LQTEXTDIR here is used.
# The directory is NOT created automatically.
#
# DOCPATH gives the list of directories in which to search in order
# to find files to retrieve and to index.  The default can be wired
# in here, or can be simply "." (in which case relative pathnames will
# be from wherever one invokes the commands, and absolute pathnames
# will be absolute.  For example,
# -DDFLTDOCPATH=\"/usr/man:.\"
#
DEFS=-DLQTEXTDIR=\"/tmp/lqtext\"  \
     -DWORDINDEX=\"wordlist\"  \
     -DDATABASE=\"data\"  \
     -DDEFAULTCOMMONFILE=\"Common\"  \
     -DFIDFILE=\"FIDFile\"  \
     -DFILEINDEX=\"FileList\"  \
     -DUNDERHOME=\"LQTEXTDIR\" \
     -DWIDFILE=\"WIDFile\"  \
     -DWIDINDEXFILE=\"WIDIndex\"


# For gdbm, need alloca and bcpy.  Bl**dy software :-(
# for ndbm (best), leave empty or -lndbm
DBM=ndbm.o bcopy.o
DBMLIBS=
# DBMLIBS=

TERMCAP=-ltermcap # bsd only

MALLOC=
MALLOC=-lmalloc # for SysV
OPT=-O
# for gcc:
d41 1
a41 1
# for anything else:
d44 5
a48 4
CFLAGS= -g $(OPT) -DASCIITRACE $(DEFS) -DLiam -I./h -DNDBM -UBSD $(GCCF)
LINTCFLAGS= -DASCIITRACE $(DEFS) -DLiam -I. -DNDBM -UBSD
# Add -DBULL for Honeywell Bull XPS100-X20
# add -traditional -Fwritable-strings for gcc
d50 2
a51 27
ADDOBJS=wordtable.o lqaddfile.o pblock.o numbers.o smalldb.o WordInfo.o \
	Defaults.o FileList.o $(DBM) FilterType.o Root.o malloc.o DocPath.o \
	zzz.o xxx.o
ADDSRCS=lqaddfile.c wordtable.c pblock.c numbers.c smalldb.c WordInfo.c \
	Defaults.c FileList.c FilterType.c Root.c malloc.c DocPath.c

DBMTRYOBJS=dbmtry.o smalldb.o malloc.o $(DBM)

FileListOBJS=fileindex.o smalldb.o FileList.o $(DBM) FilterType.o malloc.o \
	DocPath.o Defaults.o Root.o
FileListSRCS=fileindex.c smalldb.c FileList.c FilterType.c malloc.c \
	DocPath.c Defaults.c Root.c

WordListSRCS=lqword.c smalldb.c WordInfo.c FileList.c pblock.c \
	numbers.c Root.c malloc.c DocPath.c Defaults.c
WordListOBJS=lqword.o smalldb.o WordInfo.o FileList.o pblock.o \
	numbers.o $(DBM) Root.o malloc.o DocPath.o Defaults.o

# The following are for "make depend"...
DEPENDFILES=Defaults.c DocPath.c FileList.c \
	FilterMain.c FilterType.c MailFilter.c NewsFilter.c \
	MaxWid.c Phrase.c Root.c \
	WordInfo.c fileindex.c lqaddfile.c lqphrase.c \
	lqshow.c lqword.c malloc.c numbers.c pblock.c smalldb.c \
	system.c wordtable.c \
	bcopy.c ndbm.c \
	TryNum.c TryRoot.c SixBit.c dbmtry.c put.c sizes.c trywid.c
d53 4
a56 1
all: $(TARGETS)
d58 1
a58 2
lint.xxx:
	lint $(LINTCFLAGS) xxx.c
d60 1
a60 88
install: all
	for i in $(BINFILES); do cp "$$i" $(BIN); \
	strip "$(BIN)/$$i" ; \
	chmod $(MODE) "$(BIN)/$$i" ; \
	chown $(OWNER) "$(BIN)/$$i" ; \
	done

lqshow: lqshow.o malloc.o DocPath.o Root.o Defaults.o system.o
	$(CC) $(CFLAGS) -o lqshow lqshow.o malloc.o DocPath.o \
	Defaults.o Root.o system.o -lcurses $(TERMCAP) $(DBMLIBS)

dbmtry: $(DBMTRYOBJS)
	$(CC) $(CFLAGS) -o dbmtry $(DBMTRYOBJS) $(DBMLIBS)

pmap: pmap.o numbers.o WordInfo.o smalldb.o pblock.o $(DBM) FileList.o
	$(CC) $(CFLAGS) -o pmap pmap.o numbers.o WordInfo.o smalldb.o  \
	pblock.o $(DBM) FileList.o $(DBMLIBS)

TryRoot: TryRoot.c Root.c malloc.c
	$(CC) $(CFLAGS) -o TryRoot TryRoot.o Root.o malloc.o

testsix: SixBit.c
	/bin/rm -f SixBit.o
	$(CC) $(CFLAGS) -DTESTSIX SixBit.c -o testsix
	/bin/rm -f SixBit.o

numtry: numbers.c
	/bin/rm -f numbers.o
	$(CC) -DTESTNUMBERS $(CFLAGS) numbers.c -o numtry
	/bin/rm -f numbers.o

TryNum: numbers.o TryNum.o malloc.o
	$(CC)  $(CFLAGS) numbers.o TryNum.o malloc.o -o TryNum

lqaddfile:  $(ADDOBJS)
	$(CC) $(CFLAGS) -o lqaddfile $(ADDOBJS) $(MALLOC)  $(DBMLIBS)

lqfiles: $(FileListOBJS)
	$(CC) $(CFLAGS) -o lqfiles $(FileListOBJS) $(MALLOC) $(DBMLIBS)
	
lqword: $(WordListOBJS)
	$(CC) $(CFLAGS) -o lqword $(WordListOBJS) $(MALLOC) $(DBMLIBS)

filters: MailFilter NewsFilter # CFilter
	@@echo Filters up to date.

CFilter: FilterMain.o CFilter.o
	$(CC) $(CFLAGS) -o CFilter FilterMain.o CFilter.o $(MALLOC)

NewsFilter: FilterMain.o NewsFilter.o malloc.o
	$(CC) $(CFLAGS) -o NewsFilter FilterMain.o malloc.o NewsFilter.o $(MALLOC)

MailFilter: FilterMain.o MailFilter.o malloc.o
	$(CC) $(CFLAGS) -o MailFilter FilterMain.o MailFilter.o malloc.o \
	$(MALLOC)

CDMSFilter: FilterMain.o CDMSFilter.o
	$(CC) $(CFLAGS) -o CDMSFilter FilterMain.o CDMSFilter.o $(MALLOC)

lqphrase: lqphrase.o Phrase.o pblock.o smalldb.o numbers.o $(DBM) \
		FileList.o WordInfo.o malloc.o Root.o DocPath.o Defaults.o
	$(CC) $(CFLAGS) -o lqphrase lqphrase.o Phrase.o pblock.o Defaults.o \
	smalldb.o numbers.o $(DBM) FileList.o WordInfo.o malloc.o Root.o \
	DocPath.o $(DBMLIBS)

NumberTest: numbers.c
	$(CC) $(CFLAGS) -DTESTNUMBERS -o NumberTest numbers.c

.PRECIOUS: AddFile.Lint News.Lint FileInfo.Lint Phrase.Lint

lint: AddFile.Lint News.Lint FileInfo.Lint Phrase.Lint

Phrase.Lint: lqphrase.c Phrase.c pblock.c smalldb.c numbers.c \
		FileList.c WordInfo.c malloc.c Root.c
	lint $(LINTCFLAGS) lqphrase.c Phrase.c pblock.c smalldb.c numbers.c \
	FileList.c WordInfo.c malloc.c Root.c > Phrase.Lint 2>&1
	
FileInfo.Lint: $(FileListSRCS)
	lint $(LINTCFLAGS) $(FileListSRCS) > FileInfo.Lint 2>&1

AddFile.Lint:
	lint $(LINTCFLAGS) $(ADDSRCS)  > AddFile.Lint 2>&1

News.Lint:
	lint $(LINTCFLAGS) NewsFilter.c FilterMain.c > News.Lint 2>&1

tidy:
	/bin/rm -f *.o core
d62 1
a62 2
clean: tidy
	/bin/rm -f $(TARGETS) $(TEST)
d65 4
a68 1
	CC=gcc mkdep $(CFLAGS) *.c
d70 42
a111 106
# DO NOT PUT ANYTHING AFTER THIS LINE
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

Defaults.o : Defaults.c globals.h /usr/include/fcntl.h \
  /usr/include/sys/fcntl.h /usr/include/errno.h /usr/include/sys/errno.h \
  /usr/include/stdio.h /usr/include/malloc.h /usr/include/ctype.h \
  emalloc.h /usr/include/sys/types.h fileinfo.h wordinfo.h \
  pblock.h phrase.h 
DocPath.o : DocPath.c globals.h /usr/include/sys/types.h \
  /usr/include/sys/stat.h /usr/local/lib/gcc-include/limits.h \
  /usr/include/stdio.h emalloc.h fileinfo.h 
FileList.o : FileList.c globals.h /usr/include/stdio.h \
  /usr/include/malloc.h /usr/include/unistd.h /usr/include/sys/types.h \
  /usr/include/sys/stat.h /usr/include/signal.h /usr/include/sys/signal.h \
  /usr/include/errno.h /usr/include/sys/errno.h /usr/include/fcntl.h \
  /usr/include/sys/fcntl.h /usr/include/string.h smalldb.h \
  ndbm.h fileinfo.h emalloc.h 
FilterMain.o : FilterMain.c /usr/include/stdio.h 
FilterType.o : FilterType.c /usr/include/stdio.h /usr/include/malloc.h \
  emalloc.h /usr/include/sys/types.h /usr/include/sys/stat.h \
  /usr/include/errno.h /usr/include/sys/errno.h /usr/include/fcntl.h \
  /usr/include/sys/fcntl.h /usr/include/string.h /usr/include/ctype.h \
  fileinfo.h filter.h wordrules.h 
MailFilter.o : MailFilter.c /usr/include/stdio.h /usr/include/malloc.h \
  /usr/include/ctype.h wordrules.h emalloc.h 
MaxWid.o : MaxWid.c globals.h 
NewsFilter.o : NewsFilter.c /usr/include/stdio.h /usr/include/malloc.h \
  /usr/include/ctype.h wordrules.h emalloc.h 
Phrase.o : Phrase.c globals.h /usr/include/stdio.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h /usr/include/malloc.h \
  /usr/include/sys/types.h /usr/include/ctype.h fileinfo.h \
  wordinfo.h pblock.h pblock.h phrase.h wordrules.h emalloc.h 
ReadAhead.o : ReadAhead.c globals.h /usr/include/stdio.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h Message.h 
Root.o : Root.c globals.h /usr/include/sys/types.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h /usr/include/stdio.h \
  /usr/include/malloc.h /usr/include/ctype.h fileinfo.h \
  wordinfo.h pblock.h wordrules.h emalloc.h 
SixBit.o : SixBit.c globals.h /usr/include/stdio.h \
  /usr/include/string.h /usr/include/ctype.h wordrules.h 
TryNum.o : TryNum.c /usr/include/stdio.h numbers.h \
  emalloc.h 
TryRoot.o : TryRoot.c /usr/include/stdio.h /usr/include/ctype.h \
  /usr/include/sys/types.h fileinfo.h wordinfo.h pblock.h \
  wordrules.h 
WordInfo.o : WordInfo.c globals.h /usr/include/errno.h \
  /usr/include/sys/errno.h /usr/include/fcntl.h /usr/include/sys/fcntl.h \
  /usr/include/malloc.h /usr/include/signal.h /usr/include/sys/signal.h \
  /usr/include/stdio.h /usr/include/string.h /usr/include/ctype.h \
  /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/unistd.h \
  fileinfo.h smalldb.h ndbm.h wordindex.h wordinfo.h \
  pblock.h numbers.h emalloc.h wordrules.h pblock.h 
bcopy.o : bcopy.c 
dbmtry.o : dbmtry.c globals.h /usr/include/stdio.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h smalldb.h \
  ndbm.h 
fileindex.o : fileindex.c globals.h /usr/include/stdio.h \
  /usr/include/sys/types.h fileinfo.h 
lqaddfile.o : lqaddfile.c /usr/include/stdio.h /usr/include/malloc.h \
  /usr/include/ctype.h /usr/include/sys/types.h /usr/include/sys/stat.h \
  globals.h fileinfo.h wordinfo.h pblock.h wordrules.h \
  filter.h emalloc.h 
lqphrase.o : lqphrase.c globals.h /usr/include/stdio.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h /usr/include/sys/types.h \
  fileinfo.h wordinfo.h pblock.h pblock.h phrase.h 
lqshow.o : lqshow.c globals.h /usr/include/curses.h \
  /usr/include/stdio.h /usr/include/termio.h /usr/include/sys/termio.h \
  /usr/include/unctrl.h /usr/include/malloc.h /usr/include/fcntl.h \
  /usr/include/sys/fcntl.h /usr/include/ctype.h /usr/include/sys/types.h \
  /usr/include/sys/stat.h fileinfo.h wordinfo.h pblock.h \
  wordrules.h pblock.h emalloc.h 
lqword.o : lqword.c globals.h /usr/include/stdio.h \
  /usr/include/sys/types.h /usr/include/malloc.h /usr/include/fcntl.h \
  /usr/include/sys/fcntl.h /usr/include/ctype.h /usr/local/lib/gcc-include/limits.h \
  fileinfo.h wordinfo.h pblock.h smalldb.h ndbm.h pblock.h \
  wordrules.h emalloc.h 
malloc.o : malloc.c /usr/include/malloc.h /usr/include/stdio.h \
  /usr/include/ctype.h 
ndbm.o : ndbm.c /usr/include/sys/types.h /usr/include/sys/stat.h \
  /usr/include/sys/file.h /usr/include/fcntl.h /usr/include/sys/fcntl.h \
  /usr/include/stdio.h /usr/include/errno.h /usr/include/sys/errno.h \
  ndbm.h 
numbers.o : numbers.c /usr/include/stdio.h numbers.h 
pblock.o : pblock.c globals.h /usr/include/stdio.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h /usr/include/malloc.h \
  /usr/include/sys/types.h fileinfo.h wordinfo.h pblock.h \
  pblock.h numbers.h wordrules.h emalloc.h blkheader.h 
put.o : put.c /usr/include/stdio.h /usr/include/ctype.h 
sizes.o : sizes.c globals.h /usr/include/stdio.h /usr/include/malloc.h \
  /usr/include/ctype.h /usr/include/sys/types.h /usr/include/fcntl.h \
  /usr/include/sys/fcntl.h smalldb.h ndbm.h fileinfo.h \
  wordinfo.h pblock.h pblock.h wordrules.h wordindex.h \
  emalloc.h 
smalldb.o : smalldb.c /usr/include/fcntl.h /usr/include/sys/fcntl.h \
  /usr/local/lib/gcc-include/limits.h smalldb.h ndbm.h \
  emalloc.h 
system.o : system.c /usr/include/curses.h /usr/include/stdio.h \
  /usr/include/termio.h /usr/include/sys/termio.h /usr/include/unctrl.h 
trywid.o : trywid.c globals.h /usr/include/sys/types.h \
  /usr/include/stdio.h fileinfo.h wordinfo.h pblock.h 
wordtable.o : wordtable.c globals.h /usr/include/stdio.h \
  /usr/include/malloc.h /usr/include/ctype.h /usr/include/sys/types.h \
  /usr/include/fcntl.h /usr/include/sys/fcntl.h smalldb.h \
  ndbm.h fileinfo.h wordinfo.h pblock.h pblock.h wordrules.h \
  wordindex.h emalloc.h 
@
