From 9bc62cca21a0a171cbc220419af91b3d8f7e333b Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 3 Dec 2010 14:08:07 -0800 Subject: Add "shims" for booting (mostly) from magic file system --- gnuradio-core/src/guile/+boot+/ice-9/boot-9.scm | 27 +++++++++++++++++++++++++ gnuradio-core/src/guile/Makefile.am | 1 + 2 files changed, 28 insertions(+) create mode 100644 gnuradio-core/src/guile/+boot+/ice-9/boot-9.scm (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/guile/+boot+/ice-9/boot-9.scm b/gnuradio-core/src/guile/+boot+/ice-9/boot-9.scm new file mode 100644 index 000000000..4926c6f3c --- /dev/null +++ b/gnuradio-core/src/guile/+boot+/ice-9/boot-9.scm @@ -0,0 +1,27 @@ +;;; install shims for magic file system (if defined), then chain to real boot code. + +(if (defined? 'xyzzy-primitive-load) + (set! primitive-load xyzzy-primitive-load)) + +(if (defined? 'xyzzy-primitive-load-path) + (set! primitive-load-path xyzzy-primitive-load-path)) + +(if (defined? 'xyzzy-search-path) + (set! search-path xyzzy-search-path)) + +(if (defined? 'xyzzy-search-load-path) + (set! search-load-path xyzzy-search-load-path)) + +;; Remove any path containing /+boot+ from %load-path +(set! %load-path + (let ((new-path '())) + (let loop ((path %load-path)) + (cond ((not (pair? path)) + (reverse! new-path)) + ((string-contains (car path) "/+boot+") + (loop (cdr path))) + (else + (set! new-path (cons (car path) new-path)) + (loop (cdr path))))))) + +(primitive-load-path "ice-9/boot-9.scm") diff --git a/gnuradio-core/src/guile/Makefile.am b/gnuradio-core/src/guile/Makefile.am index 447500b46..cebef89f1 100644 --- a/gnuradio-core/src/guile/Makefile.am +++ b/gnuradio-core/src/guile/Makefile.am @@ -39,6 +39,7 @@ SUBDIRS = example-waveforms # gnuradio/runtime-shim implements "guile friendly" versions of connect & disconnect. nobase_guile_DATA = \ + +boot+/ice-9/boot-9.scm \ Swig/common.scm \ gnuradio/core.scm \ gnuradio/export-safely.scm \ -- cgit