aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-05-06 05:01:28 +0000
committerdos-reis <gdr@axiomatics.org>2008-05-06 05:01:28 +0000
commitda4adc938b1a233283d8d56dc5192adf48175ba7 (patch)
tree279232831f017307895e80032fe459ba20c8c1a6 /src/lisp
parent0bb3dc5a46dbb26964bb3acb5b30fdcf49b6a2bd (diff)
downloadopen-axiom-da4adc938b1a233283d8d56dc5192adf48175ba7.tar.gz
Bring changes from btx-branch.
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/Makefile.in2
-rw-r--r--src/lisp/core.lisp.in39
2 files changed, 24 insertions, 17 deletions
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 -*-
;;