diff options
author | dos-reis <gdr@axiomatics.org> | 2007-10-10 07:22:10 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-10-10 07:22:10 +0000 |
commit | 371a162e7759102786eca794c46ac28c3dc68789 (patch) | |
tree | 1b74574099c7481abf1e59fa54e4a02212d51ace /src/interp | |
parent | ec3275dadba53ec37908b049d11833f20f5dc857 (diff) | |
download | open-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/interp')
-rw-r--r-- | src/interp/ChangeLog | 29 | ||||
-rw-r--r-- | src/interp/Makefile.in | 22 | ||||
-rw-r--r-- | src/interp/Makefile.pamphlet | 22 | ||||
-rw-r--r-- | src/interp/bookvol5.pamphlet | 4 | ||||
-rw-r--r-- | src/interp/br-data.boot.pamphlet | 8 | ||||
-rw-r--r-- | src/interp/br-saturn.boot.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/br-search.boot.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/daase.lisp.pamphlet | 16 | ||||
-rw-r--r-- | src/interp/ht-root.boot.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/htcheck.boot.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot.pamphlet | 5 | ||||
-rw-r--r-- | src/interp/patches.lisp.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 65 | ||||
-rw-r--r-- | src/interp/util.lisp.pamphlet | 2 |
14 files changed, 148 insertions, 35 deletions
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 |