From: Matt Birkholz Date: Mon, 16 Sep 2013 23:55:05 +0000 (-0700) Subject: ffi: install-load-option needs file list, not install-shim. X-Git-Tag: release-9.2.0~109 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0416d00dcc3678c5ca48bae9eead883fde1c7fb9;p=mit-scheme.git ffi: install-load-option needs file list, not install-shim. --- diff --git a/src/blowfish/Makefile.in b/src/blowfish/Makefile.in index 34019eaa0..659df8974 100644 --- a/src/blowfish/Makefile.in +++ b/src/blowfish/Makefile.in @@ -35,8 +35,10 @@ check: echo '(load "check")' | $(exe) install: - echo '(install-shim "blowfish")' | $(exe) -- *.com *.bci *.pkd make.scm - echo '(install-load-option "blowfish")' | $(exe) + ( echo '(begin'; \ + echo ' (install-shim "blowfish")'; \ + echo ' (install-load-option "blowfish"))' ) \ + | $(exe) -- *.com *.bci *.pkd make.scm clean: rm -f blowfish-const.scm blowfish-const blowfish-const.c diff --git a/src/ffi/build.scm.in b/src/ffi/build.scm.in index a28788350..43df2bcf3 100644 --- a/src/ffi/build.scm.in +++ b/src/ffi/build.scm.in @@ -34,31 +34,28 @@ USA. (run-command (append CCLD LDFLAGS (command-line) MODULE_LDFLAGS))) (define (install-shim libname) - (let* ((pathname (pathname-as-directory libname)) - (library-dir - (->namestring - (or (system-library-directory-pathname pathname) - (merge-pathnames pathname - (system-library-directory-pathname)))))) - (run-command (list "rm" "-rf" library-dir)) - (run-command (list "mkdir" library-dir)) - (run-command (append (list "install" "-m" "644") - (command-line) (list library-dir))) + (let ((library-dir (merge-pathnames (pathname-as-directory libname) + (system-library-directory-pathname)))) (run-command (list "install" "-m" "644" (string-append libname "-shim.so") (string-append libname "-types.bin") (string-append libname "-const.bin") - (->namestring - (pathname-new-directory - library-dir - (except-last-pair - (pathname-directory library-dir)))))))) + (->namestring library-dir))))) (define (install-load-option name #!optional directory) (guarantee-string name 'INSTALL-OPTION) (let ((dir (if (default-object? directory) name directory))) (guarantee-string dir 'INSTALL-OPTION) - (rewrite-file (system-library-pathname "optiondb.scm") + (let ((library-dir (->namestring + (merge-pathnames (pathname-as-directory dir) + (system-library-directory-pathname))))) + (run-command (list "rm" "-rf" library-dir)) + (run-command (list "mkdir" library-dir)) + (run-command (list "chmod" "755" library-dir)) + (run-command (append (list "install" "-m" "644") + (command-line) (list library-dir)))) + (rewrite-file (merge-pathnames "optiondb.scm" + (system-library-directory-pathname)) (lambda (in out) (rewrite-optiondb name dir in out))))) diff --git a/src/gdbm/Makefile b/src/gdbm/Makefile index 0024150a9..4e7fbefc7 100644 --- a/src/gdbm/Makefile +++ b/src/gdbm/Makefile @@ -30,8 +30,10 @@ check: echo '(load "check")' | $(exe) install: - echo '(install-shim "gdbm")' | $(exe) -- *.com *.bci *.pkd make.scm - echo '(install-load-option "gdbm2" "gdbm")' | $(exe) + ( echo '(begin'; \ + echo ' (install-shim "gdbm")'; \ + echo ' (install-load-option "gdbm2" "gdbm")' ) \ + | $(exe) -- *.com *.bci *.pkd make.scm clean distclean maintainer-clean: rm -f gdbm-const.scm gdbm-const gdbm-const.c gdbm-shim.c diff --git a/src/md5/Makefile.in b/src/md5/Makefile.in index 306f91909..e8cd76fb8 100644 --- a/src/md5/Makefile.in +++ b/src/md5/Makefile.in @@ -35,8 +35,10 @@ check: echo '(load "check")' | $(exe) install: - echo '(install-shim "md5")' | $(exe) -- *.com *.bci *.pkd make.scm - echo '(install-load-option "md5")' | $(exe) + ( echo '(begin'; + echo ' (install-shim "md5")'; + echo ' (install-load-option "md5"))' ) \ + | $(exe) -- *.com *.bci *.pkd make.scm clean: rm -f md5-const.scm md5-const md5-const.c md5-shim.c diff --git a/src/mhash/Makefile.in b/src/mhash/Makefile.in index 8b2383607..3187c483c 100644 --- a/src/mhash/Makefile.in +++ b/src/mhash/Makefile.in @@ -35,8 +35,10 @@ check: echo '(load "check")' | $(exe) install: - echo '(install-shim "mhash")' | $(exe) -- *.com *.bci *.pkd make.scm - echo '(install-load-option "mhash")' | $(exe) + ( echo '(begin'; + echo ' (install-shim "mhash")'; + echo ' (install-load-option "mhash"))' ) \ + | $(exe) -- *.com *.bci *.pkd make.scm clean: rm -f mhash-const.scm mhash-const mhash-const.c mhash-shim.c