diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-02-01 01:55:33 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-02-01 01:55:33 -0800 |
commit | 04be6d65c9bae10780f463c23a14922249c187de (patch) | |
tree | faf083f47c06759bf0cec6d6cced146ae435fd24 /src/interp | |
parent | a41b74b5a5981d91c4e196cbcb5daa96e4123d36 (diff) | |
download | open-axiom-04be6d65c9bae10780f463c23a14922249c187de.tar.gz |
Support ')read' of Boot file
Allow the system command to ')read' a Boot source file: the involves
(1) compiling Boot to machine code
(2) loading the resulting FASL in the current system
Note that if the boot file has any dependency in terms of 'import',
one needs to set up the $LoadDirectories appropriately, or else the
system will crash. In particular, if you're modifying OpenAxiom
source files you need to include the appropriate directories
containing OpenAxiom fasl files.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/cparse.boot | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot index 9e28504d..a98b2ea1 100644 --- a/src/interp/cparse.boot +++ b/src/interp/cparse.boot @@ -1102,15 +1102,19 @@ _/RQ_,LIB(:x) == $Echo: local := false _/RF_-1 nil +readBootFile file == + try + fasl := compileBootHandler(nil,nil,file) or return nil + LOAD fasl + finally + fasl = nil => nil + removeFile filePathString fasl _/RF_-1 x == ifile := makeInputFilename $editFile lfile := nil type := filePathType ifile - type = '"boot" => - lfile := makeFilePath(type <- '"lisp",defaults <- ifile) - BOOT(ifile,lfile) - LOAD lfile + type = '"boot" => readBootFile ifile type = '"lisp" => LOAD ifile type = '"input" => ncINTERPFILE(ifile,$Echo) SPAD ifile |