.SUFFIXES:
.SUFFIXES: .info .dvi  .texi


# begin makedefs
GCLDIR=/d/wfs/gcl-2.0
SHELL=/bin/sh
MACHINE=386-linux
TK_LIBRARY=/usr/lib/tk
X11_INCLUDE_DIR=-I/usr/include
TK_INCLUDE_DIR=-I/usr/include/tcl
TK_LIBS=-L/usr/lib -ltk
TCL_LIBS=-L/usr/lib -ltcl
X11_LIBS=-L/usr/X11/lib -lX11
EMACS_SITE_LISP=/usr/lib/emacs/site-lisp
INFO_DIR=/usr/info

# Machine dependent makefile definitions for intel 386,486 running linux
# If using gnu libc, use version >= 4.21

LBINDIR=/usr/local/bin

OFLAG	=  -O 
LIBS	= -lm 
ODIR_DEBUG= -O4 

# This CC string will be used for compilation of the system,
# and also in the compiler::*cc* variable for later compilation of
# lisp files.
# (the -pipe is just since our file system is slow..)
CC = gcc -pipe -fwritable-strings  -DVOL=volatile -I$(GCLDIR)/o 
LDCC=${CC} -static 

# Enable the fastloading mechanism which does not use ld -A
# requires c/rel_.. machine dependent code.

RSYM	= rsym
SFASL	= $(ODIR)/sfasl.o

#  Use the mp.s file on 68k machine 

# new gcc doesn't make a good .s file using optimisations.
# so either use $(MPDIR)/mpi.o   $(MPDIR)/libmport.a
#MPFILES= $(MPDIR)/mpi-386.o   $(MPDIR)/libmport.a

MPFILES= $(MPDIR)/mpi-386d.o   $(MPDIR)/libmport.a


# When using SFASL it is good to have (si::build-symbol-table)
INITFORM=(si::build-symbol-table)

# Use symbolic links
SYMB=-s

LIBFILES=bsearch.o

# the  make to use for saved_kcp the profiler.
KCP=kcp-bsd

# dont add the .data 
CAT=true
# end makedefs


all: gcl-tk.info gcl-si.info

.texi.info:
	rm -f $*.*gz
	makeinfo $*.texi
	- gzip $*.info-*

GCL_SI= number.texi sequence.texi character.texi list.texi io.texi \
	form.texi compile.texi symbol.texi system.texi structure.texi \
	iteration.texi user-interface.texi doc.texi type.texi internal.texi \
	c-interface.texi si-defs.texi debug.texi misc.texi compiler-defs.texi \
	gcl-si-index.texi
GCL_TK= general.texi widgets.texi control.texi

gcl-si.dvi gcl-si.info: ${GCL_SI} gcl-si.texi
gcl-tk.dvi gcl-tk.info: ${GCL_TK} gcl-tk.texi


install:
	if [  -d ${INFO_DIR} ] ; then true ; else exit 0; fi
	-if fgrep gcl-si ${INFO_DIR}/dir > /dev/null ; then true ; else \
	echo "* GCL Doc: (gcl-si.info).	GNU Common Lisp specific Documentation." >> ${INFO_DIR}/dir ; fi
	-if fgrep gcl-tk ${INFO_DIR}/dir > /dev/null ; then true ; else \
	echo "* GCL TK Doc: (gcl-tk.info).	TK window GCL interface." >> ${INFO_DIR}/dir ; fi
	cp *.info* ${INFO_DIR}

FILE=gcl-si.texi
srcs:
	fgrep '.texi' ${FILE} | sed -e "/@c/d" | \
	awk '{ i++; printf("%s ",$$2); if ((i%5) == 0) printf("\\\n")}'

tex:
	tex gcl-si.texi
	tex gcl-tk.texi
	@echo must do twice to get indices correct...
	@echo so do 'make tex' again

clean:
