ffi: install-load-option needs file list, not install-shim.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Mon, 16 Sep 2013 23:55:05 +0000 (16:55 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Mon, 16 Sep 2013 23:55:05 +0000 (16:55 -0700)
src/blowfish/Makefile.in
src/ffi/build.scm.in
src/gdbm/Makefile
src/md5/Makefile.in
src/mhash/Makefile.in

index 34019eaa08a899f5d505c019199c667fe62baca8..659df89741d3b763aa433e2474214b462a94e95e 100644 (file)
@@ -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
index a287883505540f95132371488953ed6633f101d3..43df2bcf370aa5577597cc928e86dbaaef3c42ec 100644 (file)
@@ -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)))))
 
index 0024150a9008747da8521318d83ec36168a8b70f..4e7fbefc7f203a13195b4e744307feaac39c0a13 100644 (file)
@@ -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
index 306f919098fc1939bfaa0bc1ea5e6cb770da881c..e8cd76fb89ab435e100971cfe2fad719d26a01f1 100644 (file)
@@ -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
index 8b238360739e680a486ad6add3e4e434da2b73ab..3187c483c3a20fbf38f41a820772705d1e67fe78 100644 (file)
@@ -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