racket/collects/reduction-semantics/private/make-plt.ss
2005-05-27 18:56:37 +00:00

38 lines
1.1 KiB
Scheme

(module make-plt mzscheme
(require (lib "file.ss")
(lib "pack.ss" "setup")
(lib "plthome.ss" "setup"))
(current-directory plthome)
(define (display-res f)
(lambda (x)
(let ([ans (f x)])
(when ans
(printf "including ~s~n" x))
ans)))
(define bad-dirs '("CVS" ".svn"))
(define bad-files '(".DS_Store" "reduction-semantics.plt"))
(pack (build-path "collects" "reduction-semantics" "reduction-semantics.plt")
"Reduction Semantics"
(list (build-path "collects" "reduction-semantics"))
'(("reduction-semantics"))
(display-res
(lambda (filename)
(let ([exp (reverse (explode-path (normalize-path filename)))])
(cond
[(member (cadr exp) bad-dirs)
#f]
[(member (car exp) bad-dirs)
#f]
[(member (car exp) bad-files)
#f]
[(regexp-match #rx"~$" (path->string filename))
#f]
[else
(std-filter filename)]))))
#t
'file-replace))