From a6c28c2c064437c0f257c1c916a602259db2febc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 1 Feb 2014 09:44:57 -0700 Subject: [PATCH] raco setup: fix test for installing doc CSS to user-specific location For example, if a package is installed in user scope where no user-scope documentation is already built, CSS files need to be in place for the main page of user-specific documentation. --- .../racket-pkgs/racket-index/setup/scribble.rkt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/racket-pkgs/racket-index/setup/scribble.rkt b/pkgs/racket-pkgs/racket-index/setup/scribble.rkt index 28550e7b2d..31ee57ebe1 100644 --- a/pkgs/racket-pkgs/racket-index/setup/scribble.rkt +++ b/pkgs/racket-pkgs/racket-index/setup/scribble.rkt @@ -263,11 +263,19 @@ (path->relative-string/setup p)) (delete-directory/files p))))) + (define auto-main? (and auto-start-doc? + (or (ormap can-build*? main-docs) + (and tidy? (not avoid-main?))))) + (define auto-user? (and auto-start-doc? + (or (ormap can-build*? user-docs) + (and tidy? make-user?)))) + (define (can-build**? doc) (can-build? only-dirs doc auto-main? auto-user?)) + (unless latex-dest ;; Make sure "scribble.css", etc., is in place: (let ([ht (make-hash)]) (for ([doc (in-list docs)]) - (when (can-build? only-dirs doc) + (when (can-build**? doc) (check-shared-files (doc-dest-dir doc) (or (memq 'main-doc-root (doc-flags doc)) (memq 'user-doc-root (doc-flags doc))) @@ -275,13 +283,6 @@ ht setup-printf))))) - (define auto-main? (and auto-start-doc? - (or (ormap can-build*? main-docs) - (and tidy? (not avoid-main?))))) - (define auto-user? (and auto-start-doc? - (or (ormap can-build*? user-docs) - (and tidy? make-user?)))) - (define (can-build**? docs) (can-build? only-dirs docs auto-main? auto-user?)) (define force-out-of-date? #f) (define lock-ch #f)