Big cleanup. Should be ready to distribute now.
This commit is contained in:
parent
c5cfe8c420
commit
3e2a109780
158
Makefile.in
158
Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# Scheme 48 Makefile
|
||||
# Scsh Makefile
|
||||
# Documentation in files INSTALL and doc/install.txt
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
@ -43,7 +43,6 @@ mandir = $(prefix)/man/man$(manext)
|
|||
.c.o:
|
||||
$(CC) -g -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c -I$(srcdir)/cig $(CFLAGS) -o $@ $<
|
||||
|
||||
# You might want to change RUNNABLE to "s48"
|
||||
RUNNABLE = scsh
|
||||
MANPAGE = $(RUNNABLE).$(manext)
|
||||
LIB = $(libdir)/$(RUNNABLE)
|
||||
|
@ -73,18 +72,18 @@ include $(srcdir)/build/filenames.make
|
|||
# LINKER_RUNNABLE = $(RUNNABLE)
|
||||
# These settings requires you to already have a $(RUNNABLE)
|
||||
# command. This is desirable if you are making changes to the
|
||||
# system that might break scheme48vm and/or scheme48.image. But it
|
||||
# system that might break scshvm and/or scsh/scsh.image. But it
|
||||
# requires you to have squirreled away a previous working version
|
||||
# of scheme48.
|
||||
# of scsh.
|
||||
|
||||
BIG_HEAP = -h 5000000
|
||||
# JMG: 1. is broken ...
|
||||
# 1. is broken if you build from CVS
|
||||
# LINKER_VM = ./$(VM) $(BIG_HEAP)
|
||||
# LINKER_RUNNABLE = $(LINKER_VM) -i $(IMAGE)
|
||||
|
||||
# JMG now according 2
|
||||
LINKER_VM = /afs/informatik.uni-tuebingen.de/home/gasbichl/i386_fbsd40/lib/scheme48/scheme48vm $(BIG_HEAP)
|
||||
LINKER_RUNNABLE = scheme48
|
||||
# therefor according to 2.
|
||||
LINKER_VM = $(RUNNABLE) $(BIG_HEAP)
|
||||
LINKER_RUNNABLE = $(RUNNABLE)
|
||||
|
||||
LINKER_IMAGE = build/linker.image
|
||||
LINKER = $(LINKER_VM) -i $(LINKER_IMAGE)
|
||||
|
@ -96,7 +95,7 @@ START_LINKER = echo ',batch' && echo ',bench on'
|
|||
|
||||
# Targets:
|
||||
|
||||
IMAGE = scsh.image
|
||||
IMAGE = scheme48.image
|
||||
INITIAL = $(srcdir)/build/initial.image
|
||||
VM = scshvm
|
||||
LIBCIG = cig/lib$(VM).a
|
||||
|
@ -151,17 +150,17 @@ CONFIG_FILES = scheme/interfaces.scm scheme/low-packages.scm \
|
|||
# The following is the first rule and therefore the "make" command's
|
||||
# default target.
|
||||
enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) $(LIBSCSHVM)
|
||||
#JMG: no manpages at the moment $(MANPAGE)
|
||||
#JMG no notify at the moment... .notify
|
||||
|
||||
# Files generated by cig
|
||||
CIGGED = flock network select syscalls tty time
|
||||
CIGGEDOBJ = $(patsubst %,scsh/%.o, $(CIGGED))
|
||||
CIGGEDINIT = $(patsubst %,s48_init_%, $(CIGGED))
|
||||
|
||||
# --------------------
|
||||
# External code to include in the VM
|
||||
# After changing any of these you should delete `scheme48vm' and remake it.
|
||||
|
||||
CIGGED = flock network select syscalls tty time
|
||||
CIGGEDOBJ = $(patsubst %,scsh/%.o, $(CIGGED))
|
||||
CIGGEDINIT = $(patsubst %,s48_init_%, $(CIGGED))
|
||||
|
||||
EXTERNAL_OBJECTS = $(SOCKET_OBJECTS) $(LOOKUP_OBJECTS)
|
||||
EXTERNAL_FLAGS = $(SOCKET_FLAGS)
|
||||
EXTERNAL_INITIALIZERS = $(ADDITIONAL_INITIALIZER) $(SOCKET_INITIALIZERS) \
|
||||
|
@ -199,12 +198,13 @@ ADDITIONAL_INITIALIZER = s48_init_additional_inits
|
|||
# --------------------
|
||||
|
||||
# The developers are curious to know. Don't be concerned if this fails.
|
||||
# TODO: change this to scsh-notifications
|
||||
.notify: build/minor-version-number
|
||||
touch .notify
|
||||
-echo Another 0.`cat $(srcdir)/build/minor-version-number` \
|
||||
installation. \
|
||||
| mail scheme-48-notifications@martigny.ai.mit.edu
|
||||
-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
|
||||
|
||||
|
||||
# This says how to process .scm files with cig to make .c stubs.
|
||||
|
@ -277,7 +277,7 @@ $(LIBSCSH): $(OBJS) $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS)
|
|||
$(AR) $@ $(OBJS) $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) \
|
||||
/tmp/s48_external_$$$$.o && \
|
||||
$(RANLIB) $@ && \
|
||||
rm -f /tmp/s48_external_$$$$.{c,o}
|
||||
rm -f /tmp/s48_external_$$$$.c /tmp/s48_external_$$$$.o
|
||||
|
||||
c/main.o: c/main.c
|
||||
$(CC) -c $(CFLAGS) -o $@ \
|
||||
|
@ -314,15 +314,13 @@ c/fake/strerror.o: c/fake/strerror.h
|
|||
$(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
|
||||
# sh $(srcdir)/build/build-usual-image "$(srcdir)" "$(LIB)" "$(IMAGE)" \
|
||||
# "$(VM)" "$(INITIAL)"
|
||||
build/build-usual-image . "`pwd`/scheme" '$(IMAGE)' './$(VM)' \
|
||||
'$(INITIAL)'
|
||||
|
||||
### Fake targets: all clean install man dist
|
||||
#inst-man
|
||||
install: dirs inst-script inst-vm inst-misc inst-inc install-cig \
|
||||
install-scsh
|
||||
|
||||
install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc \
|
||||
inst-doc install-cig install-scsh
|
||||
|
||||
inst-vm: $(VM)
|
||||
$(INSTALL_PROGRAM) $(VM) $(LIB)
|
||||
|
@ -331,11 +329,11 @@ inst-image: $(IMAGE)
|
|||
$(INSTALL_DATA) $(IMAGE) $(LIB)
|
||||
|
||||
|
||||
inst-man: $(MANPAGE)
|
||||
inst-man:
|
||||
if [ -d $(mandir) -a -w $(mandir) ]; then \
|
||||
sed 's=LBIN=$(bindir)=g' doc/scheme48.man | \
|
||||
sed 's=LBIN=$(bindir)=g' doc/scsh.man | \
|
||||
sed 's=LLIB=$(LIB)=g' | \
|
||||
sed 's=LS48=$(RUNNABLE)=g' >$(MANPAGE) && \
|
||||
sed 's=LSCSH=$(RUNNABLE)=g' >$(MANPAGE) && \
|
||||
$(INSTALL_DATA) $(MANPAGE) $(mandir) && \
|
||||
rm $(MANPAGE); \
|
||||
else \
|
||||
|
@ -360,6 +358,14 @@ inst-misc:
|
|||
done && \
|
||||
for f in scheme/rts/*num.scm scheme/rts/jar-defrecord.scm; do \
|
||||
$(INSTALL_DATA) $$f $(LIB)/rts || exit 1; \
|
||||
done
|
||||
|
||||
inst-doc:
|
||||
for f in $(srcdir)/doc/*.txt $(srcdir)/doc/*.tex $(srcdir)/doc/*.ps; do \
|
||||
$(INSTALL_DATA) $$f $(LIB)/doc/; \
|
||||
done && \
|
||||
for f in $(srcdir)/doc/scsh-manual/*.tex; \
|
||||
do $(INSTALL_DATA) $$f $(LIB)/doc/scsh-manual/; \
|
||||
done
|
||||
|
||||
inst-script:
|
||||
|
@ -371,7 +377,7 @@ inst-script:
|
|||
>>$$script && \
|
||||
chmod +x $$script
|
||||
|
||||
# Script to run scheme48 in this directory.
|
||||
# Script to run scsh in this directory.
|
||||
go:
|
||||
echo '#!/bin/sh' >$@ && \
|
||||
echo >>$@ && \
|
||||
|
@ -381,27 +387,24 @@ go:
|
|||
chmod +x $@
|
||||
|
||||
dirs:
|
||||
for dir in $(libdir) $(bindir) $(incdir); do \
|
||||
[ -d $$dir -a -w $$dir ] || { \
|
||||
echo "$$dir not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
done
|
||||
{ mkdir -p $(LIB) && [ -w $(LIB) ]; } || { \
|
||||
echo "$(LIB) not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
}
|
||||
for dir in rts env big opt misc link scsh; do \
|
||||
{ mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \
|
||||
echo "$(LIB)/$$dir not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
for dir in $(libdir) $(bindir) $(incdir) $(LIB) $(mandir); do \
|
||||
{ mkdir -p $$dir && [ -w $$dir ]; } || { \
|
||||
echo "$$dir not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
} \
|
||||
done && \
|
||||
for dir in \
|
||||
rts env big opt misc link scsh doc doc/scsh-manual cig; \
|
||||
do \
|
||||
{ mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \
|
||||
echo "$(LIB)/$$dir not a writable directory" >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
done
|
||||
|
||||
configure: configure.in
|
||||
autoheader && autoconf
|
||||
|
||||
#JMG: removed TAGS
|
||||
clean: clean-cig clean-scsh
|
||||
-rm -f $(VM) *.o c/unix/*.o c/*.o c/fake/*.o \
|
||||
$(IMAGE) \
|
||||
|
@ -417,7 +420,6 @@ clean-scm2c:
|
|||
rm -f scsh/flock.c scsh/network.c \
|
||||
scsh/select.c scsh/syscalls.c scsh/tty.c scsh/time.c
|
||||
|
||||
#JMG: moved config.cache to distclean for easier debugging
|
||||
distclean: clean
|
||||
rm -f Makefile config.log config.status c/sysdep.h config.cache \
|
||||
scsh/machine scsh/regexp/Makefile \
|
||||
|
@ -448,11 +450,7 @@ image: $(INITIAL)
|
|||
$(MAKE) $(IMAGE)
|
||||
|
||||
tags:
|
||||
find . -name "*.scm" -or -name "*.c" -or -name "*.h" | etags -
|
||||
# etags scsh/*.scm scsh/*.c \
|
||||
# scheme/vm/arch.scm scheme/rts/*.scm scheme/bcomp/*.scm \
|
||||
# scheme/*.scm scheme/env/*.scm scheme/big/*.scm scheme/link/*.scm \
|
||||
# scheme/opt/*.scm scheme/debug/*.scm scheme/misc/*.scm
|
||||
find . -name "*.scm" -o -name "*.c" -o -name "*.h" | etags -
|
||||
|
||||
# --------------------
|
||||
# Distribution...
|
||||
|
@ -707,20 +705,6 @@ $(CIG): $(VM) $(IMAGE) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
|
|||
mv /tmp/cig $(srcdir)/cig/cig_bootstrap
|
||||
$(RM) /tmp/cig
|
||||
|
||||
$(CIG)2:
|
||||
(echo ",batch"; \
|
||||
echo ",translate =scheme48/ $(srcdir)/scheme/"; \
|
||||
echo ",config ,load $(srcdir)/cig/cig2.scm"; \
|
||||
echo ",config ,load $(srcdir)/cig/libcig.scm"; \
|
||||
echo ",load-package cig-standalone"; \
|
||||
echo ",in cig-standalone"; \
|
||||
echo ",translate =scheme48/ $(LIB)/"; \
|
||||
echo '(dump-scsh-program cig-standalone-toplevel "/tmp/cig")') \
|
||||
| ./$(VM) -o ./$(VM) -i ./scsh/scsh.image
|
||||
$(srcdir)/cig/image2script $(LIB)/$(VM) </tmp/cig > $(CIG)2
|
||||
-chmod +x $(CIG)2
|
||||
$(RM) /tmp/cig
|
||||
|
||||
$(CIG).image: $(IMAGE) $(VM) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
|
||||
(echo ",batch"; \
|
||||
echo ",translate =scheme48/ $(srcdir)/scheme/"; \
|
||||
|
@ -862,53 +846,9 @@ scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image
|
|||
echo ",batch on") \
|
||||
| ./$(VM) -o ./$(VM) -i $(CIG).image -h 10000000
|
||||
|
||||
# echo ",build (lambda (args) ((scsh-stand-alone-resumer (make-scsh-starter)) args)) bla.image"; \
|
||||
#scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image
|
||||
# (echo ",translate =scheme48/ $(srcdir)/"; \
|
||||
# echo ",batch on"; \
|
||||
# echo ",load-package floatnums"; \
|
||||
# echo ",open externals"; \
|
||||
# echo "(lookup-all-externals)"; \
|
||||
# echo ",config"; \
|
||||
# echo ",load $(srcdir)/scsh/let-opt.scm"; \
|
||||
# echo ",load $(srcdir)/scsh/scsh-interfaces.scm"; \
|
||||
# echo ",load $(srcdir)/scsh/machine/packages.scm"; \
|
||||
# echo ",load $(srcdir)/scsh/scsh-package.scm"; \
|
||||
# echo ",load-package scsh"; \
|
||||
# echo ",load-package scsh-here-string-hax"; \
|
||||
# echo ",translate =scheme48/ $(LIB)/"; \
|
||||
# echo ",in scsh-level-0"; \
|
||||
# echo "(%install-scsh-handlers)"; \
|
||||
# echo "(autoreap-policy 'early)"; \
|
||||
# echo ",user"; \
|
||||
# echo ",open floatnums"; \
|
||||
# echo ",open scsh"; \
|
||||
# echo ",dump scsh/scsh.image") \
|
||||
# | ./$(VM) -o ./$(VM) -i $(CIG).image
|
||||
|
||||
# Removed these lines from scsh/scsh.image rule so you don't lose so
|
||||
# badly when you are debugging in scsh. -Olin 6/95
|
||||
# echo ",flush";
|
||||
# echo ",flush maps source names files table";
|
||||
|
||||
#scsh/scsh.runnable: scsh/scsh.image
|
||||
# cig/image2script $(LIB)/$(VM) -o $(LIB)/$(VM) -h 1800000 \
|
||||
# < scsh/scsh.image > $@
|
||||
# -chmod +x $@
|
||||
|
||||
scsh/regexp/libregex.a:
|
||||
cd ./scsh/regexp; $(MAKE) lib
|
||||
|
||||
scsh/scsh.vm: $(LIBSCSHVM) $(VM) scsh/scsh.image
|
||||
./$(VM) -o ./$(VM) -h 8000000 -i scsh/scsh.image \
|
||||
-lm ./vm/ps-interface.scm \
|
||||
-lm ./vm/interfaces.scm \
|
||||
-lm ./vm/package-defs.scm \
|
||||
-lm ./vm/s48-package-defs.scm \
|
||||
-dm -m static-heaps -e static-heap-linker \
|
||||
-s scsh/static.scm \
|
||||
-i scsh/scsh.image -o $@
|
||||
|
||||
install-scsh: scsh
|
||||
$(RM) $(bindir)/$(RUNNABLE)
|
||||
$(INSTALL_PROGRAM) $(srcdir)/scsh/scsh $(bindir)/$(RUNNABLE)
|
||||
|
@ -922,7 +862,7 @@ install-scsh: scsh
|
|||
clean-scsh:
|
||||
$(RM) scsh/*.o scsh/regexp/*.o scsh/rx/*.o scsh/machine/*.o
|
||||
$(RM) scsh/*.image
|
||||
$(RM) $(LIBSCSHVM) $(LIBSCSH) scsh/scsh$(EXEEXT) scsh/scsh.vm
|
||||
$(RM) $(LIBSCSHVM) $(LIBSCSH) scsh/scsh$(EXEEXT)
|
||||
-cd scsh/regexp; $(MAKE) clean
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue