make setup-plt --doc-pdf work right with a relative path

svn: r8134
This commit is contained in:
Matthew Flatt 2007-12-27 11:18:20 +00:00
parent c0872f69ea
commit d6adb5600e

View File

@ -832,8 +832,9 @@
(when (doc-pdf-dest) (when (doc-pdf-dest)
(setup-printf "Building PDF documentation (via pdflatex)") (setup-printf "Building PDF documentation (via pdflatex)")
(unless (directory-exists? (doc-pdf-dest)) (let ([dest-dir (path->complete-path (doc-pdf-dest))])
(make-directory (doc-pdf-dest))) (unless (directory-exists? dest-dir)
(make-directory dest-dir))
(let ([tmp-dir (build-path (find-system-path 'temp-dir) (let ([tmp-dir (build-path (find-system-path 'temp-dir)
(format "pltpdfdoc~a" (current-seconds)))]) (format "pltpdfdoc~a" (current-seconds)))])
(dynamic-wind (dynamic-wind
@ -855,14 +856,14 @@
(error 'setup-plt "pdflatex failed")) (error 'setup-plt "pdflatex failed"))
(loop (sub1 n)))) (loop (sub1 n))))
(let* ([f (path-replace-suffix f #".pdf")] (let* ([f (path-replace-suffix f #".pdf")]
[target (build-path (doc-pdf-dest) f)]) [target (build-path dest-dir f)])
(when (file-exists? target) (when (file-exists? target)
(delete-file target)) (delete-file target))
(copy-file f target)))) (copy-file f target))))
(directory-list)))) (directory-list))))
(lambda () (lambda ()
(when (directory-exists? tmp-dir) (when (directory-exists? tmp-dir)
(delete-directory/files tmp-dir)))))) (delete-directory/files tmp-dir)))))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Make Launchers ;; ;; Make Launchers ;;