Commit a8e40a32 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Add UIOP:OS-MACOSX-P, and make Mac dynamic bundles go to "dylib" not "so".

Also script used to test on all implementations (only should be run
on mac, hence -ignored name).
parent 21105076
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@
      ((member :binary :dll :lib :shared-library :static-library :program :object :program)
       (compile-file-type :type bundle-type))
      ((eql :binary) "image")
      ((eql :dll) (cond ((os-unix-p) "so") ((os-windows-p) "dll")))
      ((eql :dll) (cond ((os-macosx-p) "dylib") ((os-unix-p) "so") ((os-windows-p) "dll")))
      ((member :lib :static-library) (cond ((os-unix-p) "a") ((os-windows-p) "lib")))
      ((eql :program) (cond ((os-unix-p) nil) ((os-windows-p) "exe")))))

+9 −0
Original line number Diff line number Diff line
;;; -*- mode: common-lisp; -*-

;;;---------------------------------------------------------------------------
;;; Run this on a Mac OS X machine to make sure that the OS flags are correct.
;;;---------------------------------------------------------------------------

(assert (uiop:os-macosx-p))
(assert (uiop:os-unix-p))
+10 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
  (:recycle :uiop/os :asdf/os :asdf)
  (:use :uiop/common-lisp :uiop/package :uiop/utility)
  (:export
   #:featurep #:os-unix-p #:os-windows-p #:os-genera-p #:detect-os ;; features
   #:featurep #:os-unix-p #:os-macosx-p #:os-windows-p #:os-genera-p #:detect-os ;; features
   #:getenv #:getenvp ;; environment variables
   #:implementation-identifier ;; implementation identifier
   #:implementation-type #:*implementation-type*
@@ -31,6 +31,14 @@
    (or #+abcl (featurep :unix)
        #+(and (not abcl) (or unix cygwin darwin)) t))

  (defun os-macosx-p ()
    ;; OS-MACOSX is not mutually exclusive with OS-UNIX, in fact the
    ;;former implies the latter.
    (or
     #+allegro (featurep :macosx)
     #+clisp (featurep :macos)
     (featurep :darwin)))

  (defun os-windows-p ()
    (or #+abcl (featurep :windows)
        #+(and (not (or abcl unix cygwin darwin)) (or win32 windows mswindows mingw32)) t))
@@ -44,6 +52,7 @@
  (defun detect-os ()
    (loop* :with o
           :for (feature . detect) :in '((:os-unix . os-unix-p) (:os-windows . os-windows-p)
                                         (:os-macosx . os-macosx-p)
                                         (:genera . os-genera-p) (:os-oldmac . os-oldmac-p))
           :when (and (not o) (funcall detect)) :do (setf o feature) (pushnew o *features*)
           :else :do (setf *features* (remove feature *features*))