cs: fix discovery of Chez lib name on Windows

This commit is contained in:
Matthew Flatt 2019-04-10 07:50:25 -06:00
parent 822429f4e5
commit 8a368cac99

View File

@ -172,12 +172,19 @@
;; ----------------------------------------
;; The library name changes with the version:
;; The library name changes with the version, so extract it from the
;; Chez Scheme makefile
(define scheme-lib
(parameterize ([current-directory (build-path scheme-dir machine "boot" machine)])
(for/or ([f (in-list (directory-list))]
#:when (regexp-match? #rx"^csv.*mt.lib$" f))
f)))
(let ()
(define name
(call-with-input-file*
(build-path scheme-dir "c" (format "Makefile.~a" machine))
(lambda (i)
(for/or ([l (in-lines i)])
(define m (regexp-match #rx"MTKernelLib *= *.*(csv.*mt.lib)" l))
(and m
(cadr m))))))
(build-path scheme-dir machine "boot" machine name)))
(define rel2-scheme-dir (build-path 'up
(if (relative-path? scheme-dir)