make scribble executable report the output file
svn: r7884 original commit: 2ea9ded9bfda2f04f563d2e1eb91a17639262b6a
This commit is contained in:
parent
e04f0ca3f4
commit
40e6579fea
|
@ -34,6 +34,10 @@
|
|||
(substring s 0 (sub1 (string-length s))))
|
||||
sep)))
|
||||
|
||||
(field [report-output? #f])
|
||||
(define/public (report-output!)
|
||||
(set! report-output? #t))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; marshal info
|
||||
|
||||
|
@ -292,7 +296,7 @@
|
|||
|
||||
(define/public (render ds fns ri)
|
||||
(map (lambda (d fn)
|
||||
(when #f
|
||||
(when report-output?
|
||||
(printf " [Output to ~a]\n" fn))
|
||||
(with-output-to-file fn
|
||||
#:exists 'truncate/replace
|
||||
|
|
|
@ -525,6 +525,8 @@
|
|||
part-whole-page?
|
||||
format-number)
|
||||
|
||||
(inherit-field report-output?)
|
||||
|
||||
(define/override (get-suffix) #"")
|
||||
|
||||
(define/override (get-dest-directory)
|
||||
|
@ -572,7 +574,8 @@
|
|||
|
||||
(define/override (render ds fns ri)
|
||||
(map (lambda (d fn)
|
||||
(printf " [Output to ~a/index.html]\n" fn)
|
||||
(when report-output?
|
||||
(printf " [Output to ~a/index.html]\n" fn))
|
||||
(unless (directory-exists? fn)
|
||||
(make-directory fn))
|
||||
(parameterize ([current-subdirectory (file-name-from-path fn)])
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
|
||||
(let ([renderer (new ((current-render-mixin) render%)
|
||||
[dest-dir dir])])
|
||||
(send renderer report-output!)
|
||||
(let* ([fns (map (lambda (fn)
|
||||
(let-values ([(base name dir?) (split-path fn)])
|
||||
(let ([fn (path-replace-suffix (or (current-dest-name) name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user