Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions lib/chibi/snow/commands.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1480,16 +1480,7 @@
'(csi -R chicken.platform -p "(car (repository-path))")))
char-whitespace?)))

(define (get-guile-site-dir)
(process->string '(guile -c "(display (%site-dir))")))

(define (get-guile-site-ccache-dir)
(process->string '(guile -c "(display (%site-ccache-dir))")))

(define (get-install-dirs impl cfg)
(define (guile-eval expr)
(guard (exn (else #f))
(process->sexp `(guile -c ,(write-to-string `(write ,expr))))))
(case impl
((capyscheme)
(list
Expand Down Expand Up @@ -1541,14 +1532,20 @@
"/usr/local/share/gauche/"))))
((guile)
(let ((path
(guile-eval
'(string-append (cdr (assq 'pkgdatadir %guile-build-info))
(string (integer->char 47))
(effective-version)))))
(guard (exn (else #f))
(process->sexp
`(guile -c ,(write-to-string
`(write
(string-append
(cdr (assq 'pkgdatadir %guile-build-info))
(string (integer->char 47))
(effective-version)))))))))
(list
(if (string? path)
path
"/usr/local/share/guile/"))))
(make-path
(or (conf-get cfg 'install-prefix) "")
(if (string? path)
path
"/usr/local/share/guile/")))))
((kawa)
(list
(make-path
Expand Down Expand Up @@ -1996,7 +1993,7 @@
((eq? impl 'gambit) (get-install-library-dir impl cfg))
((eq? impl 'gauche) (get-install-library-dir impl cfg))
((eq? impl 'generic) (get-install-library-dir impl cfg))
((eq? impl 'guile) (get-guile-site-dir))
((eq? impl 'guile) (get-install-library-dir impl cfg))
((eq? impl 'kawa) (get-install-library-dir impl cfg))
((eq? impl 'loko) (get-install-library-dir impl cfg))
((eq? impl 'mit-scheme) (get-install-library-dir impl cfg))
Expand All @@ -2019,6 +2016,7 @@
((eq? impl 'gambit) (get-install-library-dir impl cfg))
((eq? impl 'gauche) (get-install-library-dir impl cfg))
((eq? impl 'generic) (get-install-library-dir impl cfg))
((eq? impl 'guile) (get-install-library-dir impl cfg))
((eq? impl 'kawa) (get-install-library-dir impl cfg))
((eq? impl 'loko) (get-install-library-dir impl cfg))
((eq? impl 'mit-scheme) (get-install-library-dir impl cfg))
Expand Down Expand Up @@ -2054,7 +2052,7 @@
((eq? impl 'gambit)
(car (get-install-dirs impl cfg)))
((eq? impl 'guile)
(get-guile-site-ccache-dir))
(car (get-install-dirs impl cfg)))
((eq? impl 'kawa)
(car (get-install-dirs impl cfg)))
((eq? impl 'loko)
Expand Down