fix temp file names when building PDFs of installed docs
Closes PR 11830
This commit is contained in:
parent
df4ffe3573
commit
192c566294
|
@ -22,7 +22,8 @@
|
|||
[prefix-file #f]
|
||||
[style-file #f]
|
||||
[style-extra-files null]
|
||||
[extra-files null])
|
||||
[extra-files null]
|
||||
[helper-file-prefix #f])
|
||||
|
||||
(define/public (current-render-mode)
|
||||
'())
|
||||
|
@ -567,14 +568,15 @@
|
|||
(define/public (auto-extra-files-paths v) null)
|
||||
|
||||
(define/public (install-extra-files ds)
|
||||
(for ([fn extra-files]) (install-file fn))
|
||||
(for ([fn extra-files]) (install-file fn #:private-name? #f))
|
||||
(unless prefix-file
|
||||
(for ([d (in-list ds)])
|
||||
(let ([extras (ormap (lambda (v) (and (auto-extra-files? v) v))
|
||||
(style-properties (part-style d)))])
|
||||
(when extras
|
||||
(for ([fn (in-list (auto-extra-files-paths extras))])
|
||||
(install-file (main-collects-relative->path fn))))))))
|
||||
(install-file (main-collects-relative->path fn)
|
||||
#:private-name? #f)))))))
|
||||
|
||||
(define/public (render ds fns ri)
|
||||
;; maybe this should happen even if fns is empty or all #f?
|
||||
|
@ -699,7 +701,7 @@
|
|||
(define copied-srcs (make-hash))
|
||||
(define copied-dests (make-hash))
|
||||
|
||||
(define/public (install-file fn [content #f])
|
||||
(define/public (install-file fn [content #f] #:private-name? [private-name? #t])
|
||||
(if (and refer-to-existing-files
|
||||
(not content))
|
||||
(if (string? fn)
|
||||
|
@ -712,7 +714,12 @@
|
|||
[dest-dir (get-dest-directory #t)]
|
||||
[fn (file-name-from-path fn)])
|
||||
(let ([src-file (build-path (or src-dir (current-directory)) fn)]
|
||||
[dest-file (build-path (or dest-dir (current-directory)) fn)]
|
||||
[dest-file (build-path (or dest-dir (current-directory))
|
||||
(if (and private-name?
|
||||
helper-file-prefix)
|
||||
(string-append helper-file-prefix
|
||||
(path-element->string fn))
|
||||
fn))]
|
||||
[next-file-name (lambda (dest)
|
||||
(let-values ([(base name dir?) (split-path dest)])
|
||||
(build-path
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
searches
|
||||
deps
|
||||
known-deps
|
||||
build? time out-time need-run?
|
||||
need-in-write? need-out-write?
|
||||
vers rendered? failed?)
|
||||
build? time out-time need-run?
|
||||
need-in-write? need-out-write?
|
||||
vers rendered? failed?)
|
||||
#:transparent
|
||||
#:mutable)
|
||||
|
||||
|
@ -362,7 +362,12 @@
|
|||
[dest-dir latex-dest]
|
||||
;; Use PLT manual style:
|
||||
[prefix-file (collection-file-path "manual-prefix.tex" "scribble")]
|
||||
[style-file (collection-file-path "manual-style.tex" "scribble")])
|
||||
[style-file (collection-file-path "manual-style.tex" "scribble")]
|
||||
;; All .tex files go to the same directory, so prefix
|
||||
;; generated/copied file names to keep them separate:
|
||||
[helper-file-prefix (let-values ([(base name dir?) (split-path
|
||||
(doc-dest-dir doc))])
|
||||
(path-element->string name))])
|
||||
(let* ([flags (doc-flags doc)]
|
||||
[multi? (memq 'multi-page flags)]
|
||||
[main? (doc-under-main? doc)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user