Hack to keep search.js and search-context.html up-to-date in doc/ trees by pretending that make-search.zo depends on them

This commit is contained in:
Samuel Bronson 2012-10-08 12:27:30 -04:00 committed by Eli Barzilay
parent 67d901ccc4
commit e9d830badb

View File

@ -18,7 +18,10 @@
syntax/location syntax/location
setup/path-to-relative setup/path-to-relative
(only-in setup/dirs find-doc-dir) (only-in setup/dirs find-doc-dir)
"utils.rkt") "utils.rkt"
(for-syntax racket/base)
(for-syntax racket/runtime-path)
(for-syntax compiler/cm-accomplice))
(provide make-search) (provide make-search)
@ -29,6 +32,16 @@
;; to heavy to load twice). ;; to heavy to load twice).
(define-runtime-path search-context-page "search-context.html") (define-runtime-path search-context-page "search-context.html")
;;; FIXME: Making make-search.zo depend on these files is a HACK!
;; The point is to make sure the latest versions get installed;
;; ideally we could just inform scribble/raco that they need
;; installing, and they would just do that when appropriate.
(begin-for-syntax
(define-runtime-path search-script "search.js")
(define-runtime-path search-context-page "search-context.html")
(register-external-file search-script)
(register-external-file search-context-page))
(define (quote-string val) (define (quote-string val)
(define (hex4 ch) (define (hex4 ch)
(let ([s (number->string (char->integer (string-ref ch 0)) 16)]) (let ([s (number->string (char->integer (string-ref ch 0)) 16)])