Changes file for /usr/local/src/kcl/./unixport/makefile
Created on Sun Jul 21 20:25:04 1991
Usage \n@s[Original text\n@s|Replacement Text\n@s]
See the file rascal.ics.utexas.edu:/usr2/ftp/merge.c
for a program to merge change files.  Anything not between
"\n@s[" and  "\n@s]" is a simply a comment.
This file was constructed using emacs and  merge.el
Enhancements Copyright (c) W. Schelter All rights reserved.
   by (Bill Schelter)  wfs@carl.ma.utexas.edu 


****Change:(orig (1 3 d))
@s[MACHINE = SUN3
#	Select 'VAX', 'SUN', 'SUN2R3', 'SUN3', 'ISI', 'SEQ', 'IBMRT',
#	or 'NEWS'.

@s|
@s]


****Change:(orig (5 5 d))
@s[


@s|

@s]


****Change:(orig (10 10 a))
@s[CMPDIR	= ../cmpnew
PORTDIR	= ../unixport

@s|CMPDIR	= ../cmpnew
PORTDIR	= ../unixport
MPDIR	= ../mp

@s]


****Change:(orig (12 13 d))
@s[
DEFS	= -D$(MACHINE) -DMAXPAGE=16384 -DVSSIZE=8152

@s|
@s]


****Change:(orig (14 14 a))
@s[CFLAGS	= -c $(DEFS) -I$(HDIR)

@s|CFLAGS	= -c $(DEFS) -I$(HDIR)
LDCC    = $(CC)

@s]


****Change:(orig (16 16 c))
@s[
LIBS	= -lm

@s|
LIBS	= -lm # -lpixrect -lc
OLDDATE = "DATE"
AKCLIB	= $(ODIR)/akcllib.a
MPFILES= $(MPDIR)/mpi.o $(MPDIR)/mp2.o  $(MPDIR)/libmport.a
# begin makedefs
AKCLDIR=/usr/local/src/akcl-1-605
SHELL=/bin/sh
MACHINE=NeXT
#
# For NeXT Operating system 2.
#

LBINDIR=/usr/local/bin

OFLAG=	-O
LIBS=	-lsys_s -lm -lg
ODIR_DEBUG=  -g

CC=	cc -DVOL=volatile -I$(AKCLDIR)/o -fwritable-strings

# The option -seglinkedit is specified so that rld_load() can be used.
LDCC=	ld -segprot __TEXT rwx rwx

# bcmp(), bcopy(), and bzero() are already included in the NeXT library.
LIBFILES=

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

MAIN    = ../o/main.o

INITFORM=(setq compiler::*cc* "cc -DVOL=volatile -fwritable-strings")(load "../lsp/setdoc.lsp")

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

# Use symbolic links
SYMB=-s

# the  make to use for saved_kcp the profiler.
KCP=kcp-next
MAINDIR = /usr/local/src/kcl
# end makedefs

LIBS1= $(LIBS) $(AKCLIB)

















@s]


****Change:(orig (31 31 c))
@s[	$(ODIR)/character.o $(ODIR)/char_table.o $(ODIR)/sequence.o \

@s|	$(ODIR)/character.o  $(ODIR)/sequence.o \

@s]


****Change:(orig (38 38 c))
@s[	$(ODIR)/unixtime.o $(ODIR)/unixsys.o $(ODIR)/unixsave.o \
	$(ODIR)/unixint.o

@s|	$(ODIR)/unixtime.o $(ODIR)/unixsys.o $(ODIR)/unixsave.o \
	$(ODIR)/unixint.o $(ODIR)/funlink.o  \
	$(ODIR)/fat_string.o ${ODIR}/run_process.o \
	$(ODIR)/init_pari.o $(MPFILES) $(SFASL) $(EXTRAS)

@s]


****Change:(orig (45 45 c))
@s[	$(LSPDIR)/seq.o $(LSPDIR)/seqlib.o $(LSPDIR)/trace.o

@s|	$(LSPDIR)/seq.o $(LSPDIR)/seqlib.o $(LSPDIR)/trace.o \
	$(LSPDIR)/sloop.o  $(LSPDIR)/debug.o 

@s]


****Change:(orig (55 55 a))
@s[	$(CMPDIR)/cmpvar.o $(CMPDIR)/cmpvs.o $(CMPDIR)/cmpwt.o


@s|	$(CMPDIR)/cmpvar.o $(CMPDIR)/cmpvs.o $(CMPDIR)/cmpwt.o

KCL=kcl

@s]


****Change:(orig (57 58 c))
@s[
saved_kcl:	raw_kcl init_kcl.lsp \

@s|saved_$(KCL):	raw_$(KCL) $(RSYM) init_kcl.lsp \

@s]


****Change:(orig (63 63 c))
@s[	raw_kcl $(PORTDIR)/ < init_kcl.lsp

@s|# if you are wfs on rascal increment the minor version number.
	../xbin/if-exists /usr/u9/wfs/schelter "../xbin/inc-version"
	../xbin/if-exists saved_$(KCL) "rm -f saved_$(KCL)"
	cat init_kcl.lsp | \
	sed -e "s$(OLDDATE)Version(`cat ../majvers`.`cat ../minvers`) `date -u`g" \
	-e 'ssaved_kclsaved_$(KCL)g' \
	-e 'slinks t)links t)(setq compiler::*cc* "$(CC)")$(INITFORM)g' \
	-e "sAKCLDIR${AKCLDIR}g" \
	-e "s(defun lisp-imp(setq si::*akcl-version* '`cat ../minvers`)(defun lisp-imp'g" | \
	./raw_$(KCL) $(PORTDIR)/ 

@s]


****Change:(orig (65 66 c))
@s[raw_kcl:	$(OBJS) sys_kcl.o $(LSPOBJS) $(CMPOBJS)
	cc -o raw_kcl $(OBJS) sys_kcl.o $(LSPOBJS) $(CMPOBJS) $(LIBS)

@s|rsym:	rsym.c $(HDIR)/mdefs.h
	$(LDCC) $(DEFS) -I../h -o rsym rsym.c 

@s]


****Change:(orig (68 69 c))
@s[sys_kcl.o:	sys_kcl.c
	cc $(CFLAGS) sys_kcl.c

@s|$(HDIR)/mdefs.h: $(HDIR)/include.h
	cat $(HDIR)/include.h | sed -e "/include/d" > $(HDIR)/mdefs.h

@s]


****Change:(orig (70 70 a))
@s[

@s|
saved_kcn:	
	make -f make_kcn "MPFILES=$(MPFILES)"

@s]


****Change:(orig (71 71 a))
@s[

@s|
FOR_RAW=$(OBJS) $(LSPOBJS) $(CMPOBJS)
SYS_KCL=sys_kcl.o

# on boot strapping the akcl compiler because of structure changes,
# some files need to be loaded as lisp files.
raw_$(KCL): $(FOR_RAW)
	rm -f raw_$(KCL) 
	- if  fgrep ASSIGN-DOWN ../cmpnew/cmpvar.c > /dev/null ; \
		then make raw_$(KCL)1 "KCL=${KCL}" "ODIR=${ODIR}" "EXTRAS=${EXTRAS}" "LIBS=${LIBS}" "LDCC=${LDCC}" "MPFILES=$(MPFILES)" ; \
		else make raw_$(KCL)1 "SYS_KCL=sys_boot.o" ; fi 

raw_$(KCL)1: $(SYS_KCL)
	$(LDCC)  -o raw_$(KCL) /lib/crt0.o $(FOR_RAW) $(SYS_KCL) $(LIBS1)

saved_kcl_boot:
	make raw_$(KCL)1 "SYS_KCL=sys_boot.o"
	make saved_kcl

HFILES	= $(HDIR)/include.h \
	$(HDIR)/object.h $(HDIR)/vs.h $(HDIR)/symbol.h $(HDIR)/bds.h \
	$(HDIR)/frame.h $(HDIR)/lex.h $(HDIR)/eval.h $(HDIR)/external.h \
	$(HDIR)/rgbc.h

sys_kcl.o:	sys_kcl.c $(HFILES)
	$(CC) $(CFLAGS) sys_kcl.c


# create a sed script.
boots : lspboots cmpboots
	rm -f boots ; \
	echo "# edit lspboots or cmpboots " >> boots ;\
	for v in `cat lspboots cmpboots` ; \
	do echo "s:$$v.o:$$v.lsp:g" >> boots ;\
	echo "s:init_or_load(init_$$v,:load1(:g" >> boots ; \
	done 

sys_boot.o: sys_kcl.c $(HFILES) boots
	rm -f sys_boot.c ; cat sys_kcl.c | sed -f boots > sys_boot.c
	$(CC) $(CFLAGS) sys_boot.c
	
kcp-sun:	gcrt0-mod.o
	(cd ../go ; make  "CFLAGS = -I../h -pg -g -c")
	make -e "KCL=kcp" "ODIR=../go"  "EXTRAS= gcrt0-mod.o" "LDCC=${LDCC}" "CC = ${CC} -pg"

kcp-bsd: ncrt0.o
	(cd ../go ; make  "CFLAGS = -I../h -pg -g -c")
	make "KCL=kcp" "ODIR=../go" "EXTRAS = gcrt0-mod.o ${EXTRAS} " "CC = ${CC} -pg" "LDCC = gcc -nostdlib  ncrt0.o "

aix_crt0.o:
	emacs -batch -l aix-crt0.el

kcp-aix: aix_crt0.o
	(cd ../go ; make  "CFLAGS = -I../h -pg -g -c")
	make "KCL=kcp" "ODIR=../go" "EXTRAS = /lib/gcrt0.o ${EXTRAS} " "CC = ${CC} -pg" "LDCC = ld  -H4096 -D0 -T512 -bhalt:4  -bnso -bI:/lib/syscalls.exp -L/lib/profiled aix_crt0.o     "	

kcp: ${KCP}
	
ncrt0.o: /lib/crt0.o
	emacs -batch -l ncrt0.el

gcrt0-mod.o:
	../xbin/if-exists /lib/gcrt0.o  "cp /lib/gcrt0.o ."
	../xbin/if-exists /usr/lib/gcrt0.o  "cp /usr/lib/gcrt0.o ."
	emacs -batch -l gcrt0.el


hpbsd-crt0-mod.o:
	cp /lib/crt0.o .
	emacs -batch -l hpbsd-crt0.el



@s]


****Change:(orig (73 73 c))
@s[	rm -f saved_kcl raw_kcl *.o core a.out

@s|	rm -f saved_$(KCL) raw_$(KCL) *.o core a.out

@s]

