mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
don't install meta pkg info for tests
This commit is contained in:
parent
cee04731f9
commit
c8066e2eb7
1 changed files with 12 additions and 1 deletions
|
@ -18,12 +18,23 @@
|
|||
((eqv? #\return ch) (lp))
|
||||
(else (lp (cons ch res)))))))
|
||||
|
||||
(define (install-library? name)
|
||||
(and (list? name)
|
||||
(>= (length name) 2)
|
||||
(let ((x (car (reverse name))))
|
||||
(and (not (and (eq? 'test x)
|
||||
(number? (cadr (reverse name)))))
|
||||
(let* ((s (if (number? x) (number->string x) (symbol->string x)))
|
||||
(len (string-length s)))
|
||||
(not (and (> len 5)
|
||||
(equal? "-test" (substring s (- len 5) len)))))))))
|
||||
|
||||
(define (parse-library file)
|
||||
(protect (exn (else #f))
|
||||
(let ((x (call-with-input-file file read)))
|
||||
(and (pair? x)
|
||||
(eq? 'define-library (car x))
|
||||
(list? (cadr x))
|
||||
(install-library? (cadr x))
|
||||
(cadr x)))))
|
||||
|
||||
(define (extract-libraries)
|
||||
|
|
Loading…
Add table
Reference in a new issue