Add doc-binding option
This commit is contained in:
parent
e0a750d98b
commit
d1178fe6f4
|
@ -40,6 +40,7 @@
|
||||||
(and (eof-object? (read i)) v)))))
|
(and (eof-object? (read i)) v)))))
|
||||||
|
|
||||||
(define (run)
|
(define (run)
|
||||||
|
(define doc-binding 'doc)
|
||||||
(command-line
|
(command-line
|
||||||
#:program (short-program+command-name)
|
#:program (short-program+command-name)
|
||||||
#:once-any
|
#:once-any
|
||||||
|
@ -136,15 +137,19 @@
|
||||||
#:once-each
|
#:once-each
|
||||||
[("--quiet") "suppress output-file and undefined-tag reporting"
|
[("--quiet") "suppress output-file and undefined-tag reporting"
|
||||||
(current-quiet #t)]
|
(current-quiet #t)]
|
||||||
|
[("--doc-binding") new-doc-binding
|
||||||
|
"look for document in new-doc-binding rather than 'doc"
|
||||||
|
(set! doc-binding (string->symbol new-doc-binding))]
|
||||||
#:args (file . another-file)
|
#:args (file . another-file)
|
||||||
(let ([files (cons file another-file)])
|
(let ([files (cons file another-file)])
|
||||||
(parameterize ([current-command-line-arguments
|
(parameterize ([current-command-line-arguments
|
||||||
(list->vector (reverse (doc-command-line-arguments)))])
|
(list->vector (reverse (doc-command-line-arguments)))])
|
||||||
(build-docs (map (lambda (file)
|
(build-docs (map (lambda (file)
|
||||||
;; Try `doc' submodule, first:
|
;; Try `doc' submodule, first:
|
||||||
(if (module-declared? `(submod (file ,file) doc) #t)
|
(if (module-declared? `(submod (file ,file) ,doc-binding) #t)
|
||||||
(dynamic-require `(submod (file ,file) doc) 'doc)
|
(dynamic-require `(submod (file ,file) ,doc-binding)
|
||||||
(dynamic-require `(file ,file) 'doc)))
|
doc-binding)
|
||||||
|
(dynamic-require `(file ,file) doc-binding)))
|
||||||
files)
|
files)
|
||||||
files)))))
|
files)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user