setup-plt -D skips compilation of .scrbl files
svn: r15727
This commit is contained in:
parent
1bf5188e2e
commit
f37c71c6ee
|
@ -144,7 +144,10 @@
|
||||||
(let ([zo (append-zo-suffix b)])
|
(let ([zo (append-zo-suffix b)])
|
||||||
(compile-to-zo f zo n prefix verbose? mod?)))))
|
(compile-to-zo f zo n prefix verbose? mod?)))))
|
||||||
|
|
||||||
(define (compile-directory dir info #:verbose [verbose? #t] #:skip-path [orig-skip-path #f])
|
(define (compile-directory dir info
|
||||||
|
#:verbose [verbose? #t]
|
||||||
|
#:skip-path [orig-skip-path #f]
|
||||||
|
#:skip-doc-sources? [skip-docs? #f])
|
||||||
(define info* (or info (lambda (key mk-default) (mk-default))))
|
(define info* (or info (lambda (key mk-default) (mk-default))))
|
||||||
(define omit-paths (omitted-paths dir c-get-info/full))
|
(define omit-paths (omitted-paths dir c-get-info/full))
|
||||||
(define skip-path (and orig-skip-path (path->bytes
|
(define skip-path (and orig-skip-path (path->bytes
|
||||||
|
@ -173,7 +176,9 @@
|
||||||
;; Find all .ss/.scm files:
|
;; Find all .ss/.scm files:
|
||||||
(filter extract-base-filename/ss (directory-list))
|
(filter extract-base-filename/ss (directory-list))
|
||||||
;; Add specified doc sources:
|
;; Add specified doc sources:
|
||||||
(map car (info* 'scribblings (lambda () null))))]
|
(if skip-docs?
|
||||||
|
null
|
||||||
|
(map car (info* 'scribblings (lambda () null)))))]
|
||||||
[sses (remove* omit-paths sses)])
|
[sses (remove* omit-paths sses)])
|
||||||
(for-each (make-caching-managed-compile-zo) sses)))
|
(for-each (make-caching-managed-compile-zo) sses)))
|
||||||
(when (compile-subcollections)
|
(when (compile-subcollections)
|
||||||
|
@ -183,13 +188,20 @@
|
||||||
(for ([p (directory-list dir)])
|
(for ([p (directory-list dir)])
|
||||||
(let ([p* (build-path dir p)])
|
(let ([p* (build-path dir p)])
|
||||||
(when (and (directory-exists? p*) (not (member p omit-paths)))
|
(when (and (directory-exists? p*) (not (member p omit-paths)))
|
||||||
(compile-directory p* (c-get-info/full p*))))))))
|
(compile-directory p* (c-get-info/full p*)
|
||||||
|
#:verbose verbose?
|
||||||
|
#:skip-path skip-path
|
||||||
|
#:skip-doc-sources? skip-docs?)))))))
|
||||||
|
|
||||||
(define (compile-collection-zos collection #:skip-path [skip-path #f] . cp)
|
(define (compile-collection-zos collection
|
||||||
|
#:skip-path [skip-path #f]
|
||||||
|
#:skip-doc-sources? [skip-docs? #f]
|
||||||
|
. cp)
|
||||||
(compile-directory (apply collection-path collection cp)
|
(compile-directory (apply collection-path collection cp)
|
||||||
(c-get-info (cons collection cp))
|
(c-get-info (cons collection cp))
|
||||||
#:verbose #f
|
#:verbose #f
|
||||||
#:skip-path skip-path))
|
#:skip-path skip-path
|
||||||
|
#:skip-doc-sources? skip-docs?))
|
||||||
|
|
||||||
(define compile-directory-zos compile-directory)
|
(define compile-directory-zos compile-directory)
|
||||||
|
|
||||||
|
|
|
@ -65,14 +65,20 @@ If @scheme[verbose?] is @scheme[#t], the output file for each given
|
||||||
file is reported through the current output port.}
|
file is reported through the current output port.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(compile-collection-zos [collection string?] ...+)
|
@defproc[(compile-collection-zos [collection string?] ...+
|
||||||
|
[#:skip-path skip-path (or/c path-string? #f) #f]
|
||||||
|
[#:skip-doc-sources? skip-docs? any/c #f])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Compiles the specified collection's files to @filepath{.zo} files.
|
Compiles the specified collection's files to @filepath{.zo} files.
|
||||||
The @filepath{.zo} files are placed into the collection's
|
The @filepath{.zo} files are placed into the collection's
|
||||||
@filepath{compiled} directory. By default, all files with the
|
@filepath{compiled} directory. By default, all files with the
|
||||||
extension @filepath{.ss} or @filepath{.scm} in a collection are
|
extension @filepath{.ss} or @filepath{.scm} in a collection are
|
||||||
compiled, as are all such files within subdirectories.
|
compiled, as are all such files within subdirectories, execept that
|
||||||
|
any file or directory whose path starts with @scheme[scheme-path] is
|
||||||
|
skipped. (``Starts with'' means that the simplified path @scheme[_p]'s
|
||||||
|
byte-string form after @scheme[(simplify-path _p #f)]starts with the
|
||||||
|
byte-string form of @scheme[(simplify-path skip-path #f)].)
|
||||||
|
|
||||||
The collection compiler reads the collection's @filepath{info.ss} file
|
The collection compiler reads the collection's @filepath{info.ss} file
|
||||||
(see @secref[#:doc '(lib "scribblings/setup-plt/setup-plt.scrbl")
|
(see @secref[#:doc '(lib "scribblings/setup-plt/setup-plt.scrbl")
|
||||||
|
@ -103,10 +109,11 @@ collection. The following fields are used:
|
||||||
contents of @scheme[compile-omit-paths]. Do not use this
|
contents of @scheme[compile-omit-paths]. Do not use this
|
||||||
field; it is for backward compatibility.}
|
field; it is for backward compatibility.}
|
||||||
|
|
||||||
@item{@indexed-scheme[scribblings] : A list of pairs, each of which starts
|
@item{@indexed-scheme[scribblings] : A list of pairs, each of which
|
||||||
with a path for documentation source. The sources (and the
|
starts with a path for documentation source. The sources (and
|
||||||
files that they require) are compiled in the same way as
|
the files that they require) are compiled in the same way as
|
||||||
@filepath{.ss} and @filepath{.scm} files.}
|
@filepath{.ss} and @filepath{.scm} files, unless the provided
|
||||||
|
@scheme[skip-docs?] argument is a true value.}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -115,7 +122,10 @@ The compilation process for an individual file is driven by
|
||||||
|
|
||||||
|
|
||||||
@defproc[(compile-directory-zos [path path-string?]
|
@defproc[(compile-directory-zos [path path-string?]
|
||||||
[info ()])
|
[info ()]
|
||||||
|
[#:verbose verbose? any/c #f]
|
||||||
|
[#:skip-path skip-path (or/c path-string? #f) #f]
|
||||||
|
[#:skip-doc-sources? skip-docs? any/c #f])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Like @scheme[compile-collection-zos], but compiles the given directory
|
Like @scheme[compile-collection-zos], but compiles the given directory
|
||||||
|
|
|
@ -66,11 +66,14 @@ field), and field mutability.
|
||||||
|
|
||||||
@index['("structures" "equality")]{Two} structure values are
|
@index['("structures" "equality")]{Two} structure values are
|
||||||
@scheme[eqv?] if and only if they are @scheme[eq?]. Two structure
|
@scheme[eqv?] if and only if they are @scheme[eq?]. Two structure
|
||||||
values are @scheme[equal?] if they are @scheme[eq?], or if they are
|
values are @scheme[equal?] if they are @scheme[eq?]. By default, two
|
||||||
instances of the same structure type, no fields are opaque, and the
|
structure values are also @scheme[equal?] if they are instances of the
|
||||||
results of applying @scheme[struct->vector] to the structs are
|
same structure type, no fields are opaque, and the results of applying
|
||||||
|
@scheme[struct->vector] to the structs are
|
||||||
@scheme[equal?]. (Consequently, @scheme[equal?] testing for
|
@scheme[equal?]. (Consequently, @scheme[equal?] testing for
|
||||||
structures depends on the current inspector.)
|
structures may depend on the current inspector.) A structure type can
|
||||||
|
override the default @scheme[equal?] definition through the
|
||||||
|
@scheme[prop:equal+hash] property.
|
||||||
|
|
||||||
@local-table-of-contents[]
|
@local-table-of-contents[]
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
(if (author-element? a)
|
(if (author-element? a)
|
||||||
a
|
a
|
||||||
(let* ([s (content->string a)]
|
(let* ([s (content->string a)]
|
||||||
[m (regexp-match #rx"^(.*) ([A-Za-z]+)$" s)])
|
[m (regexp-match #px"^(.*) (\\p{L}+)$" s)])
|
||||||
(make-author-element
|
(make-author-element
|
||||||
#f
|
#f
|
||||||
(list a)
|
(list a)
|
||||||
|
|
|
@ -696,7 +696,7 @@
|
||||||
(setup-fprintf (current-error-port) #f " deleting ~a" (build-path c p))
|
(setup-fprintf (current-error-port) #f " deleting ~a" (build-path c p))
|
||||||
(delete-file (build-path c p))))))))
|
(delete-file (build-path c p))))))))
|
||||||
;; Make .zos
|
;; Make .zos
|
||||||
(compile-directory-zos dir info #:skip-path compile-skip-directory))
|
(compile-directory-zos dir info #:skip-path compile-skip-directory #:skip-doc-sources? (not (make-docs))))
|
||||||
make-base-empty-namespace))))
|
make-base-empty-namespace))))
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user