diff --git a/racket/collects/setup/unixstyle-install.rkt b/racket/collects/setup/unixstyle-install.rkt index 7536d02a00..bc338cfe19 100644 --- a/racket/collects/setup/unixstyle-install.rkt +++ b/racket/collects/setup/unixstyle-install.rkt @@ -410,6 +410,9 @@ (define (ftime file) (and (file-exists? file) (file-or-directory-modify-seconds file))) (let* ([src (cpath "config.rktd")]) + (define link-shared? + ;; before "config.rktd" is potentially modified: + (eq? 'shared (cross-system-type 'link))) (printf "Rewriting configuration file at: ~a...\n" src) (define old (or (and (file-exists? src) (call-with-input-file src read)) @@ -423,7 +426,7 @@ (printf ";; generated by unixstyle-install\n") (printf "#hash(\n") (out! 'doc-dir (dir: 'doc)) - (when (eq? 'shared (cross-system-type 'link)) ; never true for now + (when link-shared? ; never true for now (out! 'dll-dir (dir: 'lib))) (out! 'lib-dir (dir: 'librkt)) (out! 'pkgs-dir (dir: 'pkgs))