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


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

LBINDIR=/usr/local/bin
OFLAG	=  -O
LIBS	= -lm 

X11_LIBS=-L/usr/openwin/lib -lX11
X11_INCLUDE_DIR=-I/usr/openwin/include


# the commercial (for money) C compiler has never been able
# to compile akcl/gcl correctly.  Perhaps it does not like the idea
# that this is free software.   However the standard C compiler is ok.

#CC = cc  -DVOL=  -I$(GCLDIR)/o -Bstatic -temp=. -pipe
#CC = cc  -DVOL=  -I$(GCLDIR)/o -Bstatic  -pipe
ODIR_DEBUG=-O4 

#gcc 2.1 and 2.2 compile gcl correctly as far as I have been able to determine.
#gcc 2.3.3 does not compile gcl correctly
# gcc 2.5.7 is correct as far as I can tell
# and gcl compiled with gcc runs our tests 15% faster than with cc..
CC = gcc -I${GCLDIR}/o -static -DVOL=volatile -pipe -fsigned-char

AS=as -P

CFLAGS	= -c $(DEFS)  -I../h

MAIN    = ../o/main.o

MPFILES=$(MPDIR)/mpi-sparc.o $(MPDIR)/sparcdivul3.o $(MPDIR)/libmport.a
#MPFILES=${MPDIR}/mpi.o ${MPDIR}/libmport.a

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

# This function will be run before dumping.
# When using SFASL it is good to have (si::build-symbol-table)
INITFORM=(si::build-symbol-table)



# Use symbolic links
SYMB=-s
# the  make to use for saved_kcp the profiler.
GCP=gcp-sun

NULLFILE = ../h/secondary_sun_magic

# 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
	-if fgrep gcl.info ${INFO_DIR}/dir > /dev/null ; then true ; else \
	echo "* GCL Ansi Doc: (gcl.info).  Ansi Common Lisp Specification." >> ${INFO_DIR}/dir ; fi
	if [  -d ${INFO_DIR} ] ; then 	cp *.info* ${INFO_DIR} ; fi



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:
