mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-10 14:37:34 +02:00
Clean up the kawa-builder code
This commit is contained in:
parent
c3687d22e4
commit
f57c1d64a4
1 changed files with 9 additions and 18 deletions
|
@ -2157,24 +2157,15 @@
|
|||
library)))))
|
||||
|
||||
(define (kawa-builder impl cfg library dir)
|
||||
(let* ((library-file (get-library-file cfg library))
|
||||
(src-library-file (make-path dir library-file))
|
||||
(library-dir (path-directory src-library-file))
|
||||
(dest-library-file
|
||||
(string-append (library->path cfg library) ".class"))
|
||||
(dest-dir
|
||||
(path-directory (make-path dir dest-library-file))))
|
||||
;; ensure the build directory exists
|
||||
(create-directory* dest-dir)
|
||||
(with-directory
|
||||
dir
|
||||
(lambda ()
|
||||
(let ((res (system 'kawa '-d dir '-C src-library-file)))
|
||||
(let* ((src-library-file (make-path dir (get-library-file cfg library)))
|
||||
(res (system 'kawa
|
||||
'-d dir
|
||||
'-C src-library-file)))
|
||||
(and (or (and (pair? res) (zero? (cadr res)))
|
||||
(yes-or-no? cfg ".class file failed to build: "
|
||||
(library-name library)
|
||||
" - install anyway?"))
|
||||
library))))))
|
||||
library)))
|
||||
|
||||
(define (lookup-builder builder)
|
||||
(case builder
|
||||
|
|
Loading…
Add table
Reference in a new issue