r8163: improved building of shared library, not yet tested
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 11 Nov 2003 22:23:58 +0000 (22:23 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 11 Nov 2003 22:23:58 +0000 (22:23 +0000)
debian/changelog
uffi-tests.asd

index f4cdac015649de4a877baed08f3d3353aa247d3c..49f8f9876d23f4497367139f92f71681c1acb67f 100644 (file)
@@ -1,3 +1,9 @@
+cl-uffi (1.4.3-1) unstable; urgency=low
+
+  * Improved test/make.sh and uffi-tests.asd
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Tue, 11 Nov 2003 15:02:40 -0700
+
 cl-uffi (1.4.2-1) unstable; urgency=low
 
   * Yet another attempt for asdf-install
index 6f2c4bfc7c129149caaaf776c756afc6f6d583cb..18af90b1606e3b113ef9af4e258a78688f3499eb 100644 (file)
 (in-package #:uffi-tests-system)
 
 (defvar *asd-file-dir* (pathname-directory *load-truename*))
+(defvar *library-file-dir* (append *asd-file-dir* "tests"))
 
 (defclass uffi-test-source-file (c-source-file)
   ())
 
 (defmethod output-files ((o compile-op) (c uffi-test-source-file))
-  (let ((searched (or
-                  (probe-file #p"/usr/lib/uffi/uffi-c-test.so")
-                  (probe-file (make-pathname
-                               :directory *asd-file-dir*
-                               :name "uffi-c-test"
-                               :type "so")))))
-    (if searched
+  (let ((found (some #'(lambda (dir)
+                           (probe-file (make-pathname :directory d
+                                                      :name (component-name c)
+                                                      :type "so")))
+                       '((:absolute "usr" "lib" "uffi")
+                         *asd-file-dir*))))
+    (if found
        (list searched)
-       (list (merge-pathnames
-              (make-pathname :name (component-name c)
-                             :type "so"
-                             :directory '(:relative "tests"))
-              (make-pathname :directory *asd-file-dir*))))))
+       (list (make-pathname :name (component-name c)
+                            :type "so"
+                            :directory *library-file-dir*)))))
 
 (defmethod perform ((o load-op) (c uffi-test-source-file))
-  (dolist (f (asdf::input-files o c))
-    (funcall (intern (symbol-name '#:load-foreign-library)
-                    (symbol-name '#:uffi))
-            f :module "uffi_tests")))
+  nil) ;; lisp loader file will load library
 
 (defmethod perform ((o compile-op) (c uffi-test-source-file))
-  (unless (zerop (run-shell-command "cd ~A; make"
-                                   (namestring (merge-pathnames
-                                                (make-pathname
-                                                 :name nil
-                                                 :type nil
-                                                 :directory '(:relative "tests"))
-                                                (make-pathname
-                                                 :directory *asd-file-dir*)))))
+  (unless (zerop (run-shell-command
+                 "cd ~A; make"
+                 (namestring (make-pathname :name nil
+                                            :type nil
+                                            :directory *library-file-dir*))))
     (error 'operation-error :component c :operation o)))