Fix loko -o and make meevax silent

This commit is contained in:
retropikzel 2025-05-12 19:34:59 +03:00
parent d6aba7593b
commit c1189c0e76
1 changed files with 42 additions and 9 deletions

View File

@ -132,17 +132,35 @@
(gambit (gambit
(type . compiler) (type . compiler)
(library-command . ,(lambda (library-file prepend-directories append-directories r6rs?) (library-command . ,(lambda (library-file prepend-directories append-directories r6rs?)
(let ((out (string-append (string-cut-from-end library-file 4) ".o"))
(static-out (string-append (string-cut-from-end library-file 4) ".a")))
(apply string-append (apply string-append
`("gsc -obj" `("gsc -obj"
" " " "
,(util-getenv "COMPILE_R7RS_GAMBIT") ,(util-getenv "COMPILE_R7RS_GAMBIT")
" " " "
,library-file)))) ,(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 (apply string-append `("gsc"
" "
,(util-getenv "COMPILE_R7RS_GAMBIT")
" "
"-:search="
,@(map (lambda (item)
(string-append item ""))
(append prepend-directories append-directories))
" "
"-o"
" "
,output-file
" "
"-exe -nopreload"
" "
,input-file))
#;(apply string-append
`("echo '#!/usr/bin/env -S gsi-script -f -:search=" `("echo '#!/usr/bin/env -S gsi-script -f -:search="
,@(map (lambda (item) ,@(map (lambda (item)
(string-append item "/")) (string-append item "/:"))
(append prepend-directories append-directories)) (append prepend-directories append-directories))
"'" "'"
" " " "
@ -349,6 +367,7 @@
(loko (loko
(type . compiler) (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?)
(let ((out (string-cut-from-end output-file 4)))
(apply string-append (apply string-append
`("LOKO_LIBRARY_PATH=" `("LOKO_LIBRARY_PATH="
,@(map (lambda (item) ,@(map (lambda (item)
@ -366,7 +385,15 @@
" " " "
"--compile" "--compile"
" " " "
,input-file))))) ,input-file
" "
"&&"
" "
"mv"
" "
,out
" "
,output-file))))))
(meevax (meevax
(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?)
@ -590,6 +617,10 @@
" " " "
,(if r6rs? "--r6rs" "--r7rs") ,(if r6rs? "--r6rs" "--r7rs")
" " " "
"--mute"
" "
"--quiet"
" "
,@(map (lambda (item) ,@(map (lambda (item)
(string-append "--sitelib=" item " ")) (string-append "--sitelib=" item " "))
prepend-directories) prepend-directories)
@ -597,4 +628,6 @@
(string-append "--sitelib=" item " ")) (string-append "--sitelib=" item " "))
append-directories) append-directories)
" " " "
"--top-level-program"
" "
,input-file))))))))) ,input-file)))))))))