diff --git a/scheme/Makefile.am b/scheme/Makefile.am index 5e1de12..8ec314f 100644 --- a/scheme/Makefile.am +++ b/scheme/Makefile.am @@ -4,12 +4,13 @@ EXTRA_DIST=ikarus.boot.orig ikarus.enumerations.ss ikarus.exceptions.ss ikarus.a all: $(nodist_pkglib_DATA) -ikarus.version.ss: Makefile +ikarus.config.ss: Makefile echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@ + echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@ -CLEANFILES=$(nodist_pkglib_DATA) ikarus.version.ss +CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss -ikarus.boot: $(EXTRA_DIST) ikarus.version.ss +ikarus.boot: $(EXTRA_DIST) ikarus.config.ss ../src/ikarus -b ./ikarus.boot.orig --r6rs-script makefile.ss # pkglibdir diff --git a/scheme/Makefile.in b/scheme/Makefile.in index ec211f5..bf72687 100644 --- a/scheme/Makefile.in +++ b/scheme/Makefile.in @@ -183,7 +183,7 @@ EXTRA_DIST = ikarus.boot.orig ikarus.enumerations.ss \ ikarus/code-objects.ss ikarus/compiler.ss \ ikarus/intel-assembler.ss ikarus/fasl/write.ss \ unicode/unicode-char-cases.ss unicode/unicode-charinfo.ss -CLEANFILES = $(nodist_pkglib_DATA) ikarus.version.ss +CLEANFILES = $(nodist_pkglib_DATA) ikarus.config.ss all: all-am .SUFFIXES: @@ -369,10 +369,11 @@ uninstall-am: uninstall-nodist_pkglibDATA all: $(nodist_pkglib_DATA) -ikarus.version.ss: Makefile +ikarus.config.ss: Makefile echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@ + echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@ -ikarus.boot: $(EXTRA_DIST) ikarus.version.ss +ikarus.boot: $(EXTRA_DIST) ikarus.config.ss ../src/ikarus -b ./ikarus.boot.orig --r6rs-script makefile.ss # pkglibdir diff --git a/scheme/ikarus.boot.orig b/scheme/ikarus.boot.orig index e3d762c..117b013 100644 Binary files a/scheme/ikarus.boot.orig and b/scheme/ikarus.boot.orig differ diff --git a/scheme/ikarus.main.ss b/scheme/ikarus.main.ss index bb830db..5c79cea 100644 --- a/scheme/ikarus.main.ss +++ b/scheme/ikarus.main.ss @@ -23,7 +23,7 @@ (import (ikarus)) (letrec-syntax ([compile-time-string (lambda (x) - (include "ikarus.version.ss") + (include "ikarus.config.ss") ikarus-version)]) (define (print-greeting) (printf "Ikarus Scheme version ~a\n" (compile-time-string)) @@ -37,6 +37,10 @@ (import (ikarus) (ikarus greeting) (only (ikarus load) load-r6rs-top-level)) + (library-path + (let () + (include "ikarus.config.ss") + (list "." ikarus-lib-dir))) (let-values ([(files script script-type args) (let f ([args (command-line-arguments)]) (cond diff --git a/scheme/makefile.ss b/scheme/makefile.ss index 394e599..eacbd7f 100755 --- a/scheme/makefile.ss +++ b/scheme/makefile.ss @@ -382,6 +382,7 @@ [pointer-value i] [system i] [installed-libraries i] + [library-path i] [current-primitive-locations $boot] [boot-library-expand $boot] [current-library-collection $boot] diff --git a/scheme/psyntax.expander.ss b/scheme/psyntax.expander.ss index d4c1460..aad5d19 100644 --- a/scheme/psyntax.expander.ss +++ b/scheme/psyntax.expander.ss @@ -3400,7 +3400,14 @@ (define (eval-binding x) (let ((loc (car x)) (expr (cdr x))) (cond - (loc (set-symbol-value! loc (eval-core (expanded->core expr)))) + (loc (set-symbol-value! loc + (let ([g (gensym loc)]) + (eval-core + (expanded->core + (build-application no-source + (build-lambda no-source + (list g) g) + (list expr))))))) (else (eval-core (expanded->core expr)))))) (let ((rtc (make-collector)) (itc (make-collector)) diff --git a/scheme/psyntax.library-manager.ss b/scheme/psyntax.library-manager.ss index ad8bf9c..a6d4851 100644 --- a/scheme/psyntax.library-manager.ss +++ b/scheme/psyntax.library-manager.ss @@ -23,7 +23,7 @@ visit-library library-name library-version library-exists? find-library-by-name install-library library-spec invoke-library extend-library-subst! extend-library-env! current-library-expander - current-library-collection) + current-library-collection library-path) (import (rnrs) (psyntax compat) (rnrs r5rs)) (define (make-collection) @@ -76,7 +76,6 @@ '(".") (lambda (x) (if (and (list? x) (for-all string? x)) - ;(map values x) (map (lambda (x) x) x) (error 'library-path "not a list of strings" x)))))