aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-23 19:50:13 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-23 19:50:13 +0000
commit987fcf6e7e42c0cf2fca3fa79a92d9cb8fa93a53 (patch)
tree5fe01b4f4e6ae92e6ec46b275e35562b242d7edb /src
parentdd7e3debcd9bd8360dbd90b8a057544ec54eb67c (diff)
downloadopen-axiom-987fcf6e7e42c0cf2fca3fa79a92d9cb8fa93a53.tar.gz
* interp/sys-driver.boot (initializeDatabases): Load initidb if
specified. * interp/database.boot (populateDFFromFile): Remove. (printAllInitdbInfo): Write as as Lisp file. * algebra/Makefile.in (COMPILE_SPAD): initdb is now a FASL. (BOOTSTRAP): Likewise. (strap-2/%.$(FASLEXT)): Likewise. (initdb.$(FASLEXT)): New.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/algebra/Makefile.in20
-rw-r--r--src/interp/database.boot17
-rw-r--r--src/interp/sys-driver.boot4
4 files changed, 32 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b14519ec..a68e3b99 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,16 @@
2012-05-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/sys-driver.boot (initializeDatabases): Load initidb if
+ specified.
+ * interp/database.boot (populateDFFromFile): Remove.
+ (printAllInitdbInfo): Write as as Lisp file.
+ * algebra/Makefile.in (COMPILE_SPAD): initdb is now a FASL.
+ (BOOTSTRAP): Likewise.
+ (strap-2/%.$(FASLEXT)): Likewise.
+ (initdb.$(FASLEXT)): New.
+
+2012-05-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/vmlisp.lisp (MAKE-CVEC): Remove.
(GETSTR): Likewise.
* interp/sys-macros.lisp (INTERNL): Likewise.
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index 0077bbde..e76e9473 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -81,15 +81,16 @@ INPUT=../input
DRIVER = ../driver/open-axiom$(EXEEXT)
INTERPSYS = ../interp/interpsys$(EXEEXT)
+BOOTSYS = $(axiom_target_bindir)/bootsys$(EXEEXT)
COMPILE_SPAD = $(DRIVER) --execpath=$(INTERPSYS) \
- --system="$(AXIOM)" --initial-db=initdb.daase \
+ --system="$(AXIOM)" --initial-db=initdb.$(FASLEXT) \
--sysdb="$(axiom_src_datadir)/algebra/" \
--strap=strap-2 --optimize=3 \
--system-algebra --compile $<
BOOTSTRAP = $(DRIVER) --execpath=$(INTERPSYS) \
- --system="$(AXIOM)" --initial-db=initdb.daase \
+ --system="$(AXIOM)" --initial-db=initdb.$(FASLEXT) \
--sysdb="$(axiom_src_datadir)/algebra/" \
--system-algebra --compile
@@ -1134,7 +1135,7 @@ strap-1/%.$(FASLEXT): %.spad | strap-1
rm -rf $*.NRLIB $*-.NRLIB
.PRECIOUS: strap-2/%.$(FASLEXT)
-strap-2/%.$(FASLEXT): %.spad initdb.daase | strap-2
+strap-2/%.$(FASLEXT): %.spad initdb.$(FASLEXT) | strap-2
$(BOOTSTRAP) --strap=strap-1 --sysalg=strap-2 --optimize=3 $< && \
cp $*.NRLIB/code.$(FASLEXT) $@ && \
if test -d $*-.NRLIB; then cp $*-.NRLIB/code.$(FASLEXT) \
@@ -2185,8 +2186,7 @@ stamp: ${SPADFILES} user-stamp ${TESTS}
-rm -f stamp
$(STAMP) stamp
-all-algstrap: all-initdb
- $(MAKE) $(AM_MAKEFLAGS) strap-stamp
+all-algstrap: strap-stamp
.PRECIOUS: $(OUT)/%.$(FASLEXT)
${OUT}/%.$(FASLEXT): %.NRLIB/code.$(FASLEXT)
@@ -2457,19 +2457,23 @@ user-stamp: $(axiom_algebra_layer_user_objects)
.PHONY: all-initdb
-all-initdb: initdb.daase
+all-initdb: initdb.$(FASLEXT)
-initdb.daase: $(SPADFILES)
+initdb.clisp: $(SPADFILES)
$(DRIVER) --execpath=$(INTERPSYS) --system="$(AXIOM)" \
--spad-srcdir=$(OUTSRC) \
--output=initdb.$$$$ --build-initdb && \
$(top_confdir)/move-if-change initdb.$$$$ $@
+initdb.$(FASLEXT): initdb.clisp
+ $(DRIVER) --execpath=$(BOOTSYS) \
+ --compile --output=$@ --load-directory=../interp $<
+
mostlyclean-local:
@rm -f $(OUT)/*.$(FASLEXT) $(OUT)/*.daase
@rm -rf *.NRLIB
@rm -rf *.DAASE *.daase libdb.text
- @rm -rf strap*
+ @rm -rf strap* initdb.*
@rm -f *stamp
clean-local: mostlyclean-local
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 5fbf69d1..a8527d29 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -787,13 +787,6 @@ makeInitialDB [form,kind,abbrev,srcfile] ==
dbSourceFile(db) := srcfile
setAutoLoadProperty form.op
-populateDBFromFile path ==
- try
- dbfile := inputTextFile path
- while (entry := readExpr dbfile) ~= %nothing repeat
- makeInitialDB entry
- finally closeStream dbfile
-
printInitdbInfo(path,dbfile) == main(path,dbfile) where
main(path,dbfile) ==
for x in parseSpadFile path repeat
@@ -803,10 +796,10 @@ printInitdbInfo(path,dbfile) == main(path,dbfile) where
if lhs isnt [.,:.] then lhs := [lhs]
db := constructorDB lhs.op
db = nil => nil
- form := [id for x in lhs.args]
+ args := [id for x in lhs.args]
where id() == (x is [":",x',:.] => x'; x)
- form := [lhs.op,:form]
- prettyPrint([form,dbConstructorKind db,dbAbbreviation db,path],dbfile)
+ data := [[lhs.op,:args],dbConstructorKind db,dbAbbreviation db,path]
+ prettyPrint(['makeInitialDB,quote data],dbfile)
writeNewline dbfile
printAllInitdbInfo(srcdir,dbfile) ==
@@ -814,6 +807,10 @@ printAllInitdbInfo(srcdir,dbfile) ==
or coreError strconc('"no .spad file in directory ",srcdir)
try
out := outputTextFile dbfile
+ prettyPrint(['IMPORT_-MODULE,'"database"],out)
+ writeNewline out
+ prettyPrint(['IN_-PACKAGE,'"BOOT"],out)
+ writeNewline out
for path in paths repeat
printInitdbInfo(NAMESTRING path,out)
finally closeStream out
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index f708ca88..97ae53a6 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -178,11 +178,11 @@ restart() ==
initializeDatabases firstTime? ==
getOptionValue "build-initdb" => nil
- --initdb := getOptionValue "initial-db" => populateDBFromFile initdb
+ --initdb := getOptionValue "initial-db" => LOAD initdb
--FIXME: Ideally we should execute the previous line. The next line is
--FIXME: a short-term stopgap until build dependencies are in place.
if initdb := getOptionValue "initial-db" then
- populateDBFromFile initdb
+ LOAD initdb
not firstTime? => openDatabases()
fillDatabasesInCore()
mkLowerCaseConTable()