find starter.exe under Cygwin (PR 8603)

svn: r5946
This commit is contained in:
Matthew Flatt 2007-04-15 11:43:17 +00:00
parent 038f35e4a5
commit a61b6bc4a2

View File

@ -102,6 +102,9 @@
(fail)) (fail))
exe))) exe)))
(define exe-suffix?
(delay (equal? #"i386-cygwin" (path->bytes (system-library-subpath)))))
;; Find the magic point in the binary: ;; Find the magic point in the binary:
(define (find-cmdline what rx) (define (find-cmdline what rx)
(let ([m (regexp-match-positions rx (current-input-port))]) (let ([m (regexp-match-positions rx (current-input-port))])
@ -625,7 +628,10 @@
[(and mred? (eq? 'macosx (system-type))) [(and mred? (eq? 'macosx (system-type)))
(values (prepare-macosx-mred exe dest aux variant) #f #t)] (values (prepare-macosx-mred exe dest aux variant) #f #t)]
[unix-starter? [unix-starter?
(let ([starter (build-path (find-lib-dir) "starter")]) (let ([starter (build-path (find-lib-dir)
(if (force exe-suffix?)
"starter.exe"
"starter"))])
(when (or (file-exists? dest) (when (or (file-exists? dest)
(directory-exists? dest) (directory-exists? dest)
(link-exists? dest)) (link-exists? dest))