diff --git a/racket/src/worksp/csbuild.rkt b/racket/src/worksp/csbuild.rkt index dd2b57322a..8bb2276a79 100644 --- a/racket/src/worksp/csbuild.rkt +++ b/racket/src/worksp/csbuild.rkt @@ -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)