adaped to the original scsh structure

This commit is contained in:
marting 1999-11-12 15:33:17 +00:00
parent 428a3b7c2c
commit 9938c1a710
1 changed files with 19 additions and 30 deletions

View File

@ -19,8 +19,8 @@ LIBOBJS = @LIBOBJS@
RM = rm -f RM = rm -f
AR = ar cq AR = @AR@
RANLIB = ranlib RANLIB = @RANLIB@
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
@ -44,7 +44,7 @@ mandir = $(prefix)/man/man$(manext)
$(CC) -g -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c -I$(srcdir)/cig $(CFLAGS) -o $@ $< $(CC) -g -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c -I$(srcdir)/cig $(CFLAGS) -o $@ $<
# You might want to change RUNNABLE to "s48" # You might want to change RUNNABLE to "s48"
RUNNABLE = scsh06 RUNNABLE = scsh
MANPAGE = $(RUNNABLE).$(manext) MANPAGE = $(RUNNABLE).$(manext)
LIB = $(libdir)/$(RUNNABLE) LIB = $(libdir)/$(RUNNABLE)
@ -97,10 +97,8 @@ START_LINKER = echo ',batch' && echo ',bench on'
# Targets: # Targets:
IMAGE = scsh.image IMAGE = scsh.image
INITIAL = build/initial.image INITIAL = $(srcdir)/build/initial.image
#JMG: renamed the vm VM = scshvm
#JMG: we need cig at the moment
VM = scsh06vm
LIBCIG = cig/lib$(VM).a LIBCIG = cig/lib$(VM).a
CIG = cig/cig CIG = cig/cig
CIGOBJS = cig/libcig.o cig/libcig1.o CIGOBJS = cig/libcig.o cig/libcig1.o
@ -205,7 +203,6 @@ JMG: scsh stuff
# This says how to process .scm files with cig to make .c stubs. # This says how to process .scm files with cig to make .c stubs.
.SUFFIXES: .scm .SUFFIXES: .scm
.scm.c: .scm.c:
# $(srcdir)/cig/cigscript $*
$(srcdir)/$(VM) -o $(srcdir)/$(VM) -i $(CIG) < $< > $*.c $(srcdir)/$(VM) -o $(srcdir)/$(VM) -i $(CIG) < $< > $*.c
# These .h files mediate between the code exported from foo1.c # These .h files mediate between the code exported from foo1.c
@ -218,7 +215,6 @@ scsh/userinfo1.o: scsh/userinfo1.h
scsh/fdports1.o scsh/fdports.o: scsh/fdports1.h scsh/fdports1.o scsh/fdports.o: scsh/fdports1.h
scsh/flock1.o scsh/flock.o: scsh/flock1.h scsh/flock1.o scsh/flock.o: scsh/flock1.h
scsh/network1.o scsh/network.o: scsh/network1.h scsh/network1.o scsh/network.o: scsh/network1.h
#JMG exists no longer in 0.5.2scsh/re1.o scsh/re.o: scsh/re1.h
scsh/select1.o scsh/select.o: scsh/select1.h scsh/select1.o scsh/select.o: scsh/select1.h
scsh/syscalls1.o scsh/syscalls.o: scsh/syscalls1.h scsh/syscalls1.o scsh/syscalls.o: scsh/syscalls1.h
scsh/time1.o scsh/time.o: scsh/time1.h scsh/time1.o scsh/time.o: scsh/time1.h
@ -300,21 +296,18 @@ $(IMAGE): $(VM) scheme/env/init-defpackage.scm scheme/more-interfaces.scm \
'$(INITIAL)' '$(INITIAL)'
### Fake targets: all clean install man dist ### 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 install-cig \ inst-vm: $(VM)
inst-image
inst-vm:
$(INSTALL_PROGRAM) $(VM) $(LIB) $(INSTALL_PROGRAM) $(VM) $(LIB)
inst-image: inst-image: $(IMAGE)
rm -f '/tmp/$(IMAGE)' && \ $(INSTALL_DATA) $(IMAGE) $(LIB)
build/build-usual-image . '$(LIB)' '/tmp/$(IMAGE)' './$(VM)' \
'$(INITIAL)' && \
$(INSTALL_DATA) /tmp/$(IMAGE) $(LIB) && \
rm /tmp/$(IMAGE)
inst-man:
inst-man: $(MANPAGE)
if [ -d $(mandir) -a -w $(mandir) ]; then \ if [ -d $(mandir) -a -w $(mandir) ]; then \
sed 's=LBIN=$(bindir)=g' doc/scheme48.man | \ sed 's=LBIN=$(bindir)=g' doc/scheme48.man | \
sed 's=LLIB=$(LIB)=g' | \ sed 's=LLIB=$(LIB)=g' | \
@ -327,7 +320,7 @@ inst-man:
fi fi
inst-inc: inst-inc:
$(INSTALL_DATA) c/scheme48.h $(incdir) $(INSTALL_DATA) $(srcdir)/c/scheme48.h $(incdir)
install-cig: cig install-cig: cig
$(INSTALL_PROGRAM) $(srcdir)/$(CIG) $(LIB)/cig $(INSTALL_PROGRAM) $(srcdir)/$(CIG) $(LIB)/cig
@ -374,7 +367,7 @@ dirs:
echo "$(LIB) not a writable directory" >&2; \ echo "$(LIB) not a writable directory" >&2; \
exit 1; \ exit 1; \
} }
for dir in rts env big opt misc link; do \ for dir in rts env big opt misc link scsh; do \
{ mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \ { mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \
echo "$(LIB)/$$dir not a writable directory" >&2; \ echo "$(LIB)/$$dir not a writable directory" >&2; \
exit 1; \ exit 1; \
@ -383,7 +376,7 @@ dirs:
configure: configure.in configure: configure.in
autoheader && autoconf autoheader && autoconf
#JMG: clean cig and the scsh too
clean: clean-cig clean-scsh clean: clean-cig clean-scsh
-rm -f $(VM) *.o c/unix/*.o c/*.o c/fake/*.o \ -rm -f $(VM) *.o c/unix/*.o c/*.o c/fake/*.o \
TAGS $(IMAGE) \ TAGS $(IMAGE) \
@ -391,6 +384,7 @@ clean: clean-cig clean-scsh
scheme/debug/*.image scheme/debug/*.debug \ scheme/debug/*.image scheme/debug/*.debug \
scheme/vm/scheme48vm.c scheme/vm/scheme48heap.c \ scheme/vm/scheme48vm.c scheme/vm/scheme48heap.c \
go $(distname) go $(distname)
clean-cig: clean-cig:
-rm -f cig/*.o $(CIG) $(CIG).image $(LIBCIG) -rm -f cig/*.o $(CIG) $(CIG).image $(LIBCIG)
@ -400,7 +394,7 @@ clean-scm2c:
scsh/sighandlers.c scsh/rx/re-low.c scsh/sighandlers.c scsh/rx/re-low.c
#JMG: moved config.cache to distclean #JMG: moved config.cache to distclean for easier debugging
distclean: clean distclean: clean
rm -f Makefile config.log config.status c/sysdep.h config.cache rm -f Makefile config.log config.status c/sysdep.h config.cache
@ -654,7 +648,6 @@ c/old-scheme48.h: scheme/vm/arch.scm scheme/vm/data.scm \
# Never called automatically. Do not use unless you are sure you # Never called automatically. Do not use unless you are sure you
# know what you are doing. # know what you are doing.
# Afterwards, you should probably make c/scheme48.h. # Afterwards, you should probably make c/scheme48.h.
i-know: i-know-what-i-am-doing
i-know-what-i-am-doing: i-know-what-i-am-doing:
cd ps-compiler && \ cd ps-compiler && \
(echo ',batch'; \ (echo ',batch'; \
@ -666,6 +659,7 @@ i-know-what-i-am-doing:
echo ',exit' \ echo ',exit' \
) | $(RUNNABLE) -h 5000000 && \ ) | $(RUNNABLE) -h 5000000 && \
mv ../scheme/vm/scheme48vm.c ../scheme/vm/scheme48heap.c ../c mv ../scheme/vm/scheme48vm.c ../scheme/vm/scheme48heap.c ../c
cig: $(CIG) $(CIG).image $(LIBCIG) cig: $(CIG) $(CIG).image $(LIBCIG)
@ -800,9 +794,6 @@ loads = $(srcdir)/scsh/let-opt.scm $(srcdir)/scsh/scsh-interfaces.scm \
$(srcdir)/scsh/lib/list-pack.scm \ $(srcdir)/scsh/lib/list-pack.scm \
$(srcdir)/scsh/lib/ccp-pack.scm $(srcdir)/scsh/lib/ccp-pack.scm
#JMG : not anymore appropriate
#echo ",open external-calls"; \
# echo "(lookup-all-externals)"; \
bs: build/build-scsh-image bs: build/build-scsh-image
sh $(srcdir)/build/build-scsh-image "$(srcdir)" "$(LIB)" "$(IMAGE)" \ sh $(srcdir)/build/build-scsh-image "$(srcdir)" "$(LIB)" "$(IMAGE)" \
@ -838,8 +829,6 @@ scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image
echo ",batch off"; \ echo ",batch off"; \
echo ",open scsh-top-package"; \ echo ",open scsh-top-package"; \
echo ",keep names maps files source tabulate"; \ echo ",keep names maps files source tabulate"; \
echo ",dump scsh06.image"; \
echo ",keep names maps files source tabulate"; \
echo "(dump-scsh \"scsh/scsh.image\")"; \ echo "(dump-scsh \"scsh/scsh.image\")"; \
echo ",batch on") \ echo ",batch on") \
| ./$(VM) -o ./$(VM) -i $(CIG).image -h 10000000 | ./$(VM) -o ./$(VM) -i $(CIG).image -h 10000000