adding --scheme-script and --scheme-program-command args to snow (issue #400)

This commit is contained in:
Alex Shinn 2017-03-26 21:30:53 +09:00
parent ae1a2aa6be
commit 806d92aa15
2 changed files with 45 additions and 39 deletions

View file

@ -1341,7 +1341,8 @@
(define (scheme-script-command impl cfg) (define (scheme-script-command impl cfg)
(or (and (eq? impl 'chibi) (conf-get cfg 'chibi-path)) (or (and (eq? impl 'chibi) (conf-get cfg 'chibi-path))
(let* ((prog (cond ((assq impl known-implementations) => cadr) (let* ((prog (cond ((conf-get cfg 'scheme-script))
((assq impl known-implementations) => cadr)
(else "scheme-script"))) (else "scheme-script")))
(path (or (find-in-path prog) prog)) (path (or (find-in-path prog) prog))
(arg (case impl (arg (case impl
@ -1354,6 +1355,9 @@
path)))) path))))
(define (scheme-program-command impl cfg file . o) (define (scheme-program-command impl cfg file . o)
(cond
((conf-get cfg 'scheme-program-command) => string-split)
(else
(let ((lib-path (and (pair? o) (car o))) (let ((lib-path (and (pair? o) (car o)))
(install-dir (get-install-source-dir impl cfg))) (install-dir (get-install-source-dir impl cfg)))
(case impl (case impl
@ -1393,7 +1397,7 @@
-program ,file) -program ,file)
`(larceny -r7rs -path ,install-dir -program ,file))) `(larceny -r7rs -path ,install-dir -program ,file)))
(else (else
#f)))) #f))))))
(define (get-install-search-dirs impl cfg) (define (get-install-search-dirs impl cfg)
(let ((install-dir (get-install-source-dir impl cfg)) (let ((install-dir (get-install-source-dir impl cfg))

View file

@ -85,6 +85,8 @@
(program-builder symbol "name of program builder to use") (program-builder symbol "name of program builder to use")
(implementations (list symbol) ("impls") "impls to install for, or 'all'") (implementations (list symbol) ("impls") "impls to install for, or 'all'")
(program-implementation symbol "impl to install programs for") (program-implementation symbol "impl to install programs for")
(scheme-script string "shell command to use for running scheme scripts")
(scheme-program-command string "shell command to use for running scheme programs")
(chibi-path filename "path to chibi-scheme executable") (chibi-path filename "path to chibi-scheme executable")
(cc string "path to c compiler") (cc string "path to c compiler")
(cflags string "flags for c compiler") (cflags string "flags for c compiler")