summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-24 07:21:38 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-24 07:21:38 -0700
commit2034729c70161b16d99eee0503c4354df39cd49d (patch)
tree400e7b2f7c67625e7ab6da3fe4a16c3257f30eb8
parent65f1445db0d677189ab01635906869bfda56d3d9 (diff)
downloadtxr-2034729c70161b16d99eee0503c4354df39cd49d.tar.gz
txr-2034729c70161b16d99eee0503c4354df39cd49d.tar.bz2
txr-2034729c70161b16d99eee0503c4354df39cd49d.zip
file layout: moving share/txr/stdlib to stdlib.
This affects run-time also. Txr installations where the executable is not in directory ending in ${bindir} will look for stdlib rather than share/txr/stdlib, relative to the determined installation directory. * txr.c (sysroot_init): If we detect relative to the short name, or fall back on the program directory, use stdlib rather than share/txr/stdlib as the stdlib_path. * INSTALL: Update some installation notes not to refer to share/txr/stdlib but stdlib. * Makefile (STDLIB_SRCS): Refer to stdlib, not share/txr/stdlib. (clean): In unconfigured mode, remove the old share/txr/stdlib entirely. Remove .tlo files from stdlib. (install): Install lib materials from stdlib. * txr.1: Updated documentation under Deployment Directory Structure. * share/txr/stdlib/{asm,awk,build,cadr}.tl: Renamed to stdlib/{asm,awk,build,cadr}.tl. * share/txr/stdlib/{compiler,conv,copy-file,debugger}.tl: Renamed to stdlib/{compiler,conv,copy-file,debugger}.tl. * share/txr/stdlib/{defset,doc-lookup,doc-syms,doloop}.tl: Renamed to stdlib/{defset,doc-lookup,doc-syms,doloop}.tl. * share/txr/stdlib/{each-prod,error,except,ffi}.tl: Renamed to stdlib/{each-prod,error,except,ffi}.tl. * share/txr/stdlib/{getopts,getput,hash,ifa}.tl: Renamed to stdlib/{getopts,getput,hash,ifa}.tl. * share/txr/stdlib/{keyparams,match,op,optimize}.tl: Renamed to stdlib/{keyparams,match,op,optimize}.tl. * share/txr/stdlib/{package,param,path-test,pic}.tl: Renamed to stdlib/{package,param,path-test,pic}.tl. * share/txr/stdlib/{place,pmac,quips,save-exe}.tl: Renamed to stdlib/{place,pmac,quips,save-exe}.tl. * share/txr/stdlib/{socket,stream-wrap,struct,tagbody}.tl: Renamed to stdlib/{socket,stream-wrap,struct,tagbody}.tl. * share/txr/stdlib/{termios,trace,txr-case,type}.tl: Renamed to stdlib/{termios,trace,txr-case,type}.tl. * share/txr/stdlib/{ver,vm-param,with-resources,with-stream}.tl: Renamed to stdlib/{ver,vm-param,with-resources,with-stream}.tl. * share/txr/stdlib/yield.tl: Renamed to stdlib/yield.tl. * share/txr/stdlib/{txr-case,ver}.txr: Renamed to stdlib/{txr-case,ver}.txr. * gencadr.txr: Update to stdlib/place.tl. * genman.txr: Update to stdlib/cadr.tl.
-rw-r--r--INSTALL2
-rw-r--r--Makefile6
-rw-r--r--gencadr.txr4
-rw-r--r--genman.txr2
-rw-r--r--stdlib/asm.tl (renamed from share/txr/stdlib/asm.tl)0
-rw-r--r--stdlib/awk.tl (renamed from share/txr/stdlib/awk.tl)0
-rw-r--r--stdlib/build.tl (renamed from share/txr/stdlib/build.tl)0
-rw-r--r--stdlib/cadr.tl (renamed from share/txr/stdlib/cadr.tl)0
-rw-r--r--stdlib/compiler.tl (renamed from share/txr/stdlib/compiler.tl)0
-rw-r--r--stdlib/conv.tl (renamed from share/txr/stdlib/conv.tl)0
-rw-r--r--stdlib/copy-file.tl (renamed from share/txr/stdlib/copy-file.tl)0
-rw-r--r--stdlib/debugger.tl (renamed from share/txr/stdlib/debugger.tl)0
-rw-r--r--stdlib/defset.tl (renamed from share/txr/stdlib/defset.tl)0
-rw-r--r--stdlib/doc-lookup.tl (renamed from share/txr/stdlib/doc-lookup.tl)0
-rw-r--r--stdlib/doc-syms.tl (renamed from share/txr/stdlib/doc-syms.tl)0
-rw-r--r--stdlib/doloop.tl (renamed from share/txr/stdlib/doloop.tl)0
-rw-r--r--stdlib/each-prod.tl (renamed from share/txr/stdlib/each-prod.tl)0
-rw-r--r--stdlib/error.tl (renamed from share/txr/stdlib/error.tl)0
-rw-r--r--stdlib/except.tl (renamed from share/txr/stdlib/except.tl)0
-rw-r--r--stdlib/ffi.tl (renamed from share/txr/stdlib/ffi.tl)0
-rw-r--r--stdlib/getopts.tl (renamed from share/txr/stdlib/getopts.tl)0
-rw-r--r--stdlib/getput.tl (renamed from share/txr/stdlib/getput.tl)0
-rw-r--r--stdlib/hash.tl (renamed from share/txr/stdlib/hash.tl)0
-rw-r--r--stdlib/ifa.tl (renamed from share/txr/stdlib/ifa.tl)0
-rw-r--r--stdlib/keyparams.tl (renamed from share/txr/stdlib/keyparams.tl)0
-rw-r--r--stdlib/match.tl (renamed from share/txr/stdlib/match.tl)0
-rw-r--r--stdlib/op.tl (renamed from share/txr/stdlib/op.tl)0
-rw-r--r--stdlib/optimize.tl (renamed from share/txr/stdlib/optimize.tl)0
-rw-r--r--stdlib/package.tl (renamed from share/txr/stdlib/package.tl)0
-rw-r--r--stdlib/param.tl (renamed from share/txr/stdlib/param.tl)0
-rw-r--r--stdlib/path-test.tl (renamed from share/txr/stdlib/path-test.tl)0
-rw-r--r--stdlib/pic.tl (renamed from share/txr/stdlib/pic.tl)0
-rw-r--r--stdlib/place.tl (renamed from share/txr/stdlib/place.tl)0
-rw-r--r--stdlib/pmac.tl (renamed from share/txr/stdlib/pmac.tl)0
-rw-r--r--stdlib/quips.tl (renamed from share/txr/stdlib/quips.tl)0
-rw-r--r--stdlib/save-exe.tl (renamed from share/txr/stdlib/save-exe.tl)0
-rw-r--r--stdlib/socket.tl (renamed from share/txr/stdlib/socket.tl)0
-rw-r--r--stdlib/stream-wrap.tl (renamed from share/txr/stdlib/stream-wrap.tl)0
-rw-r--r--stdlib/struct.tl (renamed from share/txr/stdlib/struct.tl)0
-rw-r--r--stdlib/tagbody.tl (renamed from share/txr/stdlib/tagbody.tl)0
-rw-r--r--stdlib/termios.tl (renamed from share/txr/stdlib/termios.tl)0
-rw-r--r--stdlib/trace.tl (renamed from share/txr/stdlib/trace.tl)0
-rw-r--r--stdlib/txr-case.tl (renamed from share/txr/stdlib/txr-case.tl)0
-rw-r--r--stdlib/txr-case.txr (renamed from share/txr/stdlib/txr-case.txr)0
-rw-r--r--stdlib/type.tl (renamed from share/txr/stdlib/type.tl)0
-rw-r--r--stdlib/ver.tl (renamed from share/txr/stdlib/ver.tl)0
-rw-r--r--stdlib/ver.txr (renamed from share/txr/stdlib/ver.txr)0
-rw-r--r--stdlib/vm-param.tl (renamed from share/txr/stdlib/vm-param.tl)0
-rw-r--r--stdlib/with-resources.tl (renamed from share/txr/stdlib/with-resources.tl)0
-rw-r--r--stdlib/with-stream.tl (renamed from share/txr/stdlib/with-stream.tl)0
-rw-r--r--stdlib/yield.tl (renamed from share/txr/stdlib/yield.tl)0
-rw-r--r--txr.121
-rw-r--r--txr.c10
53 files changed, 32 insertions, 13 deletions
diff --git a/INSTALL b/INSTALL
index b903e497..e725dbd3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -125,7 +125,7 @@ its .tlo files. Suppose the native TXR is built in a directory called
native-build, and the cross-compiled txr has been built in the cross-build
directory to the point that the executable exists. Simply:
- cp native-build/share/txr/stdlib/*.tlo cross-build/share/txr/stdlib
+ cp native-build/stdlib/*.tlo cross-build/stdlib
then change to the cross-build directory and continue the build with
make install.
diff --git a/Makefile b/Makefile
index e9c122f6..2f09af0f 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ OBJS-$(have_termios) += termios.o
OBJS-$(have_termios) += linenoise/linenoise.o
EXTRA_OBJS-$(add_win_res) += win/txr.res
-STDLIB_SRCS := $(wildcard share/txr/stdlib/*.tl)
+STDLIB_SRCS := $(wildcard stdlib/*.tl)
STDLIB_TLOS := $(patsubst %.tl,%.tlo,$(STDLIB_SRCS))
STDLIB_EARLY_PATS := %/error.tlo # these must be compiled first
@@ -342,7 +342,7 @@ distclean:
$(V)echo "executing generic cleanup for non-configured directory"
rm -f txr txr.exe txr-dbg txr-dbg.exe txr-win.exe txr-win-dbg.exe
rm -f y.tab.c lex.yy.c y.tab.h y.output
- rm -rf config opt dbg share/txr/stdlib/*.tlo* run.sh
+ rm -rf config opt dbg share/*.tlo* share/txr/stdlib run.sh
rm -f config.* reconfigure
rm -rf mpi-1.?.?
else
@@ -498,7 +498,7 @@ install: $(PROG)
$(call INSTALL,0444,$(top_srcdir)METALICENSE,$(DESTDIR)$(datadir))
$(call INSTALL,0444,$(top_srcdir)txr.1,$(DESTDIR)$(mandir)/man1)
$(call INSTALL,0444,\
- $(addprefix share/txr/stdlib/,*.txr *.tl *.tlo),\
+ $(addprefix stdlib/,*.txr *.tl *.tlo),\
$(DESTDIR)$(datadir)/stdlib)
.PHONY: unixtar gnutar zip
diff --git a/gencadr.txr b/gencadr.txr
index 2e242653..4e32045c 100644
--- a/gencadr.txr
+++ b/gencadr.txr
@@ -10,7 +10,7 @@
@(until)
@(end)
-@(next "share/txr/stdlib/place.tl")
+@(next "stdlib/place.tl")
@(collect)
@{tl-copyright}
@(until)
@@ -79,7 +79,7 @@ val c@{ad}r(val);
void cadr_init(void);
@(end)
-@(output "share/txr/stdlib/cadr.tl")
+@(output "stdlib/cadr.tl")
;; This file is generated by gencadr.txr
@{tl-copyright "\n"}
diff --git a/genman.txr b/genman.txr
index c1416baa..33ddf843 100644
--- a/genman.txr
+++ b/genman.txr
@@ -298,7 +298,7 @@ function tocjump(hash) {
@(bind (name code) @(transpose [nsort (mapcar (tb ((sym code))
(list (html-decode sym) code))
(hash-pairs symhash)) : car]))
-@(output "share/txr/stdlib/doc-syms.tl")
+@(output "stdlib/doc-syms.tl")
(defparml doc-syms
(hash-from-pairs
@ (repeat)
diff --git a/share/txr/stdlib/asm.tl b/stdlib/asm.tl
index 624ddff6..624ddff6 100644
--- a/share/txr/stdlib/asm.tl
+++ b/stdlib/asm.tl
diff --git a/share/txr/stdlib/awk.tl b/stdlib/awk.tl
index f94d6b9a..f94d6b9a 100644
--- a/share/txr/stdlib/awk.tl
+++ b/stdlib/awk.tl
diff --git a/share/txr/stdlib/build.tl b/stdlib/build.tl
index 1b27d17b..1b27d17b 100644
--- a/share/txr/stdlib/build.tl
+++ b/stdlib/build.tl
diff --git a/share/txr/stdlib/cadr.tl b/stdlib/cadr.tl
index 6648b145..6648b145 100644
--- a/share/txr/stdlib/cadr.tl
+++ b/stdlib/cadr.tl
diff --git a/share/txr/stdlib/compiler.tl b/stdlib/compiler.tl
index c30ebbd6..c30ebbd6 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/stdlib/compiler.tl
diff --git a/share/txr/stdlib/conv.tl b/stdlib/conv.tl
index 5cd799f3..5cd799f3 100644
--- a/share/txr/stdlib/conv.tl
+++ b/stdlib/conv.tl
diff --git a/share/txr/stdlib/copy-file.tl b/stdlib/copy-file.tl
index 28460b72..28460b72 100644
--- a/share/txr/stdlib/copy-file.tl
+++ b/stdlib/copy-file.tl
diff --git a/share/txr/stdlib/debugger.tl b/stdlib/debugger.tl
index 8102eb24..8102eb24 100644
--- a/share/txr/stdlib/debugger.tl
+++ b/stdlib/debugger.tl
diff --git a/share/txr/stdlib/defset.tl b/stdlib/defset.tl
index 15b44411..15b44411 100644
--- a/share/txr/stdlib/defset.tl
+++ b/stdlib/defset.tl
diff --git a/share/txr/stdlib/doc-lookup.tl b/stdlib/doc-lookup.tl
index f1d0d380..f1d0d380 100644
--- a/share/txr/stdlib/doc-lookup.tl
+++ b/stdlib/doc-lookup.tl
diff --git a/share/txr/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index 5bf473ee..5bf473ee 100644
--- a/share/txr/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
diff --git a/share/txr/stdlib/doloop.tl b/stdlib/doloop.tl
index 56540d9e..56540d9e 100644
--- a/share/txr/stdlib/doloop.tl
+++ b/stdlib/doloop.tl
diff --git a/share/txr/stdlib/each-prod.tl b/stdlib/each-prod.tl
index 7b7150c0..7b7150c0 100644
--- a/share/txr/stdlib/each-prod.tl
+++ b/stdlib/each-prod.tl
diff --git a/share/txr/stdlib/error.tl b/stdlib/error.tl
index 7f70391e..7f70391e 100644
--- a/share/txr/stdlib/error.tl
+++ b/stdlib/error.tl
diff --git a/share/txr/stdlib/except.tl b/stdlib/except.tl
index 60f2fe51..60f2fe51 100644
--- a/share/txr/stdlib/except.tl
+++ b/stdlib/except.tl
diff --git a/share/txr/stdlib/ffi.tl b/stdlib/ffi.tl
index dbf7888c..dbf7888c 100644
--- a/share/txr/stdlib/ffi.tl
+++ b/stdlib/ffi.tl
diff --git a/share/txr/stdlib/getopts.tl b/stdlib/getopts.tl
index 99ce9f9b..99ce9f9b 100644
--- a/share/txr/stdlib/getopts.tl
+++ b/stdlib/getopts.tl
diff --git a/share/txr/stdlib/getput.tl b/stdlib/getput.tl
index 13ffba4b..13ffba4b 100644
--- a/share/txr/stdlib/getput.tl
+++ b/stdlib/getput.tl
diff --git a/share/txr/stdlib/hash.tl b/stdlib/hash.tl
index b9010500..b9010500 100644
--- a/share/txr/stdlib/hash.tl
+++ b/stdlib/hash.tl
diff --git a/share/txr/stdlib/ifa.tl b/stdlib/ifa.tl
index f643cf92..f643cf92 100644
--- a/share/txr/stdlib/ifa.tl
+++ b/stdlib/ifa.tl
diff --git a/share/txr/stdlib/keyparams.tl b/stdlib/keyparams.tl
index e1eba2d0..e1eba2d0 100644
--- a/share/txr/stdlib/keyparams.tl
+++ b/stdlib/keyparams.tl
diff --git a/share/txr/stdlib/match.tl b/stdlib/match.tl
index 3502688b..3502688b 100644
--- a/share/txr/stdlib/match.tl
+++ b/stdlib/match.tl
diff --git a/share/txr/stdlib/op.tl b/stdlib/op.tl
index 182055f0..182055f0 100644
--- a/share/txr/stdlib/op.tl
+++ b/stdlib/op.tl
diff --git a/share/txr/stdlib/optimize.tl b/stdlib/optimize.tl
index b011c568..b011c568 100644
--- a/share/txr/stdlib/optimize.tl
+++ b/stdlib/optimize.tl
diff --git a/share/txr/stdlib/package.tl b/stdlib/package.tl
index 63c13f5e..63c13f5e 100644
--- a/share/txr/stdlib/package.tl
+++ b/stdlib/package.tl
diff --git a/share/txr/stdlib/param.tl b/stdlib/param.tl
index 0551e9ce..0551e9ce 100644
--- a/share/txr/stdlib/param.tl
+++ b/stdlib/param.tl
diff --git a/share/txr/stdlib/path-test.tl b/stdlib/path-test.tl
index fb132f7f..fb132f7f 100644
--- a/share/txr/stdlib/path-test.tl
+++ b/stdlib/path-test.tl
diff --git a/share/txr/stdlib/pic.tl b/stdlib/pic.tl
index 6c2c8048..6c2c8048 100644
--- a/share/txr/stdlib/pic.tl
+++ b/stdlib/pic.tl
diff --git a/share/txr/stdlib/place.tl b/stdlib/place.tl
index 3ee0ea8c..3ee0ea8c 100644
--- a/share/txr/stdlib/place.tl
+++ b/stdlib/place.tl
diff --git a/share/txr/stdlib/pmac.tl b/stdlib/pmac.tl
index e439220c..e439220c 100644
--- a/share/txr/stdlib/pmac.tl
+++ b/stdlib/pmac.tl
diff --git a/share/txr/stdlib/quips.tl b/stdlib/quips.tl
index 4b787209..4b787209 100644
--- a/share/txr/stdlib/quips.tl
+++ b/stdlib/quips.tl
diff --git a/share/txr/stdlib/save-exe.tl b/stdlib/save-exe.tl
index e645c10a..e645c10a 100644
--- a/share/txr/stdlib/save-exe.tl
+++ b/stdlib/save-exe.tl
diff --git a/share/txr/stdlib/socket.tl b/stdlib/socket.tl
index 58f81e61..58f81e61 100644
--- a/share/txr/stdlib/socket.tl
+++ b/stdlib/socket.tl
diff --git a/share/txr/stdlib/stream-wrap.tl b/stdlib/stream-wrap.tl
index 042af813..042af813 100644
--- a/share/txr/stdlib/stream-wrap.tl
+++ b/stdlib/stream-wrap.tl
diff --git a/share/txr/stdlib/struct.tl b/stdlib/struct.tl
index bd62637f..bd62637f 100644
--- a/share/txr/stdlib/struct.tl
+++ b/stdlib/struct.tl
diff --git a/share/txr/stdlib/tagbody.tl b/stdlib/tagbody.tl
index ed670871..ed670871 100644
--- a/share/txr/stdlib/tagbody.tl
+++ b/stdlib/tagbody.tl
diff --git a/share/txr/stdlib/termios.tl b/stdlib/termios.tl
index 5d2423dc..5d2423dc 100644
--- a/share/txr/stdlib/termios.tl
+++ b/stdlib/termios.tl
diff --git a/share/txr/stdlib/trace.tl b/stdlib/trace.tl
index 8c0fbd4c..8c0fbd4c 100644
--- a/share/txr/stdlib/trace.tl
+++ b/stdlib/trace.tl
diff --git a/share/txr/stdlib/txr-case.tl b/stdlib/txr-case.tl
index 244c58b7..244c58b7 100644
--- a/share/txr/stdlib/txr-case.tl
+++ b/stdlib/txr-case.tl
diff --git a/share/txr/stdlib/txr-case.txr b/stdlib/txr-case.txr
index 9b65d1bc..9b65d1bc 100644
--- a/share/txr/stdlib/txr-case.txr
+++ b/stdlib/txr-case.txr
diff --git a/share/txr/stdlib/type.tl b/stdlib/type.tl
index a97ac6bd..a97ac6bd 100644
--- a/share/txr/stdlib/type.tl
+++ b/stdlib/type.tl
diff --git a/share/txr/stdlib/ver.tl b/stdlib/ver.tl
index e85d7ac6..e85d7ac6 100644
--- a/share/txr/stdlib/ver.tl
+++ b/stdlib/ver.tl
diff --git a/share/txr/stdlib/ver.txr b/stdlib/ver.txr
index 2339bda7..2339bda7 100644
--- a/share/txr/stdlib/ver.txr
+++ b/stdlib/ver.txr
diff --git a/share/txr/stdlib/vm-param.tl b/stdlib/vm-param.tl
index d87e5bf3..d87e5bf3 100644
--- a/share/txr/stdlib/vm-param.tl
+++ b/stdlib/vm-param.tl
diff --git a/share/txr/stdlib/with-resources.tl b/stdlib/with-resources.tl
index 9d4a89c9..9d4a89c9 100644
--- a/share/txr/stdlib/with-resources.tl
+++ b/stdlib/with-resources.tl
diff --git a/share/txr/stdlib/with-stream.tl b/stdlib/with-stream.tl
index 2904ea3d..2904ea3d 100644
--- a/share/txr/stdlib/with-stream.tl
+++ b/stdlib/with-stream.tl
diff --git a/share/txr/stdlib/yield.tl b/stdlib/yield.tl
index 866ab8fb..866ab8fb 100644
--- a/share/txr/stdlib/yield.tl
+++ b/stdlib/yield.tl
diff --git a/txr.1 b/txr.1
index 8aaed565..389f3ae9 100644
--- a/txr.1
+++ b/txr.1
@@ -82187,7 +82187,9 @@ functionality invoked by the program code. Library files are located
relative to the installation directory, called the
.IR sysroot .
The executable tries to dynamically determine the sysroot from
-its own location, according to this directory structure:
+its own location, according to the following directory structure.
+The executable may be renamed, it need not be called
+.codn txr :
.verb
/path/to/sysroot/bin/txr
@@ -82208,6 +82210,19 @@ the following structure is expected:
.verb
/path/to/installation/txr
+ .../stdlib/cadr.tl
+ .../stdlib/cadr.tlo
+ .../stdlib/except.tl
+ ...
+.brev
+
+Note that this has changed starting in \*(TX 264. Older versions
+of \*(TX, when the executable is not in a directory named
+.strn bin ,
+expect the following structure:
+
+.verb
+ /path/to/installation/txr
.../share/txr/stdlib/cadr.tl
.../share/txr/stdlib/cadr.tlo
.../share/txr/stdlib/except.tl
@@ -82223,8 +82238,8 @@ subdirectory where the executable is located, on the
same level with the
.code share
directory, or else the second structure in which the
-.code share
-directory is a subdirectory of the executable directory.
+.code stdlib
+directory is a direct subdirectory of the executable directory.
If one of these structures is not observed, the application
may fail due to the failure of a library file to load.
diff --git a/txr.c b/txr.c
index 32f92716..81d946bc 100644
--- a/txr.c
+++ b/txr.c
@@ -302,6 +302,7 @@ static void sysroot_init(void)
{
val prog_dir;
const wchar_t *psc = coerce(const wchar_t *, path_sep_chars);
+ int share_txr_stdlib = 1;
#if HAVE_WINDOWS_H
val slash = regex_compile(lit("\\\\"), nil);
@@ -318,14 +319,17 @@ static void sysroot_init(void)
if (!(maybe_sysroot(lit(TXR_REL_PATH)) ||
maybe_sysroot(lit(TXR_REL_PATH EXE_SUFF)) ||
+ maybe_sysroot(substitute_basename(lit(TXR_REL_PATH), prog_path)) ||
+ (share_txr_stdlib = 0) ||
maybe_sysroot(lit(PROG_NAME)) ||
- maybe_sysroot(lit(PROG_NAME EXE_SUFF)) ||
- maybe_sysroot(substitute_basename(lit(TXR_REL_PATH), prog_path))))
+ maybe_sysroot(lit(PROG_NAME EXE_SUFF))))
{
sysroot_path = prog_dir;
}
- stdlib_path = sysroot(lit("share/txr/stdlib/"));
+ stdlib_path = sysroot(if3(share_txr_stdlib,
+ lit("share/txr/stdlib/"),
+ lit("stdlib/")));
reg_varl(intern(lit("stdlib"), user_package), stdlib_path);
reg_varl(intern(lit("*txr-version*"), user_package),