From 9422c870ff8743eb129b404ba9c98a1ac461386e Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Sun, 17 Jun 1990 12:13:44 +0000 Subject: [PATCH] New compiler compilation hacks. --- tools/hemcom.lisp | 230 +++++++++++++++++++++++----------------------- 1 file changed, 117 insertions(+), 113 deletions(-) diff --git a/tools/hemcom.lisp b/tools/hemcom.lisp index e8ccd4b87..fa69ec2dd 100644 --- a/tools/hemcom.lisp +++ b/tools/hemcom.lisp @@ -2,6 +2,7 @@ ;;; This file compiles all of Hemlock. ;;; +#| (when (ext:get-command-line-switch "slave") (error "Cannot compile Hemlock in a slave due to its clobbering needed typescript routines by renaming the package.")) @@ -10,12 +11,12 @@ ;;; Blast the old packages in case they are around. We do this solely to ;;; prove Hemlock can compile cleanly without its having to exist already. ;;; -(when (find-package "ED") - (rename-package (find-package "ED") "OLD-ED")) -;;; -(when (find-package "HI") - (rename-package (find-package "HI") "OLD-HI")) - +(unless (find-package "OLD-ED") + (when (find-package "ED") + (rename-package (find-package "ED") "OLD-ED")) + (when (find-package "HI") + (rename-package (find-package "HI") "OLD-HI"))) +|# ;;; Stuff to set up the packages Hemlock uses. ;;; @@ -31,119 +32,122 @@ (export '(%sp-byte-blt %sp-find-character %sp-find-character-with-attribute %sp-reverse-find-character-with-attribute)) -(in-package "HEMLOCK-INTERNALS") +(in-package "HI") + +;;; ### bootstrap hack... +(defmacro parse-forms ((decls-var forms-var forms) &body gorms) + "Parse-Forms (Decls-Var Forms-Var Forms) {Form}* + Binds Decls-Var to leading declarations off of Forms and Forms-Var + to what is left." + `(do ((,forms-var ,forms (cdr ,forms-var)) + (,decls-var ())) + ((or (atom ,forms-var) (atom (car ,forms-var)) + (not (eq (caar ,forms-var) 'declare))) + ,@gorms) + (push (car ,forms-var) ,decls-var))) + +(in-package "USER") (pushnew :command-bits *features*) (pushnew :buffered-lines *features*) -(defparameter the-log-file "hem:lossage.log") - -(when (probe-file the-log-file) - (delete-file the-log-file)) -(defun cf (file) - (write-line file) - (finish-output nil) - (let ((*error-output* (open the-log-file - :direction :output - :if-exists :append - :if-does-not-exist :create))) - (unwind-protect - (progn - (compile-file file :error-file nil) - (terpri *error-output*) (terpri *error-output*)) - (close *error-output*)))) +(with-compiler-log-file ("hem:lossage.log") -(cf "hem:struct.lisp") -(cf "hem:struct-ed.lisp") -(cf "hem:rompsite.lisp") -(cf "hem:charmacs.lisp") +(comf "code:globals" :always-once t) +(comf "code:struct" :always-once t) +(comf "hem:struct" :always-once t) +(comf "hem:struct-ed" :always-once t) +(comf "hem:rompsite" :always-once t) +(comf "hem:charmacs" :always-once t) ;; keytran and keytrandefs used to be in rompsite, but they are too big now. ;; They also need to go after charmacs due to the funny characters named. -(cf "hem:keytran.lisp") -(cf "hem:keytrandefs.lisp") -(cf "hem:macros.lisp") -(cf "hem:line.lisp") -(cf "hem:ring.lisp") -(cf "hem:table.lisp") -(cf "hem:htext1.lisp") -(cf "hem:htext2.lisp") -(cf "hem:htext3.lisp") -(cf "hem:htext4.lisp") -(cf "hem:search1.lisp") -(cf "hem:search2.lisp") -(cf "hem:linimage.lisp") -(cf "hem:cursor.lisp") -(cf "hem:syntax.lisp") -(cf "hem:winimage.lisp") -(cf "hem:hunk-draw.lisp") -;(cf "hem:bit-stream.lisp") -(cf "hem:termcap.lisp") -(cf "hem:display.lisp") -(cf "hem:bit-display.lisp") -(cf "hem:tty-disp-rt.lisp") -(cf "hem:tty-display.lisp") -;(cf "hem:tty-stream.lisp") -(cf "hem:pop-up-stream.lisp") -(cf "hem:screen.lisp") -(cf "hem:bit-screen.lisp") -(cf "hem:tty-screen.lisp") -(cf "hem:window.lisp") -(cf "hem:font.lisp") -(cf "hem:interp.lisp") -(cf "hem:vars.lisp") -(cf "hem:buffer.lisp") -(cf "hem:files.lisp") -(cf "hem:streams.lisp") -(cf "hem:echo.lisp") -(cf "hem:main.lisp") -(cf "hem:echocoms.lisp") -(cf "hem:defsyn.lisp") -(cf "hem:command.lisp") -(cf "hem:morecoms.lisp") -(cf "hem:undo.lisp") -(cf "hem:killcoms.lisp") -(cf "hem:searchcoms.lisp") -(cf "hem:filecoms.lisp") -(cf "hem:indent.lisp") -(cf "hem:lispmode.lisp") -(cf "hem:comments.lisp") -(cf "hem:fill.lisp") -(cf "hem:text.lisp") -(cf "hem:doccoms.lisp") -(cf "hem:srccom.lisp") -(cf "hem:group.lisp") -(cf "hem:spell-rt.lisp") -(cf "hem:spell-corr.lisp") -(cf "hem:spell-aug.lisp") -(cf "hem:spell-build.lisp") -(cf "hem:spellcoms.lisp") -(cf "hem:abbrev.lisp") -(cf "hem:overwrite.lisp") -(cf "hem:gosmacs.lisp") -(cf "hem:ts-buf.lisp") -(cf "hem:ts-stream.lisp") -(cf "hem:eval-server.lisp") -(cf "hem:lispbuf.lisp") -(cf "hem:lispeval.lisp") -(cf "hem:kbdmac.lisp") -(cf "hem:icom.lisp") -(cf "hem:hi-integrity.lisp") -(cf "hem:ed-integrity.lisp") -(cf "hem:scribe.lisp") -(cf "hem:pascal.lisp") -(cf "hem:edit-defs.lisp") -(cf "hem:auto-save.lisp") -(cf "hem:register.lisp") -(cf "hem:xcoms.lisp") -(cf "hem:unixcoms.lisp") -(cf "hem:mh.lisp") -(cf "hem:highlight.lisp") -(cf "hem:dired.lisp") -(cf "hem:diredcoms.lisp") -(cf "hem:bufed.lisp") -(cf "hem:lisp-lib.lisp") -(cf "hem:completion.lisp") -(cf "hem:shell.lisp") -(cf "hem:bindings.lisp") +(comf "hem:keytran") +(comf "hem:keytrandefs") +(comf "hem:macros" :always-once t) +(comf "hem:line" :always-once t) +(comf "hem:ring") +(comf "hem:table") +(comf "hem:htext1") +(comf "hem:htext2") +(comf "hem:htext3") +(comf "hem:htext4") +(comf "hem:search1") +(comf "hem:search2") +(comf "hem:linimage") +(comf "hem:cursor") +(comf "hem:syntax") +(comf "hem:winimage") +(comf "hem:hunk-draw") +;(comf "hem:bit-stream") +(comf "hem:termcap") +(comf "hem:display") +(comf "hem:bit-display") +(comf "hem:tty-disp-rt") +(comf "hem:tty-display") +;(comf "hem:tty-stream") +(comf "hem:pop-up-stream") +(comf "hem:screen") +(comf "hem:bit-screen") +(comf "hem:tty-screen") +(comf "hem:window") +(comf "hem:font") +(comf "hem:interp") +(comf "hem:vars") +(comf "hem:buffer") +(comf "hem:files") +(comf "hem:streams") +(comf "hem:echo") +(comf "hem:main") +(comf "hem:echocoms") +(comf "hem:defsyn") +(comf "hem:command") +(comf "hem:morecoms") +(comf "hem:undo") +(comf "hem:killcoms") +(comf "hem:searchcoms") +(comf "hem:filecoms") +(comf "hem:indent") +(comf "hem:lispmode") +(comf "hem:comments") +(comf "hem:fill") +(comf "hem:text") +(comf "hem:doccoms") +(comf "hem:srccom") +(comf "hem:group") +(comf "hem:spell-rt") +(comf "hem:spell-corr") +(comf "hem:spell-aug") +(comf "hem:spell-build") +(comf "hem:spellcoms") +(comf "hem:abbrev") +(comf "hem:overwrite") +(comf "hem:gosmacs") +(comf "hem:ts-buf") +(comf "hem:ts-stream") +(comf "hem:eval-server") +(comf "hem:lispbuf") +(comf "hem:lispeval") +(comf "hem:kbdmac") +(comf "hem:icom") +(comf "hem:hi-integrity") +(comf "hem:ed-integrity") +(comf "hem:scribe") +(comf "hem:pascal") +(comf "hem:edit-defs") +(comf "hem:auto-save") +(comf "hem:register") +(comf "hem:xcoms") +(comf "hem:unixcoms") +(comf "hem:mh") +(comf "hem:highlight") +(comf "hem:dired") +(comf "hem:diredcoms") +(comf "hem:bufed") +(comf "hem:lisp-lib") +(comf "hem:completion") +(comf "hem:shell") +(comf "hem:bindings") + +); With-Compiler-Log-File -- GitLab