raco setup: fix doc dependency check for PLTCOMPILEDROOTS

A doc build depends on its source's ".zo" file, which might
not be next to the source due to a PLTCOMPILEDROOTS setting.

Closes PR 13640
This commit is contained in:
Matthew Flatt 2013-03-30 16:08:11 -06:00
parent 1ff3e3b942
commit 0a482b6159

View File

@ -662,7 +662,11 @@
[stamp-file (sxref-path latex-dest doc "stamp.sxref")]
[out-file (build-path (doc-dest-dir doc) "index.html")]
[src-zo (let-values ([(base name dir?) (split-path (doc-src-file doc))])
(build-path base "compiled" (path-add-suffix name ".zo")))]
(define path (build-path base "compiled" (path-add-suffix name ".zo")))
(or (for/or ([root (in-list (current-compiled-file-roots))])
(define p (reroot-path* path root))
(and (file-exists? p) p))
path))]
[renderer (make-renderer latex-dest doc)]
[can-run? (can-build? only-dirs doc)]
[stamp-time (file-or-directory-modify-seconds stamp-file #f (lambda () -inf.0))]
@ -1106,3 +1110,11 @@
(define (info-deps->doc info)
(filter-map (lambda (i) (and (info? i) (info-doc i))) (info-deps info)))
(define (reroot-path* base root)
(cond
[(eq? root 'same) base]
[(relative-path? root)
(build-path base root)]
[else
(reroot-path base root)]))