Cleanup
This commit is contained in:
parent
1ffbb2c547
commit
a315ca5d1d
1
Makefile
1
Makefile
|
@ -69,7 +69,6 @@ clean:
|
||||||
find . -name "*.link" -delete
|
find . -name "*.link" -delete
|
||||||
find . -name "*.meta" -delete
|
find . -name "*.meta" -delete
|
||||||
find . -name "*.import.*" -delete
|
find . -name "*.import.*" -delete
|
||||||
rm -rf README.txt
|
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
rm -rf test
|
rm -rf test
|
||||||
rm -rf deps
|
rm -rf deps
|
||||||
|
|
|
@ -124,9 +124,6 @@ as compiler.
|
||||||
<a name="#roadmap"></a>
|
<a name="#roadmap"></a>
|
||||||
|
|
||||||
- Support for more implementations
|
- Support for more implementations
|
||||||
- gerbil
|
|
||||||
- Dont know how to run this thing yet :D
|
|
||||||
- r7rs
|
|
||||||
- husk
|
- husk
|
||||||
- Dont know how to add directories to load path yet, might not be
|
- Dont know how to add directories to load path yet, might not be
|
||||||
implemented
|
implemented
|
||||||
|
@ -251,11 +248,6 @@ before running it. For example:
|
||||||
If you are using Chicken you should propably read the next section too, you
|
If you are using Chicken you should propably read the next section too, you
|
||||||
will most propably run into it soon.
|
will most propably run into it soon.
|
||||||
|
|
||||||
### Mosh
|
|
||||||
<a name="#usage-mosh"></a>
|
|
||||||
|
|
||||||
Only allows one loadpath. No workarounds exist currently in compile-r7rs.
|
|
||||||
|
|
||||||
### mit-scheme
|
### mit-scheme
|
||||||
<a name="#usage-mit-scheme"></a>
|
<a name="#usage-mit-scheme"></a>
|
||||||
|
|
||||||
|
|
878
libs/data.sld
878
libs/data.sld
|
@ -123,486 +123,460 @@
|
||||||
,(string-cut-from-end library-file 4))))))
|
,(string-cut-from-end library-file 4))))))
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(apply string-append `("gsc"
|
(apply string-append `("gsc"
|
||||||
" "
|
" "
|
||||||
,(util-getenv "COMPILE_R7RS_GAMBIT")
|
,(util-getenv "COMPILE_R7RS_GAMBIT")
|
||||||
" "
|
" "
|
||||||
"-:search="
|
"-:search="
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append item ""))
|
(string-append item ""))
|
||||||
(append prepend-directories append-directories))
|
(append prepend-directories append-directories))
|
||||||
" "
|
" "
|
||||||
"-o"
|
"-o"
|
||||||
" "
|
" "
|
||||||
,output-file
|
,output-file
|
||||||
" "
|
" "
|
||||||
"-exe -nopreload"
|
"-exe -nopreload"
|
||||||
" "
|
" "
|
||||||
,input-file))
|
,input-file))
|
||||||
#;(apply string-append
|
#;(apply string-append
|
||||||
`("echo '#!/usr/bin/env -S gsi-script -f -:search="
|
`("echo '#!/usr/bin/env -S gsi-script -f -:search="
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append item "/:"))
|
||||||
|
(append prepend-directories append-directories))
|
||||||
|
"'"
|
||||||
|
" "
|
||||||
|
">"
|
||||||
|
" "
|
||||||
|
,(string-append (string-cut-from-end input-file 4) ".tmp")
|
||||||
|
" "
|
||||||
|
"&&"
|
||||||
|
" "
|
||||||
|
"cat"
|
||||||
|
" "
|
||||||
|
,input-file
|
||||||
|
" "
|
||||||
|
">>"
|
||||||
|
" "
|
||||||
|
,(string-append (string-cut-from-end input-file 4) ".tmp")
|
||||||
|
" "
|
||||||
|
"&&"
|
||||||
|
" "
|
||||||
|
"gsc"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_GAMBIT")
|
||||||
|
" "
|
||||||
|
"-:search="
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append item "/"))
|
||||||
|
(append prepend-directories append-directories))
|
||||||
|
" "
|
||||||
|
"-o"
|
||||||
|
" "
|
||||||
|
,output-file
|
||||||
|
" "
|
||||||
|
"-exe -nopreload"
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item) (string-append item "/ ")) prepend-directories)
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item) (string-append item "/ ")) append-directories)
|
||||||
|
" "
|
||||||
|
,(string-append (string-cut-from-end input-file 4) ".tmp")
|
||||||
|
;,input-file
|
||||||
|
)))))
|
||||||
|
(gauche
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("gosh"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_GAUCHE")
|
||||||
|
" "
|
||||||
|
"-r7"
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-I" " " item " "))
|
||||||
|
prepend-directories)
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-A" " " item " "))
|
||||||
|
append-directories)
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(guile
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("guile"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_GUILE")
|
||||||
|
" "
|
||||||
|
,(if r6rs? "--r6rs" "--r7rs")
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-L" " " item " "))
|
||||||
|
prepend-directories)
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-L" " " item " "))
|
||||||
|
append-directories)
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(husk
|
||||||
|
(type . compiler)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("huskc"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_HUSK")
|
||||||
|
" "
|
||||||
|
"-o"
|
||||||
|
" "
|
||||||
|
,output-file
|
||||||
|
" "
|
||||||
|
;,@(map (lambda (item) (string-append "-L" " " item " ")) prepend-directories)
|
||||||
|
;,@(map (lambda (item) (string-append "-L" " " item " ")) append-directories)
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(ikarus
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("IKARUS_LIBRARY_PATH="
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append item ":"))
|
||||||
|
prepend-directories)
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append item ":"))
|
||||||
|
append-directories)
|
||||||
|
" "
|
||||||
|
"ikarus"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_IKARUS")
|
||||||
|
" "
|
||||||
|
"--r6rs-script"
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(ironscheme
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("ironscheme"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_IRONSCHEME")
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-I \"" item "\" "))
|
||||||
|
prepend-directories)
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-I \"" item "\" "))
|
||||||
|
append-directories)
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(kawa
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("kawa"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_KAWA")
|
||||||
|
" "
|
||||||
|
"-Dkawa.import.path=\""
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append item "/*.sld:"))
|
||||||
|
(append prepend-directories append-directories))
|
||||||
|
"\" "
|
||||||
|
"--r7rs"
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(larceny
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("larceny"
|
||||||
|
,(util-getenv "COMPILE_R7RS_LARCENY")
|
||||||
|
" "
|
||||||
|
"-nobanner"
|
||||||
|
" "
|
||||||
|
"-quiet"
|
||||||
|
" "
|
||||||
|
"-utf8"
|
||||||
|
" "
|
||||||
|
,(if r6rs? "-r6rs" "-r7rs")
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-I " item " "))
|
||||||
|
prepend-directories)
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-A " item " "))
|
||||||
|
append-directories)
|
||||||
|
" "
|
||||||
|
"-program"
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(loko
|
||||||
|
(type . compiler)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(let ((out (string-cut-from-end input-file 4)))
|
||||||
|
(apply string-append
|
||||||
|
`("LOKO_LIBRARY_PATH="
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append item "/:"))
|
(string-append item ":"))
|
||||||
(append prepend-directories append-directories))
|
prepend-directories)
|
||||||
"'"
|
,@(map (lambda (item)
|
||||||
|
(string-append item ":"))
|
||||||
|
append-directories)
|
||||||
" "
|
" "
|
||||||
">"
|
"loko "
|
||||||
" "
|
" "
|
||||||
,(string-append (string-cut-from-end input-file 4) ".tmp")
|
,(util-getenv "COMPILE_R7RS_LOKO")
|
||||||
" "
|
" "
|
||||||
"&&"
|
,(if r6rs? "-std=r6rs" "-std=r7rs")
|
||||||
" "
|
" "
|
||||||
"cat"
|
"--compile"
|
||||||
" "
|
" "
|
||||||
,input-file
|
,input-file
|
||||||
" "
|
" "
|
||||||
">>"
|
|
||||||
" "
|
|
||||||
,(string-append (string-cut-from-end input-file 4) ".tmp")
|
|
||||||
" "
|
|
||||||
"&&"
|
"&&"
|
||||||
" "
|
" "
|
||||||
"gsc"
|
"mv"
|
||||||
" "
|
" "
|
||||||
,(util-getenv "COMPILE_R7RS_GAMBIT")
|
,out
|
||||||
" "
|
" "
|
||||||
"-:search="
|
,output-file))))))
|
||||||
,@(map (lambda (item)
|
(meevax
|
||||||
(string-append item "/"))
|
(type . interpreter)
|
||||||
(append prepend-directories append-directories))
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
" "
|
(apply string-append
|
||||||
"-o"
|
`("meevax"
|
||||||
" "
|
" "
|
||||||
,output-file
|
,(util-getenv "COMPILE_R7RS_MEEVAX")
|
||||||
" "
|
" "
|
||||||
"-exe -nopreload"
|
;,@(map (lambda (item) (string-append "--load " item " ")) library-files)
|
||||||
" "
|
;,@(map (lambda (item) (string-append " " item " ")) prepend-directories)
|
||||||
,@(map (lambda (item) (string-append item "/ ")) prepend-directories)
|
;,@(map (lambda (item) (string-append " " item " ")) append-directories)
|
||||||
" "
|
" "
|
||||||
,@(map (lambda (item) (string-append item "/ ")) append-directories)
|
,input-file)))))
|
||||||
" "
|
(mit-scheme
|
||||||
,(string-append (string-cut-from-end input-file 4) ".tmp")
|
(type . interpreter)
|
||||||
;,input-file
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
)))))
|
(apply string-append
|
||||||
(gauche
|
`("mit-scheme"
|
||||||
(type . interpreter)
|
" "
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
,(util-getenv "COMPILE_R7RS_MIT_SCHEME")
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "--load " item " "))
|
||||||
|
library-files)
|
||||||
|
" "
|
||||||
|
"--load"
|
||||||
|
" "
|
||||||
|
,input-file
|
||||||
|
" "
|
||||||
|
"--eval \"(exit 0)\"")))))
|
||||||
|
(mosh
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("MOSH_LOAD_PATH="
|
||||||
|
,@(map (lambda (item) (string-append item ":")) prepend-directories)
|
||||||
|
,@(map (lambda (item) (string-append item ":")) append-directories)
|
||||||
|
" "
|
||||||
|
"mosh"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_MOSH")
|
||||||
|
" "
|
||||||
|
;,@(map (lambda (item) (string-append "--loadpath=" item " "))
|
||||||
|
;(append append-directories prepend-directories))
|
||||||
|
;" "
|
||||||
|
,input-file)))))
|
||||||
|
(picrin
|
||||||
|
(type . interpreter)
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(apply string-append
|
||||||
|
`("picrin"
|
||||||
|
" "
|
||||||
|
,(util-getenv "COMPILE_R7RS_PICRIN")
|
||||||
|
" "
|
||||||
|
,@(map (lambda (item)
|
||||||
|
(string-append "-l " item " "))
|
||||||
|
library-files)
|
||||||
|
" "
|
||||||
|
"-e"
|
||||||
|
" "
|
||||||
|
,input-file)))))
|
||||||
|
(racket
|
||||||
|
(type . interpreter)
|
||||||
|
(library-command . ,(lambda (library-file prepend-directories append-directories r6rs?)
|
||||||
|
(let* ((full-path (search-library-file (append append-directories
|
||||||
|
prepend-directories)
|
||||||
|
library-file))
|
||||||
|
(library-rkt-file (change-file-suffix full-path ".rkt"))
|
||||||
|
)
|
||||||
|
(apply string-append
|
||||||
|
`("printf"
|
||||||
|
" "
|
||||||
|
"'#lang r7rs\\n(import (scheme base))\\n(include \""
|
||||||
|
,(path->filename library-file)
|
||||||
|
"\")\\n"
|
||||||
|
"'"
|
||||||
|
" "
|
||||||
|
">"
|
||||||
|
" "
|
||||||
|
,library-rkt-file)))))
|
||||||
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
|
(let ((rkt-input-file (if (string=? input-file "")
|
||||||
|
""
|
||||||
|
(change-file-suffix input-file ".rkt"))))
|
||||||
|
(if r6rs?
|
||||||
|
#t
|
||||||
|
(when (not (string=? rkt-input-file ""))
|
||||||
|
(when (file-exists? rkt-input-file)
|
||||||
|
(delete-file rkt-input-file))
|
||||||
|
(with-output-to-file
|
||||||
|
rkt-input-file
|
||||||
|
(lambda ()
|
||||||
|
(display "#lang r7rs")
|
||||||
|
(newline)
|
||||||
|
(display "(import (scheme base))")
|
||||||
|
(newline)
|
||||||
|
(display "(include \"")
|
||||||
|
(display (path->filename input-file))
|
||||||
|
(display "\")")
|
||||||
|
(newline)))))
|
||||||
(apply string-append
|
(apply string-append
|
||||||
`("gosh"
|
`("racket"
|
||||||
" "
|
" "
|
||||||
,(util-getenv "COMPILE_R7RS_GAUCHE")
|
,(util-getenv "COMPILE_R7RS_RACKET")
|
||||||
" "
|
" "
|
||||||
"-r7"
|
"-I"
|
||||||
|
" "
|
||||||
|
,(if r6rs? "r6rs" "r7rs")
|
||||||
" "
|
" "
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append "-I" " " item " "))
|
(string-append "-S " item " "))
|
||||||
prepend-directories)
|
prepend-directories)
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append "-A" " " item " "))
|
(string-append "-S " item " "))
|
||||||
append-directories)
|
append-directories)
|
||||||
" "
|
" "
|
||||||
,input-file)))))
|
,(if r6rs? input-file rkt-input-file)
|
||||||
(gerbil
|
))))))
|
||||||
(type . compiler)
|
(sagittarius
|
||||||
#;(library-command . ,(lambda (library-file prepend-directories append-directories r6rs?)
|
(type . interpreter)
|
||||||
(apply string-append
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
`("gxc"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_GERBIL")
|
|
||||||
" "
|
|
||||||
,library-file))))
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("gxc"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_GERBIL")
|
|
||||||
" "
|
|
||||||
"-prelude \":scheme/r7rs\""
|
|
||||||
" "
|
|
||||||
"-exe"
|
|
||||||
" "
|
|
||||||
"-static"
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item) (string-append item "/ ")) prepend-directories)
|
|
||||||
,@(map (lambda (item) (string-append item "/ ")) append-directories)
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(guile
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("guile"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_GUILE")
|
|
||||||
" "
|
|
||||||
,(if r6rs? "--r6rs" "--r7rs")
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-L" " " item " "))
|
|
||||||
prepend-directories)
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-L" " " item " "))
|
|
||||||
append-directories)
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(husk
|
|
||||||
(type . compiler)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("huskc"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_HUSK")
|
|
||||||
" "
|
|
||||||
"-o"
|
|
||||||
" "
|
|
||||||
,output-file
|
|
||||||
" "
|
|
||||||
;,@(map (lambda (item) (string-append "-L" " " item " ")) prepend-directories)
|
|
||||||
;,@(map (lambda (item) (string-append "-L" " " item " ")) append-directories)
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(ikarus
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("IKARUS_LIBRARY_PATH="
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append item ":"))
|
|
||||||
prepend-directories)
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append item ":"))
|
|
||||||
append-directories)
|
|
||||||
" "
|
|
||||||
"ikarus"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_IKARUS")
|
|
||||||
" "
|
|
||||||
"--r6rs-script"
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(ironscheme
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("ironscheme"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_IRONSCHEME")
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-I \"" item "\" "))
|
|
||||||
prepend-directories)
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-I \"" item "\" "))
|
|
||||||
append-directories)
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(kawa
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("kawa"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_KAWA")
|
|
||||||
" "
|
|
||||||
"-Dkawa.import.path=\""
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append item "/*.sld:"))
|
|
||||||
(append prepend-directories append-directories))
|
|
||||||
"\" "
|
|
||||||
"--r7rs"
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(larceny
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("larceny"
|
|
||||||
,(util-getenv "COMPILE_R7RS_LARCENY")
|
|
||||||
" "
|
|
||||||
"-nobanner"
|
|
||||||
" "
|
|
||||||
"-quiet"
|
|
||||||
" "
|
|
||||||
"-utf8"
|
|
||||||
" "
|
|
||||||
,(if r6rs? "-r6rs" "-r7rs")
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-I " item " "))
|
|
||||||
prepend-directories)
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-A " item " "))
|
|
||||||
append-directories)
|
|
||||||
" "
|
|
||||||
"-program"
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(loko
|
|
||||||
(type . compiler)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(let ((out (string-cut-from-end input-file 4)))
|
|
||||||
(apply string-append
|
|
||||||
`("LOKO_LIBRARY_PATH="
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append item ":"))
|
|
||||||
prepend-directories)
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append item ":"))
|
|
||||||
append-directories)
|
|
||||||
" "
|
|
||||||
"loko "
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_LOKO")
|
|
||||||
" "
|
|
||||||
,(if r6rs? "-std=r6rs" "-std=r7rs")
|
|
||||||
" "
|
|
||||||
"--compile"
|
|
||||||
" "
|
|
||||||
,input-file
|
|
||||||
" "
|
|
||||||
"&&"
|
|
||||||
" "
|
|
||||||
"mv"
|
|
||||||
" "
|
|
||||||
,out
|
|
||||||
" "
|
|
||||||
,output-file))))))
|
|
||||||
(meevax
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("meevax"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_MEEVAX")
|
|
||||||
" "
|
|
||||||
;,@(map (lambda (item) (string-append "--load " item " ")) library-files)
|
|
||||||
;,@(map (lambda (item) (string-append " " item " ")) prepend-directories)
|
|
||||||
;,@(map (lambda (item) (string-append " " item " ")) append-directories)
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(mit-scheme
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("mit-scheme"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_MIT_SCHEME")
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "--load " item " "))
|
|
||||||
library-files)
|
|
||||||
" "
|
|
||||||
"--load"
|
|
||||||
" "
|
|
||||||
,input-file
|
|
||||||
" "
|
|
||||||
"--eval \"(exit 0)\"")))))
|
|
||||||
(mosh
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("MOSH_LOAD_PATH="
|
|
||||||
,@(map (lambda (item) (string-append item ":")) prepend-directories)
|
|
||||||
,@(map (lambda (item) (string-append item ":")) append-directories)
|
|
||||||
" "
|
|
||||||
"mosh"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_MOSH")
|
|
||||||
" "
|
|
||||||
;,@(map (lambda (item) (string-append "--loadpath=" item " "))
|
|
||||||
;(append append-directories prepend-directories))
|
|
||||||
;" "
|
|
||||||
,input-file)))))
|
|
||||||
(picrin
|
|
||||||
(type . interpreter)
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(apply string-append
|
|
||||||
`("picrin"
|
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_PICRIN")
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "-l " item " "))
|
|
||||||
library-files)
|
|
||||||
" "
|
|
||||||
"-e"
|
|
||||||
" "
|
|
||||||
,input-file)))))
|
|
||||||
(racket
|
|
||||||
(type . interpreter)
|
|
||||||
(library-command . ,(lambda (library-file prepend-directories append-directories r6rs?)
|
|
||||||
(let* ((full-path (search-library-file (append append-directories
|
|
||||||
prepend-directories)
|
|
||||||
library-file))
|
|
||||||
(library-rkt-file (change-file-suffix full-path ".rkt"))
|
|
||||||
)
|
|
||||||
(apply string-append
|
|
||||||
`("printf"
|
|
||||||
" "
|
|
||||||
"'#lang r7rs\\n(import (scheme base))\\n(include \""
|
|
||||||
,(path->filename library-file)
|
|
||||||
"\")\\n"
|
|
||||||
"'"
|
|
||||||
" "
|
|
||||||
">"
|
|
||||||
" "
|
|
||||||
,library-rkt-file)))))
|
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
|
||||||
(let ((rkt-input-file (if (string=? input-file "")
|
|
||||||
""
|
|
||||||
(change-file-suffix input-file ".rkt"))))
|
|
||||||
(if r6rs?
|
|
||||||
#t
|
|
||||||
(when (not (string=? rkt-input-file ""))
|
|
||||||
(when (file-exists? rkt-input-file)
|
|
||||||
(delete-file rkt-input-file))
|
|
||||||
(with-output-to-file
|
|
||||||
rkt-input-file
|
|
||||||
(lambda ()
|
|
||||||
(display "#lang r7rs")
|
|
||||||
(newline)
|
|
||||||
(display "(import (scheme base))")
|
|
||||||
(newline)
|
|
||||||
(display "(include \"")
|
|
||||||
(display (path->filename input-file))
|
|
||||||
(display "\")")
|
|
||||||
(newline)))))
|
|
||||||
(apply string-append
|
(apply string-append
|
||||||
`("racket"
|
`("sash"
|
||||||
" "
|
" "
|
||||||
,(util-getenv "COMPILE_R7RS_RACKET")
|
,(util-getenv "COMPILE_R7RS_SAGITTARIUS")
|
||||||
" "
|
" "
|
||||||
"-I"
|
,(if r6rs? "-r6" "-r7")
|
||||||
" "
|
|
||||||
,(if r6rs? "r6rs" "r7rs")
|
|
||||||
" "
|
" "
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append "-S " item " "))
|
(string-append "-L " item " "))
|
||||||
prepend-directories)
|
prepend-directories)
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append "-S " item " "))
|
(string-append "-A " item " "))
|
||||||
append-directories)
|
append-directories)
|
||||||
" "
|
" "
|
||||||
,(if r6rs? input-file rkt-input-file)
|
,input-file)))))
|
||||||
))))))
|
(skint
|
||||||
(sagittarius
|
(type . interpreter)
|
||||||
(type . interpreter)
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
(apply string-append
|
||||||
(apply string-append
|
`("skint"
|
||||||
`("sash"
|
" "
|
||||||
" "
|
,(util-getenv "COMPILE_R7RS_SKINT")
|
||||||
,(util-getenv "COMPILE_R7RS_SAGITTARIUS")
|
" "
|
||||||
" "
|
,@(map (lambda (item)
|
||||||
,(if r6rs? "-r6" "-r7")
|
(string-append "-I " item "/ "))
|
||||||
" "
|
prepend-directories)
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(string-append "-L " item " "))
|
(string-append "-A " item "/ "))
|
||||||
prepend-directories)
|
append-directories)
|
||||||
,@(map (lambda (item)
|
" "
|
||||||
(string-append "-A " item " "))
|
,input-file)))))
|
||||||
append-directories)
|
(stak
|
||||||
" "
|
(type . interpreter)
|
||||||
,input-file)))))
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(skint
|
(apply string-append
|
||||||
(type . interpreter)
|
`("stak"
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
" "
|
||||||
(apply string-append
|
,(util-getenv "COMPILE_R7RS_STAK")
|
||||||
`("skint"
|
" "
|
||||||
" "
|
;,@(map (lambda (item) (string-append "-I " item " ")) prepend-directories)
|
||||||
,(util-getenv "COMPILE_R7RS_SKINT")
|
;,@(map (lambda (item) (string-append "-A " item " ")) append-directories)
|
||||||
" "
|
" "
|
||||||
,@(map (lambda (item)
|
,input-file)))))
|
||||||
(string-append "-I " item "/ "))
|
(stklos
|
||||||
prepend-directories)
|
(type . interpreter)
|
||||||
,@(map (lambda (item)
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(string-append "-A " item "/ "))
|
(apply string-append
|
||||||
append-directories)
|
`("stklos"
|
||||||
" "
|
" "
|
||||||
,input-file)))))
|
,(util-getenv "COMPILE_R7RS_STKLOS")
|
||||||
(stak
|
" "
|
||||||
(type . interpreter)
|
,@(map (lambda (item)
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
(string-append "-I " item " "))
|
||||||
(apply string-append
|
prepend-directories)
|
||||||
`("stak"
|
,@(map (lambda (item)
|
||||||
" "
|
(string-append "-A " item " "))
|
||||||
,(util-getenv "COMPILE_R7RS_STAK")
|
append-directories)
|
||||||
" "
|
" "
|
||||||
;,@(map (lambda (item) (string-append "-I " item " ")) prepend-directories)
|
,input-file)))))
|
||||||
;,@(map (lambda (item) (string-append "-A " item " ")) append-directories)
|
(tr7
|
||||||
" "
|
(type . interpreter)
|
||||||
,input-file)))))
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(stklos
|
(apply string-append
|
||||||
(type . interpreter)
|
`("TR7_LIB_PATH="
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
,@(map (lambda (item)
|
||||||
(apply string-append
|
(string-append item ":"))
|
||||||
`("stklos"
|
prepend-directories)
|
||||||
" "
|
,@(map (lambda (item)
|
||||||
,(util-getenv "COMPILE_R7RS_STKLOS")
|
(string-append item ":"))
|
||||||
" "
|
append-directories)
|
||||||
,@(map (lambda (item)
|
" "
|
||||||
(string-append "-I " item " "))
|
"tr7i"
|
||||||
prepend-directories)
|
" "
|
||||||
,@(map (lambda (item)
|
,(util-getenv "COMPILE_R7RS_TR7")
|
||||||
(string-append "-A " item " "))
|
" "
|
||||||
append-directories)
|
,input-file)))))
|
||||||
" "
|
(vicare
|
||||||
,input-file)))))
|
(type . compiler)
|
||||||
(tr7
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(type . interpreter)
|
(apply string-append
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
`("vicare"
|
||||||
(apply string-append
|
" "
|
||||||
`("TR7_LIB_PATH="
|
,(util-getenv "COMPILE_R7RS_VICARE")
|
||||||
,@(map (lambda (item)
|
" "
|
||||||
(string-append item ":"))
|
,@(map (lambda (item)
|
||||||
prepend-directories)
|
(string-append "-I " item " "))
|
||||||
,@(map (lambda (item)
|
prepend-directories)
|
||||||
(string-append item ":"))
|
,@(map (lambda (item)
|
||||||
append-directories)
|
(string-append "-A " item " "))
|
||||||
" "
|
append-directories)
|
||||||
"tr7i"
|
" "
|
||||||
" "
|
"--compile-program"
|
||||||
,(util-getenv "COMPILE_R7RS_TR7")
|
" "
|
||||||
" "
|
,input-file)))))
|
||||||
,input-file)))))
|
(ypsilon
|
||||||
(vicare
|
(type . interpreter)
|
||||||
(type . compiler)
|
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
(apply string-append
|
||||||
(apply string-append
|
`("ypsilon"
|
||||||
`("vicare"
|
" "
|
||||||
" "
|
,(util-getenv "COMPILE_R7RS_YPSILON")
|
||||||
,(util-getenv "COMPILE_R7RS_VICARE")
|
" "
|
||||||
" "
|
,(if r6rs? "--r6rs" "--r7rs")
|
||||||
,@(map (lambda (item)
|
" "
|
||||||
(string-append "-I " item " "))
|
"--mute"
|
||||||
prepend-directories)
|
" "
|
||||||
,@(map (lambda (item)
|
"--quiet"
|
||||||
(string-append "-A " item " "))
|
" "
|
||||||
append-directories)
|
,@(map (lambda (item)
|
||||||
" "
|
(string-append "--sitelib=" item " "))
|
||||||
"--compile-program"
|
prepend-directories)
|
||||||
" "
|
,@(map (lambda (item)
|
||||||
,input-file)))))
|
(string-append "--sitelib=" item " "))
|
||||||
(ypsilon
|
append-directories)
|
||||||
(type . interpreter)
|
" "
|
||||||
(command . ,(lambda (input-file output-file prepend-directories append-directories library-files r6rs?)
|
"--top-level-program"
|
||||||
(apply string-append
|
" "
|
||||||
`("ypsilon"
|
,input-file)))))))))
|
||||||
" "
|
|
||||||
,(util-getenv "COMPILE_R7RS_YPSILON")
|
|
||||||
" "
|
|
||||||
,(if r6rs? "--r6rs" "--r7rs")
|
|
||||||
" "
|
|
||||||
"--mute"
|
|
||||||
" "
|
|
||||||
"--quiet"
|
|
||||||
" "
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "--sitelib=" item " "))
|
|
||||||
prepend-directories)
|
|
||||||
,@(map (lambda (item)
|
|
||||||
(string-append "--sitelib=" item " "))
|
|
||||||
append-directories)
|
|
||||||
" "
|
|
||||||
"--top-level-program"
|
|
||||||
" "
|
|
||||||
,input-file)))))))))
|
|
||||||
|
|
Loading…
Reference in New Issue