diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/lisp/Makefile.in | 2 | ||||
-rw-r--r-- | src/lisp/core.lisp.in | 39 |
3 files changed, 29 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bd8a8f69..3015371a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-05-06 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * lisp/core.lisp.in: Incorporate changes from btx-branch. + * lisp/Makefile.in: Likewise. + 2008-05-04 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/sys-utility.boot (getVMType): Fix thinko. diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in index 2a56b978..46c10a6e 100644 --- a/src/lisp/Makefile.in +++ b/src/lisp/Makefile.in @@ -111,7 +111,7 @@ endif base-lisp$(EXEEXT): core.$(FASLEXT) $(AXIOM_LISP) \ $(eval_flags) '(load "core")' \ - $(eval_flags) '(|AxiomCore|::|link| "$@" (quote $(base_lisp_objects)) (quote |AxiomCore|::|topLevel|))' + $(eval_flags) '(|AxiomCore|::|link| "$@" (quote $(base_lisp_objects)) "|AxiomCore|::|topLevel|")' axiom_optimize_options = @axiom_optimize_options@ diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 8f549803..8cb2f755 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -95,6 +95,7 @@ "pathBasename" "IMPORT-MODULE" + "BOOT-IMPORT" "CONCAT" )) @@ -197,9 +198,6 @@ (|installDriver| key driver))) -;; true if in main program booted -(defvar |$mainBooted| nil) - ;; ;; -*- OpenAxiom Command Line Parsing -*- ;; @@ -487,9 +485,7 @@ (c:build-program core-image :lisp-files (mapcar #'|compileFilePathname| lisp-files) - :epilogue-code `(progn - (setq |$mainBooted| t) - (,entry-point))) + :epilogue-code `(funcall ,entry-point)) (|coreQuit|))) @@ -685,7 +681,6 @@ (|associateRequestWithFileType| (|Option| "compile") |$LispFileType| #'|compileLispHandler|) - ;; ;; -*- Predefined System Entry Point -*- ;; @@ -766,6 +761,12 @@ :name module #-:ecl :type #-:ecl |$faslType|)) +(defun |btxPthaname| (module dir) + (setq dir (|ensureTrailingSlash| dir)) + (make-pathname :directory (pathname-directory dir) + :name module + :type "btx")) + (defun |loadIfPresent| (module) (if (|alreadyLoaded?| module) module @@ -780,18 +781,20 @@ (|noteUnitLoaded| module) module))) +(defun import-module-if-present (module dir) + (or (|loadIfPresent| (|btxPthaname| module dir)) + (|loadIfPresent| (|loadPathname| module dir)))) + (defun do-import-module (module directories) (cond ((null directories) - (unless (and (member :ecl *features* :test #'eq) |$mainBooted|) - (|fatalError| - (format nil - "module ~S not found in search path ~S" - module - |$LoadDirectories|)))) + (|fatalError| + (format nil + "module ~S not found in search path ~S" + module + |$LoadDirectories|))) (t - (let ((p (|loadPathname| module (car directories)))) - (unless (|loadIfPresent| p) - (do-import-module module (cdr directories))))))) + (unless (import-module-if-present module (car directories)) + (do-import-module module (cdr directories)))))) (defun |importModule| (module) (do-import-module module |$LoadDirectories|)) @@ -802,6 +805,10 @@ #-:common-lisp (compile load eval) (|importModule| ,module)))) +(defmacro boot-import (module) + `(eval-when (:compile-toplevel) + (|importModule| ,module))) + ;; ;; -*- Feature Tests in Boot -*- ;; |