Actually installing compiled ffi bindings when present in chibi.

This commit is contained in:
Alex Shinn 2015-05-09 22:28:32 +09:00
parent d96f1c9fc5
commit 71ce04861d
2 changed files with 25 additions and 9 deletions

View file

@ -1638,7 +1638,8 @@
(string-append (library->path cfg library) "." ext)) (string-append (library->path cfg library) "." ext))
(include-files (include-files
(library-include-files impl cfg (make-path dir library-file))) (library-include-files impl cfg (make-path dir library-file)))
(install-dir (get-install-source-dir impl cfg))) (install-dir (get-install-source-dir impl cfg))
(install-lib-dir (get-install-library-dir impl cfg)))
;; install the library file ;; install the library file
(let ((path (make-path install-dir dest-library-file))) (let ((path (make-path install-dir dest-library-file)))
(install-directory cfg (path-directory path)) (install-directory cfg (path-directory path))
@ -1646,13 +1647,25 @@
;; install any includes ;; install any includes
(cons (cons
path path
(append
(map (map
(lambda (x) (lambda (x)
(let ((dest-file (make-path install-dir (path-relative x dir)))) (let ((dest-file (make-path install-dir (path-relative x dir))))
(install-directory cfg (path-directory dest-file)) (install-directory cfg (path-directory dest-file))
(install-file cfg x dest-file) (install-file cfg x dest-file)
dest-file)) dest-file))
include-files))))) include-files)
(map
(lambda (x)
(let* ((so-file (string-append x (cond-expand (macosx ".dylib")
(else ".so"))))
(dest-file (make-path install-lib-dir
(path-relative so-file dir))))
(install-directory cfg (path-directory dest-file))
(install-file cfg so-file dest-file)
dest-file))
(library-shared-include-files
impl cfg (make-path dir library-file))))))))
(define (chicken-installer impl cfg library dir) (define (chicken-installer impl cfg library dir)
(let* ((library-file (get-library-file cfg library)) (let* ((library-file (get-library-file cfg library))
@ -1770,7 +1783,9 @@
(cc (string-split (or (conf-get cfg 'cc) (cc (string-split (or (conf-get cfg 'cc)
(get-environment-variable "CC") (get-environment-variable "CC")
"cc"))) "cc")))
(cflags (string-split (or (get-environment-variable "CFLAGS") "")))) (cflags (string-split (or (conf-get cfg 'cflags)
(get-environment-variable "CFLAGS")
""))))
(let lp ((ls shared-includes)) (let lp ((ls shared-includes))
(if (null? ls) (if (null? ls)
library library

View file

@ -87,6 +87,7 @@
(program-implementation symbol "impl to install programs for") (program-implementation symbol "impl to install programs for")
(chibi-path filename "path to chibi-scheme executable") (chibi-path filename "path to chibi-scheme executable")
(cc string "path to c compiler") (cc string "path to c compiler")
(cflags string "flags for c compiler")
(sexp? boolean ("sexp") "output information in sexp format") (sexp? boolean ("sexp") "output information in sexp format")
)) ))