fix change that avoids re-running documents just to get xref information when the .sxref files are up-to-date
svn: r11993
This commit is contained in:
parent
078ce5f8c6
commit
b46a5091ba
|
@ -357,6 +357,7 @@
|
||||||
doc)
|
doc)
|
||||||
(let* ([info-out-file (build-path (or latex-dest (doc-dest-dir doc)) "out.sxref")]
|
(let* ([info-out-file (build-path (or latex-dest (doc-dest-dir doc)) "out.sxref")]
|
||||||
[info-in-file (build-path (or latex-dest (doc-dest-dir doc)) "in.sxref")]
|
[info-in-file (build-path (or latex-dest (doc-dest-dir doc)) "in.sxref")]
|
||||||
|
[out-file (build-path (doc-dest-dir doc) "index.html")]
|
||||||
[src-zo (let-values ([(base name dir?) (split-path (doc-src-file doc))])
|
[src-zo (let-values ([(base name dir?) (split-path (doc-src-file doc))])
|
||||||
(build-path base "compiled" (path-add-suffix name ".zo")))]
|
(build-path base "compiled" (path-add-suffix name ".zo")))]
|
||||||
[renderer (make-renderer latex-dest doc)]
|
[renderer (make-renderer latex-dest doc)]
|
||||||
|
@ -374,17 +375,24 @@
|
||||||
(build-path (collection-path "scribble")
|
(build-path (collection-path "scribble")
|
||||||
"scribble.css")
|
"scribble.css")
|
||||||
#f (lambda () +inf.0)))]
|
#f (lambda () +inf.0)))]
|
||||||
|
[my-time (file-or-directory-modify-seconds out-file #f (lambda () -inf.0))]
|
||||||
[info-out-time (file-or-directory-modify-seconds info-out-file #f (lambda () #f))]
|
[info-out-time (file-or-directory-modify-seconds info-out-file #f (lambda () #f))]
|
||||||
[info-in-time (file-or-directory-modify-seconds info-in-file #f (lambda () #f))]
|
[info-in-time (file-or-directory-modify-seconds info-in-file #f (lambda () #f))]
|
||||||
[my-time (min (or info-out-time -inf.0) (or info-in-time -inf.0))]
|
[info-time (min (or info-out-time -inf.0) (or info-in-time -inf.0))]
|
||||||
[vers (send renderer get-serialize-version)]
|
[vers (send renderer get-serialize-version)]
|
||||||
|
[src-time (max aux-time
|
||||||
|
(file-or-directory-modify-seconds
|
||||||
|
src-zo #f (lambda () +inf.0)))]
|
||||||
[up-to-date?
|
[up-to-date?
|
||||||
(and info-out-time
|
(and info-out-time
|
||||||
info-in-time
|
info-in-time
|
||||||
(or (not can-run?)
|
(or (not can-run?)
|
||||||
(my-time . >= . (max aux-time
|
;; Need to rebuild if output file is older than input:
|
||||||
(file-or-directory-modify-seconds
|
(my-time . >= . src-time)
|
||||||
src-zo #f (lambda () +inf.0))))))]
|
;; But we can use in/out information if they're already built;
|
||||||
|
;; this is mostly useful if we interrupt setup-plt after
|
||||||
|
;; it runs some documents without rendering them:
|
||||||
|
(info-time . >= . src-time)))]
|
||||||
[can-run? (and (or (not latex-dest)
|
[can-run? (and (or (not latex-dest)
|
||||||
(not (omit? (doc-category doc))))
|
(not (omit? (doc-category doc))))
|
||||||
(or can-run?
|
(or can-run?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user