aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-10-10 07:22:10 +0000
committerdos-reis <gdr@axiomatics.org>2007-10-10 07:22:10 +0000
commit371a162e7759102786eca794c46ac28c3dc68789 (patch)
tree1b74574099c7481abf1e59fa54e4a02212d51ace /src
parentec3275dadba53ec37908b049d11833f20f5dc857 (diff)
downloadopen-axiom-371a162e7759102786eca794c46ac28c3dc68789.tar.gz
2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
* configure.ac.pamphlet: Tidy. Don't instantiate src/lisp/core.lisp. * configure.ac: Regenerate. * configure: Likewise. * config/var-def.mk (open_axiom_installdir): New. (AXIOM): Support versioning. * Makefile.pamphlet (install): Tidy. Remove sections on SPAD and SYS variables. * Makefile.in: Regenerate. src/algebra/ 2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu> * Makefile.pamphlet (INTERPSYS): Now take system root directory and algebra directory as arguments. * Makefile.in: Regenerate. src/etc/ 2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu> * Makefile.pamphlet (INTERPSYS): Take system root directory and algebra directory as arguments. * Makefile.in: Regenerate. src/interp/ 2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu> * bookvol5.pamphlet (initroot): Use |systemRootDirectory| instead of environment variable AXIOM. (|loadExposureGroupData|): Likewise. * br-data.boot.pamphlet (dbHasExamplePage): Likewise. (dbRead): Likewise. (dbReadComments): Likewise. (buildGloss): Likewise. * br-saturn.boot.pamphlet (getSaturnExampleList): Likewise. * br-search.boot.pamphlet (grepSplit): Likewise. * daase.lisp.pamphlet (asharp): Likewise. (initial-getdatabase): Likewise. (DaaseName): Likewise. (create-initializers): Likewise. * ht-root.boot.pamphlet (htGlossPage): Likewise. * htcheck.boot.pamphlet (buildHtMacroTable): Likewise. * i-syscmd.boot.pamphlet (summary): Likewise. (copyright): Likewise. * patches.lisp.pamphlet (restart0): Likewise. * util.lisp.pamphlet (sourcepath): Likewise. * Makefile.pamphlet (OBJS): Include sys-driver.$(FASLEXT). (${SAVESYS}): Tidy. (${AXIOMSYS}): Likewise. (${DEPSYS}): Depend on sys-driver.$(FASLEXT). Load it. (sys-driver.$(FASLEXT)): New rule. * Makefile.in: Regenerate. * sys-driver.boot: New. src/lisp/ 2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu> * core.lisp.in (|%systemOptions|): New. (|%systemArguments|): Likewise. (|$systemInstallationDirectory|): Likewise. (|$sysOpts|): Likewise. (|$sysArgs|): Likewise. (|handleCommandLine|): Tidy. (|printUsage|): Update. * Makefile.pamphlet (core.lisp): Instantiate here. src/script/ 2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu> * axiom.in (AXIOM): Use value substituted by Autoconf. Remove dead code.
Diffstat (limited to 'src')
-rw-r--r--src/algebra/ChangeLog6
-rw-r--r--src/algebra/Makefile.in6
-rw-r--r--src/algebra/Makefile.pamphlet6
-rw-r--r--src/etc/ChangeLog6
-rw-r--r--src/etc/Makefile.in6
-rw-r--r--src/etc/Makefile.pamphlet6
-rw-r--r--src/interp/ChangeLog29
-rw-r--r--src/interp/Makefile.in22
-rw-r--r--src/interp/Makefile.pamphlet22
-rw-r--r--src/interp/bookvol5.pamphlet4
-rw-r--r--src/interp/br-data.boot.pamphlet8
-rw-r--r--src/interp/br-saturn.boot.pamphlet2
-rw-r--r--src/interp/br-search.boot.pamphlet2
-rw-r--r--src/interp/daase.lisp.pamphlet16
-rw-r--r--src/interp/ht-root.boot.pamphlet2
-rw-r--r--src/interp/htcheck.boot.pamphlet2
-rw-r--r--src/interp/i-syscmd.boot.pamphlet5
-rw-r--r--src/interp/patches.lisp.pamphlet2
-rw-r--r--src/interp/sys-driver.boot65
-rw-r--r--src/interp/util.lisp.pamphlet2
-rw-r--r--src/lisp/ChangeLog11
-rw-r--r--src/lisp/Makefile.in14
-rw-r--r--src/lisp/Makefile.pamphlet14
-rw-r--r--src/lisp/core.lisp.in55
-rw-r--r--src/scripts/ChangeLog5
-rw-r--r--src/scripts/axiom.in41
26 files changed, 257 insertions, 102 deletions
diff --git a/src/algebra/ChangeLog b/src/algebra/ChangeLog
index 9b180d13..4fa56e90 100644
--- a/src/algebra/ChangeLog
+++ b/src/algebra/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * Makefile.pamphlet (INTERPSYS): Now take system root directory
+ and algebra directory as arguments.
+ * Makefile.in: Regenerate.
+
2007-09-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.pamphlet (DEPSYS): Remove.
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index 9fdcb0ea..2ea676a4 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -13,10 +13,8 @@ EXTRACT_BOOTSTRAP_FILE = \
COMPILE_LISP = ../interp/interpsys$(EXEEXT) -- --compile --output=$@ $<
-INTERPSYS = \
- AXIOM="$(AXIOM)" \
- DAASE="$(axiom_src_datadir)" \
- ../interp/interpsys$(EXEEXT)
+INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \
+ --sysalg="$(axiom_src_datadir)/algebra/"
SPADFILES= \
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 4eb64bb1..5e3d9ad0 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -1326,10 +1326,8 @@ files.
<<environment>>=
-INTERPSYS = \
- AXIOM="$(AXIOM)" \
- DAASE="$(axiom_src_datadir)" \
- ../interp/interpsys$(EXEEXT)
+INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \
+ --sysalg="$(axiom_src_datadir)/algebra/"
@
diff --git a/src/etc/ChangeLog b/src/etc/ChangeLog
index 223ab96f..318967b8 100644
--- a/src/etc/ChangeLog
+++ b/src/etc/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * Makefile.pamphlet (INTERPSYS): Take system root directory and
+ algebra directory as arguments.
+ * Makefile.in: Regenerate.
+
2007-08-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.pamphlet ($(axiom_targetdir)/algebra/*.daase): Don't
diff --git a/src/etc/Makefile.in b/src/etc/Makefile.in
index f67bc3a7..66e93c63 100644
--- a/src/etc/Makefile.in
+++ b/src/etc/Makefile.in
@@ -1,7 +1,5 @@
-INTERPSYS= \
- AXIOM="$(AXIOM)" \
- DAASE="$(axiom_src_datadir)" \
- ../interp/interpsys$(EXEEXT)
+INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \
+ --sysalg="$(axiom_src_datadir)/algebra/"
subdir = src/etc/
diff --git a/src/etc/Makefile.pamphlet b/src/etc/Makefile.pamphlet
index e8efe4af..a47a7172 100644
--- a/src/etc/Makefile.pamphlet
+++ b/src/etc/Makefile.pamphlet
@@ -90,10 +90,8 @@ asq.c: $(srcdir)/asq.c.pamphlet
@
<<*>>=
-INTERPSYS= \
- AXIOM="$(AXIOM)" \
- DAASE="$(axiom_src_datadir)" \
- ../interp/interpsys$(EXEEXT)
+INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \
+ --sysalg="$(axiom_src_datadir)/algebra/"
subdir = src/etc/
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog
index c8196599..5764493d 100644
--- a/src/interp/ChangeLog
+++ b/src/interp/ChangeLog
@@ -1,3 +1,32 @@
+2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * bookvol5.pamphlet (initroot): Use |systemRootDirectory| instead
+ of environment variable AXIOM.
+ (|loadExposureGroupData|): Likewise.
+ * br-data.boot.pamphlet (dbHasExamplePage): Likewise.
+ (dbRead): Likewise.
+ (dbReadComments): Likewise.
+ (buildGloss): Likewise.
+ * br-saturn.boot.pamphlet (getSaturnExampleList): Likewise.
+ * br-search.boot.pamphlet (grepSplit): Likewise.
+ * daase.lisp.pamphlet (asharp): Likewise.
+ (initial-getdatabase): Likewise.
+ (DaaseName): Likewise.
+ (create-initializers): Likewise.
+ * ht-root.boot.pamphlet (htGlossPage): Likewise.
+ * htcheck.boot.pamphlet (buildHtMacroTable): Likewise.
+ * i-syscmd.boot.pamphlet (summary): Likewise.
+ (copyright): Likewise.
+ * patches.lisp.pamphlet (restart0): Likewise.
+ * util.lisp.pamphlet (sourcepath): Likewise.
+ * Makefile.pamphlet (OBJS): Include sys-driver.$(FASLEXT).
+ (${SAVESYS}): Tidy.
+ (${AXIOMSYS}): Likewise.
+ (${DEPSYS}): Depend on sys-driver.$(FASLEXT). Load it.
+ (sys-driver.$(FASLEXT)): New rule.
+ * Makefile.in: Regenerate.
+ * sys-driver.boot: New.
+
2007-09-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.pamphlet (<<bc-matrix.clisp>>): Remove.
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index 66f21c7e..f7a4099e 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -49,7 +49,7 @@ SAVESYS= interpsys$(EXEEXT)
AXIOMSYS= $(axiom_target_bindir)/AXIOMsys$(EXEEXT)
OBJS= vmlisp.$(FASLEXT) hash.$(FASLEXT) \
- diagnostics.$(FASLEXT) \
+ diagnostics.$(FASLEXT) sys-driver.$(FASLEXT) \
macros.$(FASLEXT) \
unlisp.$(FASLEXT) setq.$(FASLEXT) \
astr.$(FASLEXT) bits.$(FASLEXT) \
@@ -308,9 +308,10 @@ makeint.lisp: ${DEPSYS} ${OBJS} bookvol5.$(FASLEXT) util.$(FASLEXT) \
@ echo '(gbc t)' >> makeint.lisp
${SAVESYS}: makeint.lisp
- AXIOM="$(AXIOM)" DAASE="$(axiom_src_datadir)" \
- $(LOADSYS) -- --make --output=$@ --main="BOOT::RESTART" \
- --load-directory=. makeint.lisp
+ $(LOADSYS) -- --system="$(AXIOM)/" \
+ --sysalg="$(axiom_src_datadir)/algebra/" \
+ --make --output=$@ --main="BOOT::RESTART" \
+ --load-directory=. makeint.lisp
@ echo 6 ${SAVESYS} created
$(mkinstalldirs) $(axiom_target_bindir)
depsys_lisp_sources += parsing.lisp metalex.lisp bootlex.lisp \
@@ -339,6 +340,7 @@ ${DEPSYS}: vmlisp.$(FASLEXT) \
boot-pkg.$(FASLEXT) \
sys-constants.$(FASLEXT) \
sys-globals.$(FASLEXT) \
+ sys-driver.$(FASLEXT) \
diagnostics.$(FASLEXT) \
sys-macros.$(FASLEXT) \
macros.$(FASLEXT) \
@@ -366,6 +368,7 @@ ${DEPSYS}: vmlisp.$(FASLEXT) \
@ echo 3 making ${DEPSYS}
@ rm -f makedep.lisp
@ $(mkinstalldirs) $(axiom_build_bindir)
+ @ echo '(|importModule| "sys-driver")' >> makedep.lisp
@ echo '(|importModule| "vmlisp")' >> makedep.lisp
@ echo '(|importModule| "bits")' >> makedep.lisp
@ echo '(|importModule| "hash")' >> makedep.lisp
@@ -422,9 +425,11 @@ nocompil.$(FASLEXT): nocompil.lisp boot-pkg.$(FASLEXT)
all-axiomsys: ${AXIOMSYS}
${AXIOMSYS}: makeint.lisp
- AXIOM="$(AXIOM)" DAASE="$(axiom_targetdir)" \
- $(LOADSYS) -- --make --output=$@ --main="BOOT::RESTART" \
- --load-directory=. makeint.lisp
+ $(LOADSYS) -- \
+ --system="$(AXIOM)/" \
+ --sysalg="$(axiom_targetdir)/algebra/" \
+ --make --output=$@ --main="BOOT::RESTART" \
+ --load-directory=. makeint.lisp
@ echo 6a ${AXIOMSYS} created
exposed.lsp: $(axiom_src_algdir)/exposed.lsp.pamphlet
@ echo 615 making exposed.lsp from $(axiom_src_algdir)/exposed.lsp.pamphlet
@@ -556,6 +561,9 @@ diagnostics.$(FASLEXT): diagnostics.boot sys-constants.$(FASLEXT) \
sys-globals.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
+sys-driver.$(FASLEXT): sys-driver.boot boot-pkg.$(FASLEXT)
+ $(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
+
sys-globals.$(FASLEXT): sys-globals.boot sys-constants.$(FASLEXT) \
hash.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index c10dc169..23651987 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -322,7 +322,7 @@ interpreted) in [[depsys]].
<<environment>>=
OBJS= vmlisp.$(FASLEXT) hash.$(FASLEXT) \
- diagnostics.$(FASLEXT) \
+ diagnostics.$(FASLEXT) sys-driver.$(FASLEXT) \
macros.$(FASLEXT) \
unlisp.$(FASLEXT) setq.$(FASLEXT) \
astr.$(FASLEXT) bits.$(FASLEXT) \
@@ -972,6 +972,7 @@ ${DEPSYS}: vmlisp.$(FASLEXT) \
boot-pkg.$(FASLEXT) \
sys-constants.$(FASLEXT) \
sys-globals.$(FASLEXT) \
+ sys-driver.$(FASLEXT) \
diagnostics.$(FASLEXT) \
sys-macros.$(FASLEXT) \
macros.$(FASLEXT) \
@@ -999,6 +1000,7 @@ ${DEPSYS}: vmlisp.$(FASLEXT) \
@ echo 3 making ${DEPSYS}
@ rm -f makedep.lisp
@ $(mkinstalldirs) $(axiom_build_bindir)
+ @ echo '(|importModule| "sys-driver")' >> makedep.lisp
@ echo '(|importModule| "vmlisp")' >> makedep.lisp
@ echo '(|importModule| "bits")' >> makedep.lisp
@ echo '(|importModule| "hash")' >> makedep.lisp
@@ -1099,9 +1101,10 @@ makeint.lisp: ${DEPSYS} ${OBJS} bookvol5.$(FASLEXT) util.$(FASLEXT) \
@ echo '(gbc t)' >> makeint.lisp
${SAVESYS}: makeint.lisp
- AXIOM="$(AXIOM)" DAASE="$(axiom_src_datadir)" \
- $(LOADSYS) -- --make --output=$@ --main="BOOT::RESTART" \
- --load-directory=. makeint.lisp
+ $(LOADSYS) -- --system="$(AXIOM)/" \
+ --sysalg="$(axiom_src_datadir)/algebra/" \
+ --make --output=$@ --main="BOOT::RESTART" \
+ --load-directory=. makeint.lisp
@ echo 6 ${SAVESYS} created
$(mkinstalldirs) $(axiom_target_bindir)
@
@@ -1119,9 +1122,11 @@ are re-generated after leaving \File{interp/} directory.
all-axiomsys: ${AXIOMSYS}
${AXIOMSYS}: makeint.lisp
- AXIOM="$(AXIOM)" DAASE="$(axiom_targetdir)" \
- $(LOADSYS) -- --make --output=$@ --main="BOOT::RESTART" \
- --load-directory=. makeint.lisp
+ $(LOADSYS) -- \
+ --system="$(AXIOM)/" \
+ --sysalg="$(axiom_targetdir)/algebra/" \
+ --make --output=$@ --main="BOOT::RESTART" \
+ --load-directory=. makeint.lisp
@ echo 6a ${AXIOMSYS} created
@
@@ -2024,6 +2029,9 @@ diagnostics.$(FASLEXT): diagnostics.boot sys-constants.$(FASLEXT) \
sys-globals.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
+sys-driver.$(FASLEXT): sys-driver.boot boot-pkg.$(FASLEXT)
+ $(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
+
sys-globals.$(FASLEXT): sys-globals.boot sys-constants.$(FASLEXT) \
hash.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
diff --git a/src/interp/bookvol5.pamphlet b/src/interp/bookvol5.pamphlet
index 8ed64eba..411fa27f 100644
--- a/src/interp/bookvol5.pamphlet
+++ b/src/interp/bookvol5.pamphlet
@@ -763,7 +763,7 @@ Sets up the system to use the {\bf AXIOM} shell variable if we can
and default to the {\bf \$spadroot} variable (which was the value
of the {\bf AXIOM} shell variable at build time) if we can't.
<<defun initroot>>=
-(defun initroot (&optional (newroot (BOOT::|getEnv| "AXIOM")))
+(defun initroot (&optional (newroot (|systemRootDirectory|)))
(reroot (or newroot $spadroot (error "setenv AXIOM or (setq $spadroot)"))))
@
@@ -783,7 +783,7 @@ of the {\bf AXIOM} shell variable at build time) if we can't.
(defun |loadExposureGroupData| ()
(cond
((load "./exposed.lsp" :verbose NIL :if-does-not-exist NIL) '|done|)
- ((load (concat (BOOT::|getEnv| "AXIOM") "/../../src/algebra/exposed.lsp")
+ ((load (concat (|systemRootDirectory|) "/../../src/algebra/exposed.lsp")
:verbose nil :if-does-not-exist nil) '|done|)
(t nil) ))
diff --git a/src/interp/br-data.boot.pamphlet b/src/interp/br-data.boot.pamphlet
index a5490ee7..4058c4e1 100644
--- a/src/interp/br-data.boot.pamphlet
+++ b/src/interp/br-data.boot.pamphlet
@@ -261,12 +261,12 @@ dbHasExamplePage conname ==
sname := STRINGIMAGE conname
abb := constructor? conname
ucname := UPCASE STRINGIMAGE abb
- pathname :=STRCONC(getEnv '"AXIOM",'"/share/hypertex/pages/",ucname,'".ht")
+ pathname :=STRCONC(systemRootDirectory(),'"/share/hypertex/pages/",ucname,'".ht")
isExistingFile pathname => INTERN STRCONC(sname,'"XmpPage")
nil
dbRead(n) ==
- instream := MAKE_-INSTREAM STRCONC(getEnv('"AXIOM"), '"/algebra/libdb.text")
+ instream := MAKE_-INSTREAM STRCONC(systemRootDirectory(), '"/algebra/libdb.text")
FILE_-POSITION(instream,n)
line := READLINE instream
SHUT instream
@@ -274,7 +274,7 @@ dbRead(n) ==
dbReadComments(n) ==
n = 0 => '""
- instream := MAKE_-INSTREAM STRCONC(getEnv('"AXIOM"),'"/algebra/comdb.text")
+ instream := MAKE_-INSTREAM STRCONC(systemRootDirectory(),'"/algebra/comdb.text")
FILE_-POSITION(instream,n)
line := READLINE instream
k := dbTickIndex(line,1,1)
@@ -344,7 +344,7 @@ buildGloss() == --called by buildDatabase (database.boot)
$outStream: local := MAKE_-OUTSTREAM '"temp.text"
$x : local := nil
$attribute? : local := true --do not surround first word
- pathname := STRCONC(getEnv '"AXIOM",'"/algebra/gloss.text")
+ pathname := STRCONC(systemRootDirectory(),'"/algebra/gloss.text")
instream := MAKE_-INSTREAM pathname
keypath := '"glosskey.text"
OBEY STRCONC('"rm -f ",keypath)
diff --git a/src/interp/br-saturn.boot.pamphlet b/src/interp/br-saturn.boot.pamphlet
index 46b53f9d..673a1dd5 100644
--- a/src/interp/br-saturn.boot.pamphlet
+++ b/src/interp/br-saturn.boot.pamphlet
@@ -792,7 +792,7 @@ saturnHasExamplePage conname ==
ASSQ(conname, $exampleConstructors)
getSaturnExampleList() ==
- file := STRCONC( getEnv('"AXIOM"), "/doc/axug/examples.lsp")
+ file := STRCONC(systemRootDirectory(), "/doc/axug/examples.lsp")
not PROBE_-FILE file => nil
fp := MAKE_-INSTREAM file
lst := READ fp
diff --git a/src/interp/br-search.boot.pamphlet b/src/interp/br-search.boot.pamphlet
index f886a96a..e232b231 100644
--- a/src/interp/br-search.boot.pamphlet
+++ b/src/interp/br-search.boot.pamphlet
@@ -220,7 +220,7 @@ isFilterDelimiter? c == MEMQ(c,$pmFilterDelimiters)
grepSplit(lines,doc?) ==
if doc? then
- instream2 := OPEN STRCONC(getEnv '"AXIOM",'"/algebra/libdb.text")
+ instream2 := OPEN STRCONC(systemRootDirectory(),'"/algebra/libdb.text")
cons := atts := doms := nil
while lines is [line, :lines] repeat
if doc? then
diff --git a/src/interp/daase.lisp.pamphlet b/src/interp/daase.lisp.pamphlet
index ed192038..8b40ffed 100644
--- a/src/interp/daase.lisp.pamphlet
+++ b/src/interp/daase.lisp.pamphlet
@@ -319,7 +319,7 @@ database.
(defun asharp (file &optional (flags *asharpflags*))
"call the asharp compiler"
(system::system
- (concatenate 'string (|getEnv| "AXIOM") "/compiler/bin/axiomxl "
+ (concatenate 'string (|systemRootDirectory|) "/compiler/bin/axiomxl "
flags " " file)))
(defun resethashtables ()
@@ -423,7 +423,7 @@ database.
|Integer| |List| |OutputForm|))
(dolist (con constr)
(let ((c (concatenate 'string
- (|getEnv| "AXIOM") "/algebra/"
+ (|systemRootDirectory|) "/algebra/"
(string (getdatabase con 'abbreviation)) ".o")))
(format t " preloading ~a.." c)
(if (probe-file c)
@@ -1247,12 +1247,14 @@ database.
(defun DaaseName (name erase?)
(let (daase filename)
- (declare (special $spadroot))
- (if (setq daase (|getEnv| "DAASE"))
+ (if (setq daase (|systemAlgebraDirectory|))
(progn
- (setq filename (concatenate 'string daase "/algebra/" name))
+ (setq filename (concatenate 'string daase name))
(format t " Using local database ~a.." filename))
- (setq filename (concatenate 'string $spadroot "/algebra/" name)))
+ (setq filename (concatenate 'string
+ (|systemRootDirectory|)
+ "/algebra/"
+ name)))
(when erase? (system::system (concatenate 'string "rm -f " filename)))
filename))
@@ -1792,7 +1794,7 @@ database format.
(set (foam::axiomxl-file-init-name "filecliq") NOPfuncall)
(set (foam::axiomxl-file-init-name "attrib") NOPfuncall)
;; following needs to happen inside restart since $AXIOM may change
- (let ((asharprootlib (strconc (|getEnv| "AXIOM") "/aldor/lib/")))
+ (let ((asharprootlib (strconc (|systemRootDirectory|) "/aldor/lib/")))
(set-file-getter (strconc asharprootlib "runtime"))
(set-file-getter (strconc asharprootlib "lang"))
(set-file-getter (strconc asharprootlib "attrib"))
diff --git a/src/interp/ht-root.boot.pamphlet b/src/interp/ht-root.boot.pamphlet
index 3d8d08af..e8c27ee0 100644
--- a/src/interp/ht-root.boot.pamphlet
+++ b/src/interp/ht-root.boot.pamphlet
@@ -158,7 +158,7 @@ htGlossPage(htPage,pattern,tryAgain?) ==
results := applyGrep(grepForm,'gloss)
--pathname := STRCONC('"/tmp/",PNAME resultFile,'".text.", getEnv '"SPADNUM")
--instream := MAKE_-INSTREAM pathname
- defstream := MAKE_-INSTREAM STRCONC(getEnv '"AXIOM",'"/algebra/glossdef.text")
+ defstream := MAKE_-INSTREAM STRCONC(systemRootDirectory(),'"/algebra/glossdef.text")
lines := gatherGlossLines(results,defstream)
-- OBEY STRCONC('"rm -f ", pathname)
--PROBE_-FILE(pathname) and DELETE_-FILE(pathname)
diff --git a/src/interp/htcheck.boot.pamphlet b/src/interp/htcheck.boot.pamphlet
index d2dd018c..c78a8db6 100644
--- a/src/interp/htcheck.boot.pamphlet
+++ b/src/interp/htcheck.boot.pamphlet
@@ -99,7 +99,7 @@ $primitiveHtCommands := '(
buildHtMacroTable() ==
$htMacroTable := MAKE_-HASHTABLE 'UEQUAL
- fn := CONCAT(getEnv '"AXIOM", '"/share/hypertex/pages/util.ht")
+ fn := CONCAT(systemRootDirectory(), '"/share/hypertex/pages/util.ht")
if PROBE_-FILE(fn) then
instream := MAKE_-INSTREAM fn
while not EOFP instream repeat
diff --git a/src/interp/i-syscmd.boot.pamphlet b/src/interp/i-syscmd.boot.pamphlet
index 30762926..369ef713 100644
--- a/src/interp/i-syscmd.boot.pamphlet
+++ b/src/interp/i-syscmd.boot.pamphlet
@@ -839,9 +839,10 @@ withAsharpCmd args ==
--% )copyright -- display copyright notice
summary l ==
- OBEY STRCONC ('"cat ",getEnv('"AXIOM"),'"/lib/summary")
+ OBEY STRCONC ('"cat ", systemRootDirectory(),'"/lib/summary")
+
copyright () ==
- OBEY STRCONC ('"cat ",getEnv('"AXIOM"),'"/lib/copyright")
+ OBEY STRCONC ('"cat ", systemRootDirectory(),'"/lib/copyright")
--% )credits -- display credit list
diff --git a/src/interp/patches.lisp.pamphlet b/src/interp/patches.lisp.pamphlet
index 17a3e1bc..a981bff2 100644
--- a/src/interp/patches.lisp.pamphlet
+++ b/src/interp/patches.lisp.pamphlet
@@ -182,7 +182,7 @@ previous definition.
(operationopen);; all of the operations known to the system
(categoryopen);; answer hasCategory question
(browseopen)
- (let ((asharprootlib (strconc (|getEnv| "AXIOM") "/aldor/lib/")))
+ (let ((asharprootlib (strconc (|systemRootDirectory|) "/aldor/lib/")))
(set-file-getter (strconc asharprootlib "runtime.o"))
(set-file-getter (strconc asharprootlib "lang.o"))
(set-file-getter (strconc asharprootlib "attrib.o"))
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
new file mode 100644
index 00000000..f33d9bc8
--- /dev/null
+++ b/src/interp/sys-driver.boot
@@ -0,0 +1,65 @@
+-- Copyright (C) 2007 Gabriel Dos Reis
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions are
+-- met:
+--
+-- - Redistributions of source code must retain the above copyright
+-- notice, this list of conditions and the following disclaimer.
+--
+-- - Redistributions in binary form must reproduce the above copyright
+-- notice, this list of conditions and the following disclaimer in
+-- the documentation and/or other materials provided with the
+-- distribution.
+--
+-- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+-- names of its contributors may be used to endorse or promote products
+-- derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--
+--
+
+--
+-- This file collects and documents routines common to the driver of
+-- both the OpenAxiom compiler and interpreter.
+--
+
+import '"boot-pkg"
+)package "BOOT"
+
++++ Initialization routine run by the core system before handing off
++++ to the interpreter or compiler.
++++ ??? This part is still in flux.
+AxiomCore::%sysInit() ==
+ SETQ(_*PACKAGE_*, FIND_-PACKAGE '"BOOT")
+
+
++++ Returns the root directory of the running system.
++++ A directory specified on command line takes precedence
++++ over directory specified at configuration time.
+systemRootDirectory() ==
+ dir := ASSOC(Option '"system", %systemOptions()) =>
+ ensureTrailingSlash cdr dir
+ $systemInstallationDirectory
+
+
++++ Returns the system algebra directory, as specified on command
++++ line. nil, otherwise.
+systemAlgebraDirectory() ==
+ dir := ASSOC(Option '"sysalg", %systemOptions()) =>
+ ensureTrailingSlash cdr dir
+ nil
+
+
diff --git a/src/interp/util.lisp.pamphlet b/src/interp/util.lisp.pamphlet
index 80d2443e..b8a81377 100644
--- a/src/interp/util.lisp.pamphlet
+++ b/src/interp/util.lisp.pamphlet
@@ -1499,7 +1499,7 @@ function assumes that \\ can only appear as first character of name.
(defun sourcepath (f)
"find the sourcefile in the system directories"
(let (axiom algebra naglink)
- (setq axiom (|getEnv| "AXIOM"))
+ (setq axiom (|systemRootDirectory|))
(setq algebra (concatenate 'string axiom "/../../src/algebra/" f ".spad"))
(setq naglink (concatenate 'string axiom "/../../src/naglink/" f ".spad"))
(cond
diff --git a/src/lisp/ChangeLog b/src/lisp/ChangeLog
index 10c3a1ee..14dc4c84 100644
--- a/src/lisp/ChangeLog
+++ b/src/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * core.lisp.in (|%systemOptions|): New.
+ (|%systemArguments|): Likewise.
+ (|$systemInstallationDirectory|): Likewise.
+ (|$sysOpts|): Likewise.
+ (|$sysArgs|): Likewise.
+ (|handleCommandLine|): Tidy.
+ (|printUsage|): Update.
+ * Makefile.pamphlet (core.lisp): Instantiate here.
+
2007-09-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
* core.lisp.in (|handleCommandLine|): Return truthvalue on success.
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index d24514e0..870a838d 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -79,9 +79,19 @@ base-lisp$(EXEEXT): core.$(FASLEXT)
$(eval_flags) '(load "core")' \
$(eval_flags) '(|AxiomCore|::|link| "$@" (quote nil) (function |AxiomCore|::|topLevel|))'
+
+axiom_optimize_options = @axiom_optimize_options@
+
+edit = sed \
+ -e 's|@open_axiom_installdir[@]|$(open_axiom_installdir)|g' \
+ -e 's|@axiom_optimize_options[@]|$(axiom_optimize_options)|g' \
+ -e 's|@host[@]|$(host)|g' \
+ -e 's|@build[@]|$(build)|g' \
+ -e 's|@target[@]|$(target)|g'
+
core.lisp: $(srcdir)/core.lisp.in
- cd $(top_builddir) && \
- $(SHELL) ./config.status src/lisp/core.lisp
+ $(edit) $< > $@.tmp
+ $(top_srcdir)/config/move-if-change $@.tmp $@
core.$(FASLEXT): core.lisp
$(AXIOM_LISP) $(quiet_flags) \
diff --git a/src/lisp/Makefile.pamphlet b/src/lisp/Makefile.pamphlet
index aaef2495..76809b71 100644
--- a/src/lisp/Makefile.pamphlet
+++ b/src/lisp/Makefile.pamphlet
@@ -66,9 +66,19 @@ base-lisp$(EXEEXT): core.$(FASLEXT)
$(eval_flags) '(load "core")' \
$(eval_flags) '(|AxiomCore|::|link| "$@" (quote nil) (function |AxiomCore|::|topLevel|))'
+
+axiom_optimize_options = @axiom_optimize_options@
+
+edit = sed \
+ -e 's|@open_axiom_installdir[@]|$(open_axiom_installdir)|g' \
+ -e 's|@axiom_optimize_options[@]|$(axiom_optimize_options)|g' \
+ -e 's|@host[@]|$(host)|g' \
+ -e 's|@build[@]|$(build)|g' \
+ -e 's|@target[@]|$(target)|g'
+
core.lisp: $(srcdir)/core.lisp.in
- cd $(top_builddir) && \
- $(SHELL) ./config.status src/lisp/core.lisp
+ $(edit) $< > $@.tmp
+ $(top_srcdir)/config/move-if-change $@.tmp $@
core.$(FASLEXT): core.lisp
$(AXIOM_LISP) $(quiet_flags) \
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 1cdf990c..3a5ef1ee 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -62,11 +62,15 @@
"warn"
"%hasFeature"
+ "%systemOptions"
+ "%systemArguments"
"$hostPlatform"
"$buildPlatform"
"$targetPlatform"
+ "$systemInstallationDirectory"
+
"getCommandLineArguments"
"processCommandLine"
"handleCommandLine"
@@ -96,6 +100,12 @@
(defconstant |$buildPlatform| "@build@")
(defconstant |$targetPlatform| "@target@")
+;; The directory that contains the final installation directory, as
+;; specified at configuration time (or in exoteric cases, as overriden
+;; on the Make command line).
+(defconstant |$systemInstallationDirectory|
+ "@open_axiom_installdir@/")
+
;; Lisp compiler optimization settings.
(proclaim '(optimize @axiom_optimize_options@))
@@ -144,6 +154,8 @@
;; Ideally we want to handle
;; --help: just print a help menu and exit
;; --version: Print version information and exit
+;; --system=<dir>: specify <dir> as the root directory
+;; --sysalg=<dir>: specify <dir> as directory containing algebras
;; --compile: boot or lisp files
;; --translate: boot files
;; --make: boot, lisp, or fasl files
@@ -349,6 +361,16 @@
;;
;; -*- Command Line Arguments -*-
+
+(defparameter |$sysOpts| nil)
+(defparameter |$sysArgs| nil)
+
+(defun |%systemOptions| ()
+ |$sysOpts|)
+
+(defun |%systemArguments| ()
+ |$sysArgs|)
+
;;
;; Ideally, we would just like to have a traditional command line
;; passing mechanism from the shell to the application. That
@@ -445,7 +467,7 @@
(defun |handleCommandLine| (prog-name options args)
(when (or options args)
- (dolist (opt options t)
+ (dolist (opt options nil)
(cond ((eq (car opt) (|Option| "help")) ; print help, get out of here
(|helpHandler| prog-name))
@@ -460,7 +482,8 @@
(opt-name (car opt))
(request (cons opt-name file-type)))
(unless (|handleRequest| prog-name request options f)
- (return nil)))))
+ (return nil))))
+ (return t))
;; In general, nothing is to be done for option value
;; specification. However, some specifications may require
@@ -482,16 +505,18 @@
;;
;; Print help screen
-(defun |printUsage|(prog-name)
+(defun |printUsage| (prog-name)
(write-line "usage:")
(write-line
- (concatenate 'string prog-name " -- options [files]"))
+ (concatenate 'string prog-name " -- [options] [files]"))
(write-line "option:")
- (write-line " --help print this message")
- (write-line " --compile compile file")
- (write-line " --output=OUT set output file to OUT")
- (write-line " --load-directory=DIR use DIR as search path for modules")
- (write-line " --make create an executable"))
+ (write-line " --help print this message")
+ (write-line " --system=<dir> set <dir> to the root directory of running system")
+ (write-line " --sysalg=<dir> set <dir> to the algebra directory of running system")
+ (write-line " --compile compile file")
+ (write-line " --output=<out> set output file to <out>")
+ (write-line " --load-directory=<dir> use <dir> as search path for modules")
+ (write-line " --make create an executable"))
(defun |helpHandler|(prog-name)
(|printUsage| prog-name)
@@ -633,13 +658,13 @@
;; a filename.
(multiple-value-bind
(options args) (|processCommandLine| (cdr command-args) nil)
+
+ (setq |$sysOpts| options)
+ (setq |$sysArgs| args)
- ;; Push into the system's preferred namespace. Ideally, this should
- ;; be run of initialization code if needed. However, a curiously
- ;; nasty bug in GCL prevents us from expressing the natural semantics
- ;; in a clean way.
- (when (boundp '|$sysScope|)
- (setq *package* (find-package (symbol-value '|$sysScope|))))
+ ;; Run the system-specific initialization.
+ (when (fboundp '|%sysInit|)
+ (funcall '|%sysInit|))
(when (|handleCommandLine| (car command-args) options args)
(|coreQuit| (if (> (|errorCount|) 0) 1 0))))))
diff --git a/src/scripts/ChangeLog b/src/scripts/ChangeLog
index 86419485..736bb6a2 100644
--- a/src/scripts/ChangeLog
+++ b/src/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * axiom.in (AXIOM): Use value substituted by Autoconf.
+ Remove dead code.
+
2007-09-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
* document.in (TANGLE): New environment variable. Use in place
diff --git a/src/scripts/axiom.in b/src/scripts/axiom.in
index 29d896bb..1fda6803 100644
--- a/src/scripts/axiom.in
+++ b/src/scripts/axiom.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Start everything for Axiom.
+# Start everything for OpenAxiom.
#
# axiom
# [-ht |-noht] whether to use HyperDoc
@@ -23,13 +23,13 @@
#
#
-## Where The Axiom system resides
+## Where The OpenAxiom system resides
prefix=@prefix@
exec_prefix=@exec_prefix@
-AXIOM=@libdir@/open-axiom/target/@target@
+AXIOM=@open_axiom_installdir@
export AXIOM
-## We adjust the value of PATH here because, currently, some Axiom
+## We adjust the value of PATH here because, currently, some OpenAxiom
## programs are called from the executing shell, and relying on the
## fact that the executables are reachable from the PATH.
PATH=$AXIOM/bin:$PATH
@@ -88,29 +88,6 @@ if [ "$*" = "-h" ] ; then
showuse
fi
-if [ "$SPAD" = "" ] ; then
- if [ "$AXIOM" = "" ] ; then
- echo "AXIOM variable is not set"
- exit 1
- else
- SPAD=$AXIOM
- fi
- export SPAD
-else
- if [ "$AXIOM" = "" ] ; then
- echo "AXIOM variable is not set"
- echo "but SPAD = $SPAD"
- echo "Using AXIOM = $SPAD"
- AXIOM=$SPAD
- export AXIOM
- else
- if [ ! "$SPAD" = "$AXIOM" ] ; then
- echo "ignoring SPAD variable"
- SPAD=$AXIOM
- fi
- fi
-fi
-
if [ "$AXIOMXLROOT" = "" ] ; then
AXIOMXLROOT=${AXIOM}/compiler
fi
@@ -120,13 +97,13 @@ export PATH
-if [ ! -d "$SPAD" ] ; then
- echo "The directory for Axiom, $SPAD, does not exist."
+if [ ! -d "$AXIOM" ] ; then
+ echo "The directory for OpenAxiom, $AXIOM, does not exist."
ciao
fi
# Name the workspace directories.
-rootwsdir=$SPAD/bin
+rootwsdir=$AXIOM/bin
# 2. Process command line arguments.
@@ -204,12 +181,12 @@ fi
if [ $go = no ] ; then
echo "Would now start the processes."
- echo exec $SPAD/bin/sman $otheropts -ws $serverws
+ echo exec $AXIOM/bin/sman $otheropts -ws $serverws
exit 0
fi
if [ $use_sman = "yes" ]; then
- exec $SPAD/bin/sman $otheropts -ws $serverws
+ exec $AXIOM/bin/sman $otheropts -ws $serverws
else
exec $serverws
fi