fix more bugs with lib paths in exe creation

svn: r12175
This commit is contained in:
Matthew Flatt 2008-10-30 10:55:07 +00:00
parent c5efa4c048
commit 487df2362e
4 changed files with 27 additions and 8 deletions

View File

@ -820,14 +820,15 @@
(get-lib-search-dirs)))]
[(and (list? p)
(eq? 'lib (car p)))
(let ([p (if (and (null? (cddr p))
(regexp-match #rx"^[^/]*[.]" (cadr p)))
p
(let ([s (regexp-split #rx"/" (cadr p))])
(if (null? (cdr s))
`(lib ,(cadr p) "main.ss")
(let ([s (reverse s)])
`(list ,(car s) ,@(reverse (cdr s)))))))])
(let ([p (if (null? (cddr p))
(if (regexp-match #rx"^[^/]*[.]" (cadr p))
p
(let ([s (regexp-split #rx"/" (cadr p))])
(if (null? (cdr s))
`(lib "main.ss" ,(cadr p))
(let ([s (reverse s)])
`(lib ,(car s) ,@(reverse (cdr s)))))))
p)])
(build-path (if (null? (cddr p))
(collection-path "mzlib")
(apply collection-path (cddr p)))

View File

@ -0,0 +1,8 @@
#lang scheme/base
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "file.gif" "icons"))
(with-output-to-file "stdout"
(lambda () (printf "This is 1d~n"))
#:exists 'append)

View File

@ -0,0 +1,8 @@
#lang scheme/base
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "html"))
(with-output-to-file "stdout"
(lambda () (printf "This is 1e~n"))
#:exists 'append)

View File

@ -213,6 +213,8 @@
(one-mz-test "embed-me1.ss" "This is 1\n" #t)
(one-mz-test "embed-me1b.ss" "This is 1b\n" #f)
(one-mz-test "embed-me1c.ss" "This is 1c\n" #f)
(one-mz-test "embed-me1d.ss" "This is 1d\n" #f)
(one-mz-test "embed-me1e.ss" "This is 1e\n" #f)
(one-mz-test "embed-me2.ss" "This is 1\nThis is 2: #t\n" #t)
;; Try unicode expr and cmdline: