2001-01-11 08:43:22 -05:00
|
|
|
# Scsh Makefile
|
1999-09-14 08:45:02 -04:00
|
|
|
# Documentation in files INSTALL and doc/install.txt
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
### Filled in by `configure' ###
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
CC = @CC@
|
|
|
|
DEFS = @DEFS@
|
|
|
|
LIBS = @LIBS@
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
|
1999-09-20 12:46:48 -04:00
|
|
|
LDFLAGS = -g @LDFLAGS@
|
1999-09-14 08:45:02 -04:00
|
|
|
LIBOBJS = @LIBOBJS@
|
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
RM = rm -f
|
|
|
|
|
1999-11-12 10:33:17 -05:00
|
|
|
AR = @AR@
|
|
|
|
RANLIB = @RANLIB@
|
1999-09-14 21:06:21 -04:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
2001-12-17 04:41:52 -05:00
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
incdir = @includedir@
|
|
|
|
manext = 1
|
|
|
|
mandir = @mandir@/man$(manext)
|
1999-09-14 08:45:02 -04:00
|
|
|
### End of `configure' section###
|
|
|
|
|
2002-02-15 08:33:46 -05:00
|
|
|
htmldir = $(libdir)/scsh/doc/scsh-manual/html
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
# HP 9000 series, if you don't have gcc
|
|
|
|
# CC = cc
|
|
|
|
# CFLAGS = -Aa -O +Obb1800
|
|
|
|
# DEFS = -D_HPUX_SOURCE -Dhpux
|
|
|
|
|
|
|
|
# Ultrix
|
|
|
|
# LDFLAGS = -N
|
|
|
|
|
|
|
|
.c.o:
|
1999-11-04 15:57:58 -05:00
|
|
|
$(CC) -g -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c -I$(srcdir)/cig $(CFLAGS) -o $@ $<
|
1999-09-14 08:45:02 -04:00
|
|
|
|
2001-05-30 08:13:07 -04:00
|
|
|
# BUILD_RUNNABLE has to be Scheme 48 0.53. This is used for builds directly
|
|
|
|
# out of the CVS repository.
|
|
|
|
# We cannot use Scsh here since -i is not understood.
|
2001-06-03 14:29:45 -04:00
|
|
|
BUILD_RUNNABLE = /afs/wsi/i386_fbsd32/bin/scheme48
|
2001-05-30 08:13:07 -04:00
|
|
|
RUNNABLE = scsh
|
1999-09-14 08:45:02 -04:00
|
|
|
MANPAGE = $(RUNNABLE).$(manext)
|
|
|
|
LIB = $(libdir)/$(RUNNABLE)
|
|
|
|
|
|
|
|
distdir = /tmp
|
|
|
|
|
|
|
|
# If make barfs on this include line, just comment it out. It's only
|
|
|
|
# really needed if you want to build the linker or rebuild initial.image.
|
|
|
|
include $(srcdir)/build/filenames.make
|
|
|
|
#
|
|
|
|
#NetBSD make wants to see this instead:
|
|
|
|
#.include "$(srcdir)/build/filenames.make"
|
|
|
|
|
|
|
|
|
|
|
|
# Static linker:
|
|
|
|
#
|
|
|
|
# You only need the linker if you're going to make changes to the
|
|
|
|
# things that go into the initial.image, which in general means the
|
|
|
|
# files in rts/. If you decide you need to use the linker, then you
|
|
|
|
# gots your choice; it can run in just about any version of Scheme 48
|
|
|
|
# or Pseudoscheme. (It has also been made to run in Scheme->C.) It
|
|
|
|
# doesn't matter a whole lot which Scheme you use as long as it's not
|
|
|
|
# broken or unavailable. The two best choices are:
|
|
|
|
# 1. As below: build the linker on the scheme48vm and scheme48.image
|
|
|
|
# that are in the current directory.
|
|
|
|
# 2. LINKER_VM = $(RUNNABLE) $(BIG_HEAP)
|
|
|
|
# LINKER_RUNNABLE = $(RUNNABLE)
|
|
|
|
# These settings requires you to already have a $(RUNNABLE)
|
|
|
|
# command. This is desirable if you are making changes to the
|
2001-01-11 08:43:22 -05:00
|
|
|
# system that might break scshvm and/or scsh/scsh.image. But it
|
1999-09-14 08:45:02 -04:00
|
|
|
# requires you to have squirreled away a previous working version
|
2001-01-11 08:43:22 -05:00
|
|
|
# of scsh.
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
BIG_HEAP = -h 5000000
|
2001-01-11 08:43:22 -05:00
|
|
|
# 1. is broken if you build from CVS
|
1999-09-14 21:06:21 -04:00
|
|
|
# LINKER_VM = ./$(VM) $(BIG_HEAP)
|
|
|
|
# LINKER_RUNNABLE = $(LINKER_VM) -i $(IMAGE)
|
|
|
|
|
2001-12-05 13:32:41 -05:00
|
|
|
# therefore according to 2. but we cannot use scsh since -i is not understood
|
2001-05-30 08:13:07 -04:00
|
|
|
LINKER_VM = $(BUILD_RUNNABLE) $(BIG_HEAP)
|
|
|
|
LINKER_RUNNABLE = $(BUILD_RUNNABLE)
|
1999-09-14 21:06:21 -04:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
LINKER_IMAGE = build/linker.image
|
|
|
|
LINKER = $(LINKER_VM) -i $(LINKER_IMAGE)
|
|
|
|
START_LINKER = echo ',batch' && echo ',bench on'
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# You shouldn't have to change anything below this point, except for possibly
|
|
|
|
# the external code rules.
|
|
|
|
|
|
|
|
# Targets:
|
|
|
|
|
2001-01-11 08:43:22 -05:00
|
|
|
IMAGE = scheme48.image
|
2001-12-05 13:32:41 -05:00
|
|
|
INITIAL = build/initial.image
|
1999-11-12 10:33:17 -05:00
|
|
|
VM = scshvm
|
1999-09-14 21:06:21 -04:00
|
|
|
LIBCIG = cig/lib$(VM).a
|
|
|
|
CIG = cig/cig
|
|
|
|
CIGOBJS = cig/libcig.o cig/libcig1.o
|
|
|
|
|
2000-10-19 04:24:39 -04:00
|
|
|
#scsh-lib
|
2001-01-01 13:02:51 -05:00
|
|
|
LIBSCSHVM = scsh/lib$(VM).a
|
|
|
|
LIBSCSH = scsh/libscsh.a
|
1999-09-20 12:46:48 -04:00
|
|
|
SCSHVMHACKS = scsh/proc2.o
|
1999-09-14 21:06:21 -04:00
|
|
|
|
1999-09-24 19:54:22 -04:00
|
|
|
#
|
|
|
|
#
|
1999-09-14 21:06:21 -04:00
|
|
|
SCSHOBJS = \
|
2000-10-19 04:24:39 -04:00
|
|
|
scsh/cstuff.o \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/dirstuff1.o \
|
1999-09-24 19:54:22 -04:00
|
|
|
scsh/fdports1.o \
|
2001-08-08 08:52:37 -04:00
|
|
|
scsh/flock1.o \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/machine/time_dep1.o \
|
2000-12-14 13:32:53 -05:00
|
|
|
scsh/signals1.o \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/machine/libansi.o \
|
2001-08-08 07:54:04 -04:00
|
|
|
scsh/network1.o \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/putenv.o \
|
2001-08-09 09:53:18 -04:00
|
|
|
scsh/rx/regexp1.o \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/sleep1.o \
|
2001-09-07 12:05:31 -04:00
|
|
|
scsh/syscalls1.o \
|
2001-06-01 12:22:26 -04:00
|
|
|
scsh/syslog1.o \
|
2001-09-07 12:05:31 -04:00
|
|
|
scsh/time1.o \
|
|
|
|
scsh/tty1.o \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/userinfo1.o \
|
2001-08-09 09:53:18 -04:00
|
|
|
scsh/sighandlers1.o
|
1999-09-14 21:06:21 -04:00
|
|
|
|
2001-08-09 09:53:18 -04:00
|
|
|
SCSH_INITIALIZERS = s48_init_syslog s48_init_posix_regexp \
|
|
|
|
s48_init_userinfo s48_init_sighandlers \
|
2001-09-07 12:05:31 -04:00
|
|
|
s48_init_syscalls s48_init_network s48_init_flock \
|
2001-12-05 13:32:41 -05:00
|
|
|
s48_init_dirstuff s48_init_time s48_init_tty \
|
|
|
|
s48_init_cig
|
2001-06-01 12:22:26 -04:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
UNIX_OBJS = c/unix/misc.o c/unix/io.o c/unix/fd-io.o c/unix/event.o
|
1999-09-14 21:06:21 -04:00
|
|
|
|
2000-10-19 04:24:39 -04:00
|
|
|
|
1999-09-20 12:46:48 -04:00
|
|
|
S48OBJS = c/scheme48vm.o c/scheme48heap.o c/extension.o c/external.o
|
2001-01-01 13:02:51 -05:00
|
|
|
OBJS = scsh/process_args.o c/init.o $(S48OBJS) $(CIGOBJS) $(SCSHOBJS) \
|
|
|
|
$(SCSHVMHACKS)
|
1999-09-14 21:06:21 -04:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
FAKEHS = c/fake/dlfcn.h c/fake/sigact.h c/fake/strerror.h \
|
|
|
|
c/fake/sys-select.h
|
|
|
|
|
|
|
|
# Sources:
|
|
|
|
|
|
|
|
CONFIG_FILES = scheme/interfaces.scm scheme/low-packages.scm \
|
|
|
|
scheme/rts-packages.scm scheme/comp-packages.scm
|
|
|
|
|
|
|
|
# Rules:
|
|
|
|
|
|
|
|
# The following is the first rule and therefore the "make" command's
|
|
|
|
# default target.
|
2001-01-01 13:02:51 -05:00
|
|
|
enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) $(LIBSCSHVM)
|
1999-09-14 08:45:02 -04:00
|
|
|
|
2001-01-11 08:43:22 -05:00
|
|
|
# --------------------
|
|
|
|
# External code to include in the VM
|
|
|
|
# After changing any of these you should delete `scheme48vm' and remake it.
|
|
|
|
|
1999-09-23 10:15:26 -04:00
|
|
|
EXTERNAL_OBJECTS = $(SOCKET_OBJECTS) $(LOOKUP_OBJECTS)
|
1999-09-14 08:45:02 -04:00
|
|
|
EXTERNAL_FLAGS = $(SOCKET_FLAGS)
|
2001-01-01 13:02:51 -05:00
|
|
|
EXTERNAL_INITIALIZERS = $(ADDITIONAL_INITIALIZER) $(SOCKET_INITIALIZERS) \
|
|
|
|
$(LOOKUP_INITIALIZERS) \
|
2001-06-01 12:22:26 -04:00
|
|
|
$(SCSH_INITIALIZERS) \
|
2001-09-12 10:02:09 -04:00
|
|
|
s48_init_cig
|
1999-09-20 12:46:48 -04:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
# Rules for any external code.
|
|
|
|
|
|
|
|
# Socket rules
|
|
|
|
|
|
|
|
c/unix/socket.o: c/scheme48.h c/fd-io.h c/event.h
|
|
|
|
|
|
|
|
SOCKET_OBJECTS = c/unix/socket.o
|
|
|
|
SOCKET_LD_FLAGS =
|
|
|
|
SOCKET_INITIALIZERS = s48_init_socket
|
|
|
|
|
|
|
|
# End of socket rules
|
|
|
|
|
|
|
|
# Lookup rules (this is just for compatibility with old code)
|
|
|
|
|
|
|
|
c/unix/dynamo.o: c/scheme48.h
|
|
|
|
|
|
|
|
LOOKUP_OBJECTS = c/unix/dynamo.o
|
|
|
|
LOOKUP_INITIALIZERS = s48_init_external_lookup
|
|
|
|
|
|
|
|
# End of lookup rules
|
2001-01-01 13:02:51 -05:00
|
|
|
|
|
|
|
# Initializer for s48_add_external_init
|
|
|
|
|
|
|
|
ADDITIONAL_INITIALIZER = s48_init_additional_inits
|
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
# End of external rules
|
|
|
|
# --------------------
|
|
|
|
|
|
|
|
# The developers are curious to know. Don't be concerned if this fails.
|
|
|
|
.notify: build/minor-version-number
|
|
|
|
touch .notify
|
2001-01-11 08:43:22 -05:00
|
|
|
-echo SCSH 0.`cat $(srcdir)/scsh/minor-version-number` \
|
|
|
|
Scheme48 0.`cat $(srcdir)/minor-version-number` infestation. \
|
|
|
|
| mail scheme-48-notifications@zurich.ai.mit.edu
|
|
|
|
-echo Another scsh 0.`cat $(srcdir)/scsh/minor-version-number` \
|
|
|
|
infestation. | mail scsh-notifications@zurich.ai.mit.edu
|
1999-09-14 08:45:02 -04:00
|
|
|
|
2000-10-19 04:24:39 -04:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
# This says how to process .scm files with cig to make .c stubs.
|
2001-12-05 13:32:41 -05:00
|
|
|
#.SUFFIXES: .scm
|
|
|
|
#.scm.c:
|
|
|
|
# $(srcdir)/$(VM) -o $(srcdir)/$(VM) -i $(CIG) < $< > $*.c
|
1999-09-14 21:06:21 -04:00
|
|
|
|
|
|
|
# These .h files mediate between the code exported from foo1.c
|
|
|
|
# and imported into foo.scm's stub foo.c.
|
|
|
|
|
|
|
|
scsh/dirstuff1.o: scsh/dirstuff1.h
|
|
|
|
scsh/userinfo1.o: scsh/userinfo1.h
|
2001-08-08 07:54:04 -04:00
|
|
|
scsh/network1o: scsh/network1.h
|
2001-08-08 08:52:37 -04:00
|
|
|
scsh/flock1.o: scsh/flock1.h
|
1999-09-20 12:46:48 -04:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/fdports1.o scsh/fdports.o: scsh/fdports1.h
|
2001-09-12 10:02:09 -04:00
|
|
|
#scsh/select1.o scsh/select.o: scsh/select1.h
|
1999-09-14 21:06:21 -04:00
|
|
|
|
2001-08-09 09:53:18 -04:00
|
|
|
scsh/rx/regexp1.o: c/scheme48.h
|
1999-09-20 12:46:48 -04:00
|
|
|
|
2001-01-01 13:02:51 -05:00
|
|
|
scsh/sighandlers1.o: scsh/sighandlers1.h
|
|
|
|
|
2001-06-01 12:22:26 -04:00
|
|
|
scsh/syslog1.o: c/scheme48.h
|
1999-09-20 12:46:48 -04:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
include $(srcdir)/scsh/machine/Makefile.inc
|
|
|
|
# Berkeley make wants to see this instead: (or use GNU make on BSD. -bri)
|
|
|
|
#.include "$(srcdir)/scsh/machine/Makefile.inc"
|
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
$(VM): c/main.o $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS)
|
|
|
|
rm -f /tmp/s48_external_$$$$.c && \
|
|
|
|
build/build-external-modules /tmp/s48_external_$$$$.c \
|
|
|
|
$(EXTERNAL_INITIALIZERS) && \
|
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ c/main.o $(OBJS) $(UNIX_OBJS) \
|
|
|
|
/tmp/s48_external_$$$$.c \
|
2002-01-09 11:31:45 -05:00
|
|
|
$(EXTERNAL_OBJECTS) $(EXTERNAL_LD_FLAGS) \
|
|
|
|
$(LIBOBJS) $(LIBS) && \
|
1999-09-14 08:45:02 -04:00
|
|
|
rm -f /tmp/s48_external_$$$$.c
|
|
|
|
|
1999-09-20 12:46:48 -04:00
|
|
|
|
1999-09-23 10:36:25 -04:00
|
|
|
|
1999-09-20 12:46:48 -04:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
#JMG: again cig and scsh-lib
|
|
|
|
$(LIBCIG): c/main.o $(OBJS)
|
|
|
|
# $(CC) -r -o $@ main.o $(OBJS)
|
|
|
|
$(RM) $@
|
1999-09-20 12:46:48 -04:00
|
|
|
$(AR) $@ c/main.o $(OBJS)
|
1999-09-14 21:06:21 -04:00
|
|
|
$(RANLIB) $@
|
|
|
|
|
2001-01-01 13:02:51 -05:00
|
|
|
$(LIBSCSHVM): c/smain.o $(OBJS)
|
1999-09-14 21:06:21 -04:00
|
|
|
$(RM) $@
|
2001-12-05 13:32:41 -05:00
|
|
|
$(AR) $@ c/smain.o $(OBJS)
|
1999-09-14 21:06:21 -04:00
|
|
|
$(RANLIB) $@
|
|
|
|
|
2001-12-05 13:32:41 -05:00
|
|
|
$(LIBSCSH): $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS)
|
2001-01-01 13:02:51 -05:00
|
|
|
$(RM) $@ \
|
|
|
|
rm -f /tmp/s48_external_$$$$.c && \
|
|
|
|
build/build-external-modules /tmp/s48_external_$$$$.c \
|
|
|
|
$(EXTERNAL_INITIALIZERS) && \
|
|
|
|
$(CC) -c $(CFLAGS) -o /tmp/s48_external_$$$$.o \
|
|
|
|
/tmp/s48_external_$$$$.c && \
|
|
|
|
$(AR) $@ $(OBJS) $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) \
|
|
|
|
/tmp/s48_external_$$$$.o && \
|
|
|
|
$(RANLIB) $@ && \
|
2001-01-11 08:43:22 -05:00
|
|
|
rm -f /tmp/s48_external_$$$$.c /tmp/s48_external_$$$$.o
|
2001-01-01 13:02:51 -05:00
|
|
|
|
|
|
|
c/main.o: c/main.c
|
1999-09-14 08:45:02 -04:00
|
|
|
$(CC) -c $(CFLAGS) -o $@ \
|
|
|
|
-DDEFAULT_IMAGE_NAME=\"$(LIB)/$(IMAGE)\" \
|
|
|
|
$(CPPFLAGS) $(DEFS) c/main.c
|
|
|
|
|
2001-01-01 13:02:51 -05:00
|
|
|
c/init.o: c/init.c c/scheme48vm.h c/scheme48heap.h
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ \
|
|
|
|
-DDEFAULT_IMAGE_NAME=\"$(LIB)/$(IMAGE)\" \
|
|
|
|
$(CPPFLAGS) $(DEFS) c/init.c
|
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
c/scheme48vm.o: c/prescheme.h c/scheme48vm.h c/scheme48heap.h c/event.h \
|
|
|
|
c/io.h c/fd-io.h c/scheme48vm-prelude.h
|
|
|
|
c/scheme48heap.o: c/prescheme.h c/scheme48vm.h c/scheme48heap.h c/event.h \
|
|
|
|
c/io.h c/fd-io.h
|
|
|
|
c/extension.o: c/sysdep.h $(FAKEHS) c/scheme48.h c/scheme48vm.h
|
|
|
|
c/external.o: c/sysdep.h $(FAKEHS) c/scheme48.h
|
|
|
|
c/unix/event.o: c/sysdep.h $(FAKEHS) c/scheme48vm.h c/scheme48heap.h \
|
|
|
|
c/event.h c/fd-io.h
|
|
|
|
c/unix/fd-io.o: c/sysdep.h $(FAKEHS) c/scheme48vm.h c/scheme48heap.h \
|
|
|
|
c/event.h c/fd-io.h
|
|
|
|
c/unix/misc.o: c/sysdep.h $(FAKEHS)
|
|
|
|
c/unix/io.o: c/io.h
|
|
|
|
c/fake/libdl1.o: c/fake/dlfcn.h
|
|
|
|
c/fake/libdl2.o: c/fake/dlfcn.h
|
|
|
|
c/fake/strerror.o: c/fake/strerror.h
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Make scheme48.image from initial.image and library .scm files.
|
|
|
|
#
|
|
|
|
# For bootstrap reasons, initial.image is *not* listed as a source,
|
|
|
|
# even though it really is.
|
|
|
|
|
|
|
|
$(IMAGE): $(VM) scheme/env/init-defpackage.scm scheme/more-interfaces.scm \
|
|
|
|
scheme/link-packages.scm scheme/more-packages.scm \
|
|
|
|
$(usual-files) build/initial.debug build/build-usual-image
|
1999-09-23 19:02:54 -04:00
|
|
|
build/build-usual-image . "`pwd`/scheme" '$(IMAGE)' './$(VM)' \
|
|
|
|
'$(INITIAL)'
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
### Fake targets: all clean install man dist
|
2001-01-11 08:43:22 -05:00
|
|
|
|
|
|
|
install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc \
|
2001-09-12 13:44:57 -04:00
|
|
|
inst-doc install-scsh
|
1999-09-14 08:45:02 -04:00
|
|
|
|
1999-11-12 10:33:17 -05:00
|
|
|
inst-vm: $(VM)
|
1999-09-14 08:45:02 -04:00
|
|
|
$(INSTALL_PROGRAM) $(VM) $(LIB)
|
|
|
|
|
2001-01-11 08:43:22 -05:00
|
|
|
inst-man:
|
1999-09-14 08:45:02 -04:00
|
|
|
if [ -d $(mandir) -a -w $(mandir) ]; then \
|
2001-01-11 08:43:22 -05:00
|
|
|
sed 's=LBIN=$(bindir)=g' doc/scsh.man | \
|
1999-09-14 08:45:02 -04:00
|
|
|
sed 's=LLIB=$(LIB)=g' | \
|
2001-01-11 08:43:22 -05:00
|
|
|
sed 's=LSCSH=$(RUNNABLE)=g' >$(MANPAGE) && \
|
1999-09-14 08:45:02 -04:00
|
|
|
$(INSTALL_DATA) $(MANPAGE) $(mandir) && \
|
2002-01-08 12:10:35 -05:00
|
|
|
$(RM) $(MANPAGE); \
|
1999-09-14 08:45:02 -04:00
|
|
|
else \
|
|
|
|
echo "$(mandir) not writable dir, not installing man page" \
|
|
|
|
>&2; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
inst-inc:
|
2001-12-05 13:32:41 -05:00
|
|
|
$(INSTALL_DATA) $(srcdir)/c/scheme48.h $(incdir)
|
|
|
|
$(INSTALL_DATA) $(srcdir)/c/write-barrier.h $(incdir)
|
1999-09-14 08:45:02 -04:00
|
|
|
|
1999-10-08 14:41:05 -04:00
|
|
|
install-cig: cig
|
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/$(CIG) $(LIB)/cig
|
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/$(CIG).image $(LIB)/cig
|
|
|
|
$(INSTALL_DATA) $(srcdir)/$(LIBCIG) $(LIB)/cig
|
|
|
|
$(INSTALL_DATA) $(srcdir)/cig/libcig.h $(LIB)/cig
|
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
inst-misc:
|
|
|
|
for stub in env big opt misc link; do \
|
|
|
|
for f in scheme/$$stub/*.scm; do \
|
|
|
|
$(INSTALL_DATA) $$f $(LIB)/$$stub || exit 1; \
|
|
|
|
done; \
|
|
|
|
done && \
|
|
|
|
for f in scheme/rts/*num.scm scheme/rts/jar-defrecord.scm; do \
|
|
|
|
$(INSTALL_DATA) $$f $(LIB)/rts || exit 1; \
|
2001-01-11 08:43:22 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
inst-doc:
|
2002-01-08 10:38:36 -05:00
|
|
|
for f in $(srcdir)/doc/*.txt $(srcdir)/doc/*.ps; do \
|
2001-01-11 08:43:22 -05:00
|
|
|
$(INSTALL_DATA) $$f $(LIB)/doc/; \
|
|
|
|
done && \
|
2002-01-08 10:38:36 -05:00
|
|
|
for f in $(srcdir)/doc/src/*.tex \
|
|
|
|
$(srcdir)/doc/src/*.dvi \
|
|
|
|
$(srcdir)/doc/src/*.ps; \
|
|
|
|
do $(INSTALL_DATA) $$f $(LIB)/doc/s48-manual/; \
|
|
|
|
done && \
|
2001-12-05 13:32:41 -05:00
|
|
|
for f in $(srcdir)/doc/scsh-manual/*.tex \
|
|
|
|
$(srcdir)/doc/scsh-manual/*.dvi \
|
|
|
|
$(srcdir)/doc/scsh-manual/*.ps; \
|
2001-01-11 08:43:22 -05:00
|
|
|
do $(INSTALL_DATA) $$f $(LIB)/doc/scsh-manual/; \
|
2001-12-05 13:32:41 -05:00
|
|
|
done && \
|
|
|
|
for f in $(srcdir)/doc/scsh-manual/html/*.html \
|
|
|
|
$(srcdir)/doc/scsh-manual/html/*.gif \
|
2001-12-17 04:41:52 -05:00
|
|
|
$(srcdir)/doc/scsh-manual/html/*.css \
|
2002-02-14 04:34:56 -05:00
|
|
|
$(srcdir)/doc/src/manual/*.html; \
|
2001-12-17 04:41:52 -05:00
|
|
|
do $(INSTALL_DATA) $$f $(htmldir)/; \
|
1999-09-14 08:45:02 -04:00
|
|
|
done
|
|
|
|
|
|
|
|
inst-script:
|
2001-06-20 03:40:09 -04:00
|
|
|
script=$(bindir)/$(RUNNABLE) && \
|
1999-09-14 08:45:02 -04:00
|
|
|
echo '#!/bin/sh' >$$script && \
|
|
|
|
echo >>$$script && \
|
|
|
|
echo 'lib=$(LIB)' >>$$script && \
|
|
|
|
echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \
|
|
|
|
>>$$script && \
|
|
|
|
chmod +x $$script
|
|
|
|
|
2001-01-11 08:43:22 -05:00
|
|
|
# Script to run scsh in this directory.
|
1999-09-14 08:45:02 -04:00
|
|
|
go:
|
|
|
|
echo '#!/bin/sh' >$@ && \
|
|
|
|
echo >>$@ && \
|
|
|
|
echo "lib=`pwd`" >>$@ && \
|
2001-03-23 05:52:09 -05:00
|
|
|
echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/scsh/scsh.image "$$@"' \
|
1999-09-14 08:45:02 -04:00
|
|
|
>>$@ && \
|
|
|
|
chmod +x $@
|
|
|
|
|
|
|
|
dirs:
|
2001-12-17 04:41:52 -05:00
|
|
|
for dir in $(libdir) $(bindir) $(incdir) $(LIB) $(mandir) $(htmldir); do\
|
2001-01-11 08:43:22 -05:00
|
|
|
{ mkdir -p $$dir && [ -w $$dir ]; } || { \
|
|
|
|
echo "$$dir not a writable directory" >&2; \
|
|
|
|
exit 1; \
|
|
|
|
} \
|
|
|
|
done && \
|
|
|
|
for dir in \
|
2002-01-08 10:38:36 -05:00
|
|
|
rts env big opt misc link scsh doc/scsh-manual doc/s48-manual cig; \
|
2001-01-11 08:43:22 -05:00
|
|
|
do \
|
|
|
|
{ mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \
|
|
|
|
echo "$(LIB)/$$dir not a writable directory" >&2; \
|
|
|
|
exit 1; \
|
|
|
|
}; \
|
1999-09-14 08:45:02 -04:00
|
|
|
done
|
|
|
|
|
|
|
|
configure: configure.in
|
|
|
|
autoheader && autoconf
|
1999-11-12 10:33:17 -05:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
clean: clean-cig clean-scsh
|
1999-09-14 08:45:02 -04:00
|
|
|
-rm -f $(VM) *.o c/unix/*.o c/*.o c/fake/*.o \
|
2000-10-19 04:24:39 -04:00
|
|
|
$(IMAGE) \
|
1999-09-14 08:45:02 -04:00
|
|
|
build/*.tmp $(MANPAGE) build/linker.image \
|
1999-09-15 20:24:14 -04:00
|
|
|
scheme/debug/*.image scheme/debug/*.debug \
|
1999-09-14 08:45:02 -04:00
|
|
|
scheme/vm/scheme48vm.c scheme/vm/scheme48heap.c \
|
|
|
|
go $(distname)
|
1999-11-12 10:33:17 -05:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
clean-cig:
|
|
|
|
-rm -f cig/*.o $(CIG) $(CIG).image $(LIBCIG)
|
1999-09-14 08:45:02 -04:00
|
|
|
|
1999-09-15 20:24:14 -04:00
|
|
|
clean-scm2c:
|
2001-09-12 10:02:09 -04:00
|
|
|
rm -f #scsh/select.c
|
1999-09-15 20:24:14 -04:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
distclean: clean
|
2000-10-19 04:24:39 -04:00
|
|
|
rm -f Makefile config.log config.status c/sysdep.h config.cache \
|
2001-08-09 09:53:18 -04:00
|
|
|
scsh/machine \
|
2000-10-19 04:24:39 -04:00
|
|
|
scsh/endian.scm scsh/static.scm \
|
|
|
|
exportlist.aix
|
|
|
|
$(RM) a.exe $(VM).base $(VM).def $(VM).exp
|
|
|
|
-find . -name '*~' -o -name '#*' -o -name core -exec rm {} \;
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
check: $(VM) $(IMAGE) scheme/debug/check.scm
|
|
|
|
( \
|
|
|
|
echo ',batch'; \
|
|
|
|
echo ',translate =scheme48 scheme'; \
|
|
|
|
echo ',config ,load scheme/debug/test.scm'; \
|
|
|
|
echo ',exec ,load scheme/debug/check.scm'; \
|
|
|
|
echo ',exec (done)' \
|
|
|
|
) | ./$(VM) -i $(IMAGE)
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Rules from here on down are not essential for the basic installation
|
|
|
|
# procedure, and are not expected to work when srcdir is not the
|
|
|
|
# distribution directory.
|
|
|
|
|
|
|
|
all: vm linker
|
|
|
|
$(MAKE) image
|
|
|
|
vm: $(VM)
|
|
|
|
linker: $(LINKER_IMAGE)
|
|
|
|
image: $(INITIAL)
|
|
|
|
$(MAKE) $(IMAGE)
|
|
|
|
|
|
|
|
tags:
|
2001-01-11 08:43:22 -05:00
|
|
|
find . -name "*.scm" -o -name "*.c" -o -name "*.h" | etags -
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Distribution...
|
|
|
|
|
|
|
|
# DISTFILES should include all sources.
|
2002-01-08 12:10:35 -05:00
|
|
|
DISTFILES = README COPYING INSTALL RELEASE configure config.sub config.guess \
|
1999-09-14 08:45:02 -04:00
|
|
|
acconfig.h configure.in Makefile.in install-sh \
|
2002-02-14 04:34:56 -05:00
|
|
|
doc/*.ps doc/*.txt \
|
2002-01-08 13:34:47 -05:00
|
|
|
doc/src/*.tex doc/src/*.sty doc/src/manual.dvi \
|
|
|
|
doc/src/manual.ps \
|
1999-09-14 08:45:02 -04:00
|
|
|
emacs/README build/*-version-number build/*.exec \
|
|
|
|
build/*.lisp build/build-usual-image build/filenames.make \
|
|
|
|
build/filenames.scm build/initial.debug \
|
|
|
|
build/initial.image build/initial.scm \
|
|
|
|
build/build-external-modules \
|
|
|
|
c/*.[ch] c/*/*.[ch] c/scheme48.h.in \
|
|
|
|
emacs/*.el gdbinit \
|
|
|
|
scheme/*.scm scheme/*/*.scm \
|
|
|
|
ps-compiler \
|
2001-12-05 13:32:41 -05:00
|
|
|
c/sysdep.h.in \
|
|
|
|
scsh/*.scm scsh/*/*.scm \
|
|
|
|
scsh/*.[ch] scsh/*/*.[ch] \
|
|
|
|
scsh/*.scm.in scsh/*/Makefile.inc \
|
|
|
|
cig/*.scm cig/*.[ch] \
|
|
|
|
doc/scsh.man \
|
|
|
|
doc/scsh-manual/*.tex doc/scsh-manual/man.ps \
|
|
|
|
doc/scsh-manual/man.dvi doc/scsh-manual/Makefile \
|
|
|
|
doc/scsh-manual/THANKS doc/scsh-manual/html/*.html \
|
2002-02-09 10:38:39 -05:00
|
|
|
doc/scsh-manual/html/*.gif doc/scsh-manual/html/*.css \
|
|
|
|
doc/src/manual/*.html
|
2001-12-05 13:32:41 -05:00
|
|
|
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
distname = $(RUNNABLE)-0.`cat build/minor-version-number`
|
|
|
|
|
|
|
|
dist: build/initial.image
|
2002-02-14 04:34:56 -05:00
|
|
|
(cd doc/src && hyperlatex manual.tex) && \
|
|
|
|
(cd doc/scsh-manual && makeindex man && make man.ps && make html) && \
|
1999-09-14 08:45:02 -04:00
|
|
|
distname=$(distname) && \
|
|
|
|
distfile=$(distdir)/$$distname.tgz && \
|
|
|
|
if [ -d $(distdir) ] && \
|
|
|
|
[ -w $$distfile -o -w $(distdir) ]; then \
|
|
|
|
rm -f $$distname && \
|
|
|
|
ln -s . $$distname && \
|
|
|
|
files='' && \
|
|
|
|
for i in $(DISTFILES); do \
|
|
|
|
if [ "$$i" != "c/sysdep.h" ]; then \
|
|
|
|
files="$$files $$distname/$$i"; \
|
|
|
|
fi \
|
|
|
|
done && \
|
|
|
|
tar -cf - $$files | \
|
|
|
|
gzip --best >$$distfile && \
|
|
|
|
rm $$distname; \
|
|
|
|
else \
|
|
|
|
echo "Can't write $$distfile" >&2; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Increment the minor version number
|
|
|
|
inc:
|
|
|
|
f=build/minor-version-number && \
|
|
|
|
expr `cat $$f` + 1 >$$f.tmp && \
|
|
|
|
mv $$f.tmp $$f && \
|
|
|
|
echo '(define version-info "0.'`cat $$f`'")' \
|
|
|
|
>scheme/env/version-info.scm
|
|
|
|
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Generate build/filenames.make from *packages.scm
|
|
|
|
#
|
|
|
|
# This hack traces the module dependencies described in the
|
|
|
|
# various configuration files and converts them into dependency lists
|
|
|
|
# that "make" can use for its purposes.
|
|
|
|
#
|
|
|
|
# Since the distribution comes with a filenames.make, this rule
|
|
|
|
# shouldn't be invoked for simple installations. But it will be used
|
|
|
|
# if you change any of the *-packages.scm files.
|
|
|
|
#
|
|
|
|
# You can actually run the forms in filenames.scm in any Scheme
|
|
|
|
# implementation that has syntax-rules and explicit-renaming low-level
|
|
|
|
# macros (e.g., most versions of Scheme 48 and Pseudoscheme).
|
|
|
|
# If there are errors running this script, and you need to debug,
|
|
|
|
# don't use the initial.image, use something that has a reasonable
|
|
|
|
# environment.
|
|
|
|
#
|
|
|
|
# If this fails and you don't feel like debugging or fixing the problem,
|
|
|
|
# try "touch filenames.make" and hope for the best.
|
|
|
|
|
|
|
|
PACKAGES=scheme/packages.scm scheme/rts-packages.scm scheme/alt-packages.scm \
|
|
|
|
scheme/comp-packages.scm scheme/initial-packages.scm \
|
|
|
|
scheme/link-packages.scm scheme/more-packages.scm \
|
|
|
|
build/filenames.scm
|
|
|
|
|
|
|
|
build/filenames.make: $(PACKAGES)
|
2001-05-30 08:13:07 -04:00
|
|
|
$(BUILD_RUNNABLE) -a batch <build/filenames.scm
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Static linker
|
|
|
|
#
|
|
|
|
# The linker is capable of rebuilding an image from sources, even
|
|
|
|
# across an incompatible change in VM data representations.
|
|
|
|
|
|
|
|
build/linker.image: $(linker-files) scheme/alt/init-defpackage.scm
|
|
|
|
(echo ',batch'; \
|
|
|
|
echo ',bench on'; \
|
|
|
|
echo ',open signals handle features'; \
|
|
|
|
echo ',open bitwise ascii code-vectors record'; \
|
|
|
|
echo ',load $(linker-files)'; \
|
|
|
|
echo ',load scheme/alt/init-defpackage.scm'; \
|
|
|
|
echo ',dump build/linker.image' \
|
|
|
|
) | $(LINKER_RUNNABLE)
|
|
|
|
|
|
|
|
# Or, to bootstrap from Lucid Common Lisp: (last tested with
|
|
|
|
# Pseudoscheme 2.9 and Scheme 48 version 0.19)
|
|
|
|
|
|
|
|
PSEUDODIR = ../pseudo
|
|
|
|
|
|
|
|
link/linker-in-lucid: build/lucid-script.lisp $(linker-files) \
|
|
|
|
scheme/alt/pseudoscheme-features.scm \
|
|
|
|
scheme/alt/pseudoscheme-record.scm
|
|
|
|
(echo \(defvar pseudoscheme-directory \"$(PSEUDODIR)/\"\); \
|
|
|
|
cat build/lucid-script.lisp; \
|
|
|
|
echo \(dump-linker\) \(lcl:quit\)) \
|
|
|
|
| lisp
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Initial image
|
|
|
|
#
|
|
|
|
# The initial.image is built by the static linker. The image contains
|
|
|
|
# Scheme, the byte-code compiler, and a minimal command processor, but
|
|
|
|
# no debugging environment to speak of.
|
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
$(INITIAL): $(LINKER_IMAGE) $(CONFIG_FILES) build/initial.scm $(initial-files) \
|
1999-10-08 14:41:05 -04:00
|
|
|
scsh/here.scm # gross and Olin hates it -bri
|
1999-09-14 08:45:02 -04:00
|
|
|
($(START_LINKER); \
|
|
|
|
echo '(load-configuration "scheme/interfaces.scm")'; \
|
|
|
|
echo '(load-configuration "scheme/packages.scm")'; \
|
|
|
|
echo '(flatload initial-structures)'; \
|
|
|
|
echo '(load "build/initial.scm")'; \
|
|
|
|
echo '(link-initial-system)' \
|
|
|
|
) | $(LINKER)
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Various small images for debugging low-level changes
|
|
|
|
|
|
|
|
LOAD_DEBUG = \
|
|
|
|
$(START_LINKER); \
|
|
|
|
echo \(load-configuration \"scheme/interfaces.scm\"\); \
|
|
|
|
echo \(load-configuration \"scheme/packages.scm\"\); \
|
|
|
|
echo \(flatload debug-structures\)
|
|
|
|
|
|
|
|
scheme/debug/tiny.image: $(LINKER_IMAGE) scheme/debug/tiny-packages.scm \
|
|
|
|
scheme/debug/tiny.scm
|
|
|
|
($(START_LINKER); \
|
|
|
|
echo \(load-configuration \"scheme/debug/tiny-packages.scm\"\); \
|
|
|
|
echo \(link-simple-system \'\(scheme/debug tiny\) \'start tiny-system\)) \
|
|
|
|
| $(LINKER)
|
|
|
|
|
|
|
|
scheme/debug/low-test.image: $(LINKER_IMAGE) scheme/debug/low-test-packages.scm \
|
|
|
|
scheme/debug/low-test.scm
|
|
|
|
($(START_LINKER); \
|
|
|
|
echo \(load-configuration \"scheme/debug/low-test-packages.scm\"\); \
|
|
|
|
echo \(link-simple-system \'\(scheme/debug low-test\) \'start low-test-system\)) \
|
|
|
|
| $(LINKER)
|
|
|
|
|
|
|
|
scheme/debug/little.image: $(LINKER_IMAGE) $(CONFIG_FILES) scheme/debug-packages.scm
|
|
|
|
($(LOAD_DEBUG); echo \(link-little-system\)) \
|
|
|
|
| time $(LINKER)
|
|
|
|
|
|
|
|
scheme/debug/mini.image: $(LINKER_IMAGE) $(CONFIG_FILES)
|
|
|
|
($(LOAD_DEBUG); echo \(link-mini-system\)) \
|
|
|
|
| $(LINKER)
|
|
|
|
|
|
|
|
scheme/debug/medium.image: $(LINKER_IMAGE) $(CONFIG_FILES)
|
|
|
|
($(LOAD_DEBUG); echo \(flatload compiler-structures\); \
|
|
|
|
echo \(link-medium-system\)) \
|
|
|
|
| $(LINKER)
|
|
|
|
|
|
|
|
# The following have not been updated for the new directory organization
|
|
|
|
|
|
|
|
c/smain.o: c/main.c
|
1999-09-20 12:46:48 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -DSTATIC_AREAS -o $@ $(srcdir)/c/main.c
|
1999-09-14 08:45:02 -04:00
|
|
|
|
1999-09-15 20:24:14 -04:00
|
|
|
mini: mini-heap.o c/smain.o
|
1999-09-14 08:45:02 -04:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ c/smain.o mini-heap.o $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
mini-heap.o: mini-heap.c
|
|
|
|
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -o $@ $(srcdir)/mini-heap.c
|
|
|
|
|
|
|
|
mini-heap.c: scheme/debug/mini1.image
|
|
|
|
(echo ,exec ,load misc/load-static.scm; \
|
|
|
|
echo \(do-it 150000 \"$(srcdir)/scheme/debug/mini1.image\" \"$@\"\)) \
|
2001-05-30 08:13:07 -04:00
|
|
|
| $(BUILD_RUNNABLE) -h 3000000 -a batch
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
scheme/debug/mini1.image: $(VM) scheme/debug/mini.image
|
|
|
|
echo "(write-image \"scheme/debug/mini1.image\" \
|
|
|
|
(usual-resumer (lambda (args) \
|
|
|
|
(command-processor #f args))) \
|
|
|
|
\"foo\")" \
|
|
|
|
| ./$(VM) -i scheme/debug/mini.image -a batch
|
|
|
|
|
|
|
|
|
|
|
|
# --------------------
|
|
|
|
# Generate scheme48.h from VM sources
|
|
|
|
|
|
|
|
c/scheme48.h: c/scheme48.h.in scheme/vm/arch.scm scheme/vm/data.scm \
|
|
|
|
scheme/link/generate-c-header.scm
|
|
|
|
(echo ',bench'; \
|
|
|
|
echo ',batch'; \
|
|
|
|
echo ',load-package big-scheme'; \
|
|
|
|
echo ',open big-scheme'; \
|
|
|
|
echo ',load scheme/link/generate-c-header.scm'; \
|
|
|
|
echo "(make-c-header-file \"$@\" \
|
|
|
|
\"$(srcdir)/c/scheme48.h.in\" \
|
|
|
|
\"$(srcdir)/scheme/vm/arch.scm\" \
|
|
|
|
\"$(srcdir)/scheme/vm/data.scm\" \
|
|
|
|
\"$(srcdir)/scheme/rts/record.scm\")" \
|
2001-05-30 08:13:07 -04:00
|
|
|
) | $(BUILD_RUNNABLE)
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
# An old version of the above for legacy code.
|
|
|
|
|
|
|
|
c/old-scheme48.h: scheme/vm/arch.scm scheme/vm/data.scm \
|
|
|
|
scheme/link/generate-old-c-header.scm
|
|
|
|
(echo ',bench'; \
|
|
|
|
echo ',batch'; \
|
|
|
|
echo ',load-package big-scheme'; \
|
|
|
|
echo ',open big-scheme'; \
|
|
|
|
echo ',load scheme/link/generate-old-c-header.scm'; \
|
|
|
|
echo "(make-c-header-file \"$@\" \
|
|
|
|
\"$(srcdir)/scheme/vm/arch.scm\" \
|
|
|
|
\"$(srcdir)/scheme/vm/data.scm\")" \
|
2001-05-30 08:13:07 -04:00
|
|
|
) | $(BUILD_RUNNABLE)
|
1999-09-14 08:45:02 -04:00
|
|
|
|
|
|
|
# Generate vm (scheme48vm.c and scheme48heap.c) from VM sources.
|
|
|
|
# Never called automatically. Do not use unless you are sure you
|
|
|
|
# know what you are doing.
|
|
|
|
# Afterwards, you should probably make c/scheme48.h.
|
|
|
|
i-know-what-i-am-doing:
|
|
|
|
cd ps-compiler && \
|
|
|
|
(echo ',batch'; \
|
|
|
|
echo ',config ,load ../scheme/prescheme/interface.scm'; \
|
|
|
|
echo ',config ,load ../scheme/prescheme/package-defs.scm'; \
|
|
|
|
echo ',exec ,load load-ps-compiler.scm'; \
|
|
|
|
echo ',exec ,load compile-vm-no-gc.scm'; \
|
|
|
|
echo ',exec ,load compile-gc.scm'; \
|
|
|
|
echo ',exit' \
|
2001-05-30 08:13:07 -04:00
|
|
|
) | $(BUILD_RUNNABLE) -h 5000000 && \
|
1999-09-14 08:45:02 -04:00
|
|
|
mv ../scheme/vm/scheme48vm.c ../scheme/vm/scheme48heap.c ../c
|
1999-11-12 10:33:17 -05:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
cig: $(CIG) $(CIG).image $(LIBCIG)
|
|
|
|
|
1999-09-20 12:46:48 -04:00
|
|
|
|
|
|
|
$(CIG): $(VM) $(IMAGE) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
|
1999-09-14 21:06:21 -04:00
|
|
|
(echo ",batch"; \
|
|
|
|
echo ",translate =scheme48/ $(srcdir)/scheme/"; \
|
|
|
|
echo ",config ,load $(srcdir)/cig/cig.scm"; \
|
|
|
|
echo ",config ,load $(srcdir)/cig/libcig.scm"; \
|
|
|
|
echo ",load-package cig-standalone"; \
|
|
|
|
echo ",in cig-standalone"; \
|
|
|
|
echo ",translate =scheme48/ $(LIB)/"; \
|
|
|
|
echo ",build cig-standalone-toplevel /tmp/cig") \
|
|
|
|
| ./$(VM) -i ./$(IMAGE)
|
|
|
|
$(srcdir)/cig/image2script $(LIB)/$(VM) </tmp/cig > $(CIG)
|
|
|
|
-chmod +x $(CIG)
|
1999-11-04 15:57:58 -05:00
|
|
|
mv /tmp/cig $(srcdir)/cig/cig_bootstrap
|
1999-09-14 21:06:21 -04:00
|
|
|
$(RM) /tmp/cig
|
|
|
|
|
|
|
|
$(CIG).image: $(IMAGE) $(VM) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
|
|
|
|
(echo ",batch"; \
|
|
|
|
echo ",translate =scheme48/ $(srcdir)/scheme/"; \
|
|
|
|
echo ",config ,load $(srcdir)/cig/cig.scm"; \
|
|
|
|
echo ",config ,load $(srcdir)/cig/libcig.scm"; \
|
|
|
|
echo ",load-package cig-aux"; \
|
|
|
|
echo ",open define-foreign-syntax"; \
|
|
|
|
echo ",translate =scheme48/ $(LIB)/"; \
|
|
|
|
echo ",dump /tmp/cig \"(CIG Preloaded -bri)\"") \
|
|
|
|
| ./$(VM) -o ./$(VM) -i ./$(IMAGE)
|
|
|
|
$(srcdir)/cig/image2script $(LIB)/$(VM) \
|
|
|
|
-o $(LIB)/$(VM) \
|
|
|
|
</tmp/cig > $(CIG).image
|
|
|
|
-chmod +x $(CIG).image
|
|
|
|
$(RM) /tmp/cig
|
|
|
|
|
|
|
|
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
|
|
|
# SCSH Specifics
|
|
|
|
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
2001-09-12 13:44:57 -04:00
|
|
|
scsh: scsh/scsh scsh/scsh.image
|
1999-09-14 21:06:21 -04:00
|
|
|
|
|
|
|
SCHEME =scsh/awk.scm \
|
|
|
|
scsh/char-set.scm \
|
|
|
|
scsh/defrec.scm \
|
|
|
|
scsh/endian.scm \
|
|
|
|
scsh/enumconst.scm \
|
|
|
|
scsh/event.scm \
|
1999-11-04 15:57:58 -05:00
|
|
|
scsh/low-interrupt.scm \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/fdports.scm \
|
|
|
|
scsh/fileinfo.scm \
|
|
|
|
scsh/filemtch.scm \
|
|
|
|
scsh/filesys.scm \
|
|
|
|
scsh/flock.scm \
|
|
|
|
scsh/fname.scm \
|
|
|
|
scsh/fr.scm \
|
|
|
|
scsh/glob.scm \
|
2000-10-19 04:24:39 -04:00
|
|
|
scsh/dot-locking.scm \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/here.scm \
|
|
|
|
scsh/machine/bufpol.scm \
|
|
|
|
scsh/machine/errno.scm \
|
|
|
|
scsh/machine/fdflags.scm \
|
|
|
|
scsh/machine/netconst.scm \
|
|
|
|
scsh/machine/packages.scm \
|
|
|
|
scsh/machine/signals.scm \
|
|
|
|
scsh/machine/time_dep.scm \
|
|
|
|
scsh/machine/tty-consts.scm \
|
|
|
|
scsh/machine/waitcodes.scm \
|
|
|
|
scsh/meta-arg.scm \
|
|
|
|
scsh/network.scm \
|
|
|
|
scsh/newports.scm \
|
|
|
|
scsh/procobj.scm \
|
|
|
|
scsh/pty.scm \
|
|
|
|
scsh/rdelim.scm \
|
|
|
|
scsh/rw.scm \
|
2001-08-09 09:53:18 -04:00
|
|
|
scsh/rx/packages.scm \
|
|
|
|
scsh/rx/cond-package.scm \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/scsh-condition.scm \
|
|
|
|
scsh/scsh-interfaces.scm \
|
|
|
|
scsh/scsh-package.scm \
|
|
|
|
scsh/scsh-read.scm \
|
|
|
|
scsh/scsh-version.scm \
|
|
|
|
scsh/scsh.scm \
|
2001-03-23 05:52:09 -05:00
|
|
|
scsh/sighandlers.scm \
|
1999-09-14 21:06:21 -04:00
|
|
|
scsh/startup.scm \
|
|
|
|
scsh/stringcoll.scm \
|
|
|
|
scsh/syntax-helpers.scm \
|
|
|
|
scsh/syntax.scm \
|
|
|
|
scsh/syscalls.scm \
|
|
|
|
scsh/time.scm \
|
|
|
|
scsh/top.scm \
|
|
|
|
scsh/tty.scm \
|
2001-10-01 10:47:03 -04:00
|
|
|
scsh/utilities.scm \
|
2001-12-05 13:32:41 -05:00
|
|
|
scsh/weaktables.scm \
|
2001-10-01 10:47:03 -04:00
|
|
|
scsh/rx/cond-package.scm \
|
|
|
|
scsh/rx/packages.scm \
|
|
|
|
scsh/rx/re-match-syntax.scm \
|
|
|
|
scsh/rx/rx-lib.scm \
|
|
|
|
scsh/rx/loadem.scm \
|
|
|
|
scsh/rx/parse.scm \
|
|
|
|
scsh/rx/re-subst.scm \
|
|
|
|
scsh/rx/simp.scm \
|
|
|
|
scsh/rx/modules.scm \
|
|
|
|
scsh/rx/posixstr.scm \
|
|
|
|
scsh/rx/re-syntax.scm \
|
|
|
|
scsh/rx/spencer.scm \
|
|
|
|
scsh/rx/oldfuns.scm \
|
|
|
|
scsh/rx/re-fold.scm \
|
|
|
|
scsh/rx/re.scm \
|
|
|
|
scsh/rx/test.scm \
|
|
|
|
scsh/rx/re-high.scm \
|
|
|
|
scsh/rx/regexp.scm \
|
|
|
|
scsh/rx/re-low.scm \
|
|
|
|
scsh/rx/regress.scm
|
1999-09-14 21:06:21 -04:00
|
|
|
# scsh/dbm.scm db.scm ndbm.scm
|
|
|
|
# static.scm static-heap.scm static1.scm
|
|
|
|
# jcontrol
|
|
|
|
|
|
|
|
# Bogus, but it makes the scm->c->o two-ply dependency work.
|
|
|
|
# Explicitly giving the .o/.c dependency also makes it go.
|
|
|
|
############################################################
|
|
|
|
cig/libcig.c: cig/libcig.scm
|
2001-09-12 10:02:09 -04:00
|
|
|
#scsh/select.c: scsh/select.scm
|
1999-09-14 21:06:21 -04:00
|
|
|
|
|
|
|
scsh/scsh: scsh/scsh-tramp.c
|
|
|
|
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) \
|
|
|
|
-DVM=\"$(LIB)/$(VM)\" \
|
|
|
|
-DIMAGE=\"$(LIB)/scsh.image\" \
|
|
|
|
scsh/scsh-tramp.c
|
|
|
|
|
1999-09-23 10:15:26 -04:00
|
|
|
bs: build/build-scsh-image
|
|
|
|
sh $(srcdir)/build/build-scsh-image "$(srcdir)" "$(LIB)" "$(IMAGE)" \
|
|
|
|
"$(VM)" cig/cig.image
|
|
|
|
|
1999-09-23 10:36:25 -04:00
|
|
|
loads = $(srcdir)/scsh/let-opt.scm $(srcdir)/scsh/scsh-interfaces.scm \
|
|
|
|
$(srcdir)/scsh/machine/packages.scm \
|
|
|
|
$(srcdir)/scsh/rx/packages.scm \
|
|
|
|
$(srcdir)/scsh/rx/cond-package.scm \
|
|
|
|
$(srcdir)/scsh/scsh-package.scm \
|
2001-03-23 05:52:09 -05:00
|
|
|
$(srcdir)/scsh/lib/cset-package.scm \
|
|
|
|
$(srcdir)/scsh/lib/string-package.scm \
|
1999-09-23 10:36:25 -04:00
|
|
|
$(srcdir)/scsh/lib/list-pack.scm \
|
2001-03-23 05:52:09 -05:00
|
|
|
$(srcdir)/scsh/lib/ccp-pack.scm \
|
|
|
|
$(srcdir)/scsh/lib/char-package.scm \
|
|
|
|
$(srcdir)/scsh/lib/cset-obsolete.scm
|
|
|
|
|
1999-09-23 10:15:26 -04:00
|
|
|
|
2001-10-01 10:47:03 -04:00
|
|
|
scsh/scsh.image: $(VM) $(SCHEME) $(IMAGE)
|
2001-06-03 14:29:45 -04:00
|
|
|
(echo ",translate =scheme48/ `pwd`/scheme/"; \
|
1999-09-14 21:06:21 -04:00
|
|
|
echo ",batch on"; \
|
|
|
|
echo ",load-package floatnums"; \
|
|
|
|
echo ",config"; \
|
1999-09-23 10:36:25 -04:00
|
|
|
echo ",load $(loads)"; \
|
1999-09-14 21:06:21 -04:00
|
|
|
echo ",load-package scsh"; \
|
|
|
|
echo ",load-package scsh-here-string-hax"; \
|
1999-09-23 10:36:25 -04:00
|
|
|
echo ",load-package list-lib"; \
|
|
|
|
echo ",load-package string-lib"; \
|
|
|
|
echo ",load-package ccp-lib"; \
|
1999-09-14 21:06:21 -04:00
|
|
|
echo ",in scsh-level-0"; \
|
|
|
|
echo ",user"; \
|
|
|
|
echo ",open floatnums"; \
|
|
|
|
echo ",open scsh"; \
|
1999-09-23 10:36:25 -04:00
|
|
|
echo ",open list-lib string-lib ccp-lib"; \
|
1999-10-08 14:41:05 -04:00
|
|
|
echo ",batch off"; \
|
|
|
|
echo ",open scsh-top-package"; \
|
|
|
|
echo ",keep names maps files source tabulate"; \
|
|
|
|
echo "(dump-scsh \"scsh/scsh.image\")"; \
|
|
|
|
echo ",batch on") \
|
2001-10-01 10:47:03 -04:00
|
|
|
| ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000
|
1999-09-14 21:06:21 -04:00
|
|
|
|
2001-05-30 08:13:07 -04:00
|
|
|
install-scsh: scsh install-scsh-image
|
1999-09-14 21:06:21 -04:00
|
|
|
$(RM) $(bindir)/$(RUNNABLE)
|
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/scsh/scsh $(bindir)/$(RUNNABLE)
|
2001-01-01 13:02:51 -05:00
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSHVM) $(libdir)/$(LIBSCSHVM)
|
1999-09-14 21:06:21 -04:00
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSH) $(libdir)/$(LIBSCSH)
|
|
|
|
$(RANLIB) $(libdir)/$(LIBSCSH)
|
2001-12-05 13:32:41 -05:00
|
|
|
for f in $(srcdir)/scsh/*.scm $(srcdir)/scsh/*/*.scm; \
|
1999-09-14 21:06:21 -04:00
|
|
|
do $(INSTALL_DATA) $$f $(LIB)/scsh/; done
|
|
|
|
|
2001-12-17 04:41:52 -05:00
|
|
|
install-scsh-image: $(VM) scsh/scsh.image
|
2001-05-30 08:13:07 -04:00
|
|
|
( echo ',translate =scheme48 $(LIB)'; \
|
2001-12-17 04:41:52 -05:00
|
|
|
echo '(dump-scsh "$(LIB)/scsh.image")'; \
|
2001-05-30 08:13:07 -04:00
|
|
|
echo ',exit'; \
|
2001-12-17 04:41:52 -05:00
|
|
|
) | ./$(VM) -i scsh/scsh.image
|
2001-05-30 08:13:07 -04:00
|
|
|
|
1999-09-14 21:06:21 -04:00
|
|
|
clean-scsh:
|
2001-08-09 09:53:18 -04:00
|
|
|
$(RM) scsh/*.o scsh/rx/*.o scsh/machine/*.o
|
1999-09-23 10:36:25 -04:00
|
|
|
$(RM) scsh/*.image
|
2001-01-11 08:43:22 -05:00
|
|
|
$(RM) $(LIBSCSHVM) $(LIBSCSH) scsh/scsh$(EXEEXT)
|
1999-09-23 10:36:25 -04:00
|
|
|
|
1999-09-20 12:46:48 -04:00
|
|
|
|