From 0a482b615914041bb79cfc8b5a59a4ef43fdd94e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 30 Mar 2013 16:08:11 -0600 Subject: [PATCH] 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 --- collects/setup/scribble.rkt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/collects/setup/scribble.rkt b/collects/setup/scribble.rkt index 8b4d1178ba..7e4295beb1 100644 --- a/collects/setup/scribble.rkt +++ b/collects/setup/scribble.rkt @@ -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)]))