Index: v7/src/Makefile.in =================================================================== RCS file: /cvsroot/mit-scheme/mit-scheme/v7/src/Makefile.in,v retrieving revision 1.28 diff -u -r1.28 Makefile.in --- v7/src/Makefile.in 5 Jan 2007 21:19:20 -0000 1.28 +++ v7/src/Makefile.in 20 Jan 2007 23:17:52 -0000 @@ -74,6 +74,43 @@ $(srcdir)/etc/compile.sh $(srcdir) $(srcdir)/etc/build-bands.sh +c: + ( cd microcode && $(MAKE) all ) + $(srcdir)/etc/c-boot-bands.sh + $(srcdir)/etc/c-compile.sh $(srcdir) + $(srcdir)/etc/c-bands.sh + +boot-compiler.com: + $(srcdir)/etc/c-boot-compiler.sh + +c-prepare: boot-compiler.com + $(srcdir)/etc/c-prepare.sh + +c-clean: + ( cd microcode && $(MAKE) distclean ) + # This is a kludge. These files are generated when we first + # configure, but when we reconfigure after cleaning, they need + # to be gone (or the configure script needs not to try to + # overwrite them), and `make distclean' in the microcode + # doesn't touch them. + rm -f compiler/machine compiler/compiler.cbf + rm -f compiler/make.so compiler/make.dylib + rm -f compiler/compiler.pkg compiler/compiler.sf + # This is a kludge because the makefile thinks we need + # utabmd.bin to make utabmd.c, but of course since we won't + # yet have a Scheme compiler by that point we can't produce + # it. + touch microcode/utabmd.bin + touch microcode/utabmd.c + # Clear out the remaining host-fasl files. + (find . -name '*.bin' && \ + find . -name '*.ext' && \ + find . -name '*.com' && \ + find . -name '*.bci' && \ + find . -name '*.pkd' && \ + find . -name '*.fre') \ + xargs rm + mostlyclean clean distclean maintainer-clean: $(srcdir)/Clean.sh $@ $(SUBDIRS) @@ -94,3 +131,4 @@ $(INSTALL_DATA) $(srcdir)/etc/TUTORIAL $(DESTDIR)$(EDETC)/. .PHONY: all mostlyclean clean distclean maintainer-clean tags TAGS install +.PHONY: c c-prepare c-clean Index: v7/src/compiler/machines/C/ctop.scm =================================================================== RCS file: /cvsroot/mit-scheme/mit-scheme/v7/src/compiler/machines/C/ctop.scm,v retrieving revision 1.21 diff -u -r1.21 ctop.scm --- v7/src/compiler/machines/C/ctop.scm 5 Jan 2007 21:19:20 -0000 1.21 +++ v7/src/compiler/machines/C/ctop.scm 20 Jan 2007 23:17:52 -0000 @@ -160,6 +160,7 @@ (call-program* (cons (c-compiler-name) (append (c-compiler-switches) (cons* + "-DCOMPILE_FOR_DYNAMIC_LOADING" "-o" object (list source))))) Index: v7/src/etc/script.scm =================================================================== RCS file: /cvsroot/mit-scheme/mit-scheme/v7/src/etc/script.scm,v retrieving revision 1.4 diff -u -r1.4 script.scm --- v7/src/etc/script.scm 5 Jan 2007 21:19:25 -0000 1.4 +++ v7/src/etc/script.scm 20 Jan 2007 23:17:53 -0000 @@ -32,6 +32,10 @@ ;;; microcode when using the C back end of the compiler. (fluid-let ((compiler:invoke-c-compiler? #f)) + (define (compile-package-descriptions prefix) + (for-each (lambda (suffix) + (cbf (string-append prefix "-" suffix ".pkd"))) + '("unx" "w32" "os2"))) (with-working-directory-pathname "microcode" (lambda () (if (or (not (file-exists? "utabmd.bin")) @@ -44,9 +48,14 @@ (lambda () (load (string-append dir ".sf")) (load (string-append dir ".cbf")) - (cbf (string-append dir "-unx.pkd"))))) - '("runtime" "sf" "cref" "compiler")) + (compile-package-descriptions dir)))) + '("runtime" "sf" "cref")) + (with-working-directory-pathname "compiler" + (lambda () + (load "compiler.sf") + (load "compiler.cbf") + (cbf "compiler-unx.pkd"))) (with-working-directory-pathname "star-parser" (lambda () (load "compile.scm") - (cbf "parser-unx.pkd")))) \ No newline at end of file + (compile-package-descriptions "parser")))) \ No newline at end of file Index: v7/src/microcode/makegen/Makefile.in.in =================================================================== RCS file: /cvsroot/mit-scheme/mit-scheme/v7/src/microcode/makegen/Makefile.in.in,v retrieving revision 1.43 diff -u -r1.43 Makefile.in.in --- v7/src/microcode/makegen/Makefile.in.in 12 Jan 2007 06:30:04 -0000 1.43 +++ v7/src/microcode/makegen/Makefile.in.in 20 Jan 2007 23:17:53 -0000 @@ -175,7 +175,7 @@ ALL_LIBS = $(aux_LIBS) ALL_DATA = $(aux_DATA) -MOSTLYCLEAN_FILES = *.o cmpauxmd.s usrdef.c compinit.h utabmd.c utabmd.bci \ +MOSTLYCLEAN_FILES = *.o cmpauxmd.s usrdef.c compinit.h utabmd.bci \ bchdef.c $(LIARC_OBJECTS) CLEAN_FILES = $(ALL_PROGRAMS) $(ALL_LIBS) $(ALL_DATA) $(EXTRA_PROGRAMS) Index: v7/src/microcode/makegen/makegen.scm =================================================================== RCS file: /cvsroot/mit-scheme/mit-scheme/v7/src/microcode/makegen/makegen.scm,v retrieving revision 1.15 diff -u -r1.15 makegen.scm --- v7/src/microcode/makegen/makegen.scm 12 Jan 2007 02:57:10 -0000 1.15 +++ v7/src/microcode/makegen/makegen.scm 20 Jan 2007 23:17:53 -0000 @@ -73,15 +73,26 @@ (newline output) (newline output) (let ((files - (cons "utabmd" - (enumerate-directories - (read-file "makegen/dirs-liarc.scm"))))) + (append '("utabmd") + (append-map package-description-files + (read-file "makegen/pkds-liarc.scm")) + (enumerate-directories + (read-file "makegen/dirs-liarc.scm"))))) (write-rule "LIARC_SOURCES" "=" (files+suffix files ".c") output) (newline output) (newline output) (write-rule "LIARC_OBJECTS" "=" (files+suffix files ".o") output) (newline output))))) +(define (package-description-files descriptor) + (receive (filename suffixes) + (if (pair? descriptor) + (values (car descriptor) (cdr descriptor)) + (values descriptor '("unx" "w32" "os2"))) + (map (lambda (suffix) + (string-append filename "-" suffix)) + suffixes))) + (define (write-header output) (write-string "# This file automatically generated at " output) (write-string (universal-time->local-iso8601-string (get-universal-time))