diff --git a/doc/chibi.scrbl b/doc/chibi.scrbl index 837a0d31..46619d9a 100755 --- a/doc/chibi.scrbl +++ b/doc/chibi.scrbl @@ -1670,4 +1670,5 @@ installed. The following are currently supported: \item{racket - version >= 8.16 with the \scheme{r7rs} pkg} \item{sagittarius - version >= 0.9.13} \item{stklos - version > 2.10} +\item{ypsilon - version > 2.0.8} ] diff --git a/lib/chibi/snow/commands.scm b/lib/chibi/snow/commands.scm index 0991f1ed..c7513ac8 100644 --- a/lib/chibi/snow/commands.scm +++ b/lib/chibi/snow/commands.scm @@ -1434,6 +1434,15 @@ (list (make-path (process->string '(stklos -e "(display (install-path #:libdir))"))))) + ((ypsilon) + (call-with-temp-file "snow-ypsilon.scm" + (lambda (tmp-path out preserve) + (with-output-to-file tmp-path + (lambda () + (display "(import (core))") + (newline) + (display "(display (car (scheme-library-paths)))"))) + (list (make-path (process->string `(ypsilon --r7rs ,tmp-path))))))) (else (list (make-path (or (conf-get cfg 'install-prefix) "/usr/local") "share/snow" @@ -1542,6 +1551,10 @@ (if lib-path `(stklos -A ,install-dir -A ,lib-path ,file) `(stklos -A ,install-dir ,file))) + ((ypsilon) + (if lib-path + `(ypsilon --sitelib ,install-dir --sitelib ,lib-path ,file) + `(ypsilon --sitelib ,install-dir ,file))) (else #f)))))) @@ -1755,6 +1768,7 @@ ((eq? impl 'racket) (get-install-library-dir impl cfg)) ((eq? impl 'sagittarius) (get-install-library-dir impl cfg)) ((eq? impl 'stklos) (get-install-library-dir impl cfg)) + ((eq? impl 'ypsilon) (get-install-library-dir impl cfg)) ((conf-get cfg 'install-source-dir)) ((conf-get cfg 'install-prefix) => (lambda (prefix) (make-path prefix "share/snow" impl))) @@ -1771,6 +1785,7 @@ ((eq? impl 'racket) (get-install-library-dir impl cfg)) ((eq? impl 'sagittarius) (get-install-library-dir impl cfg)) ((eq? impl 'stklos) (get-install-library-dir impl cfg)) + ((eq? impl 'ypsilon) (get-install-library-dir impl cfg)) ((conf-get cfg 'install-data-dir)) ((conf-get cfg 'install-prefix) => (lambda (prefix) (make-path prefix "share/snow" impl))) @@ -1804,6 +1819,8 @@ (car (get-install-dirs impl cfg))) ((eq? impl 'stklos) (car (get-install-dirs impl cfg))) + ((eq? impl 'ypsilon) + (car (get-install-dirs impl cfg))) ((conf-get cfg 'install-prefix) => (lambda (prefix) (make-path prefix "lib" impl))) (else snow-binary-module-directory))) diff --git a/lib/chibi/snow/utils.scm b/lib/chibi/snow/utils.scm index 6f07b42e..a44ea65e 100644 --- a/lib/chibi/snow/utils.scm +++ b/lib/chibi/snow/utils.scm @@ -67,7 +67,18 @@ (stklos "stklos" (stklos --version) #f ,(delay (process->sexp - '(stklos -e "(write (features))")))))) + '(stklos -e "(write (features))")))) + (ypsilon "ypsilon" (ypsilon --version) #f + ,(delay + (call-with-temp-file "snow-ypsilon" + (lambda (tmp-path out preserve) + (with-output-to-file tmp-path + (lambda () + (display "(import (scheme base) (scheme write))") + (newline) + (display "(display (features))"))) + (process->sexp + `(ypsilon --r7rs ,tmp-path)))))))) (define (impl->version impl cmd) (let* ((lines (process->string-list cmd))