From: Matt Birkholz Date: Thu, 31 Oct 2013 19:05:52 +0000 (-0700) Subject: ffi/build.scm.in: Install compile-file:sf-only?ed options. X-Git-Tag: release-9.2.0~54 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9c10dc5f17a3a9ffd930f17c39517b2d9f562385;p=mit-scheme.git ffi/build.scm.in: Install compile-file:sf-only?ed options. Copy the .bin if there is no .com. Copy .ext too. --- diff --git a/src/ffi/build.scm.in b/src/ffi/build.scm.in index 4f094f572..2696812c5 100644 --- a/src/ffi/build.scm.in +++ b/src/ffi/build.scm.in @@ -58,7 +58,7 @@ USA. (run-command (list "mkdir" library-dir)) (run-command (list "chmod" "755" library-dir)) (run-command (append (list "install" "-m644") - (command-line) (list library-dir)))) + (files) (list library-dir)))) (rewrite-file (string-append destdir (->namestring @@ -67,6 +67,29 @@ USA. (lambda (in out) (rewrite-optiondb name dir in out))))) +(define (files) + (append-map! + (lambda (arg) + (let ((p (->pathname arg))) + (if (pathname-type p) + (if (file-exists? p) + (list arg) + (error "Could not find file:" p)) + (let ((files + (let ((com (pathname-new-type p "com"))) + (if (file-exists? com) + (list (->namestring com) + (->namestring (pathname-new-type p "bci"))) + (let ((bin (pathname-new-type p "bin"))) + (if (file-exists? bin) + (list (->namestring bin)) + (error "Could not find .com nor .bin:" p)))))) + (ext (pathname-new-type p "ext"))) + (if (file-exists? ext) + (cons (->namestring ext) files) + files))))) + (command-line))) + (define (rewrite-file name rewriter) (let ((tmp (pathname-new-type name "tmp"))) (call-with-exclusive-output-file tmp