Changeset 13911


Ignore:
Timestamp:
04/15/12 14:37:55 (10 years ago)
Author:
Mark Evenson
Message:

Upgradte to asdf-2.20.

Location:
trunk/abcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/doc/asdf/asdf.texinfo

    r13702 r13911  
    896896system-definition := ( defsystem system-designator @var{system-option}* )
    897897
    898 system-option := :defsystem-depends-on system-list
     898system-option := :defsystem-depends-on system-list
     899                 | :weakly-depends-on @var{system-list}
    899900                 | :class class-name (see discussion below)
    900901                 | module-option
     
    981982
    982983@subsection Defsystem depends on
     984@cindex :defsystem-depends-on
    983985
    984986The @code{:defsystem-depends-on} option to @code{defsystem} allows the
     
    987989Typically this is used to load an ASDF extension that is used in the
    988990system definition.
     991
     992@subsection Weakly depends on
     993@cindex :weakly-depends-on
     994
     995The @code{:weakly-depends-on} option to @code{defsystem} allows the
     996programmer to specify another ASDF-defined system or set of systems that
     997ASDF should @emph{try} to load, but need not load in order to be
     998successful.  Typically this is used if there are a number of systems
     999that, if present, could provide additional functionality, but which are
     1000not necessary for basic function.
     1001
     1002Currently, although it is specified to be an option only to
     1003@code{defsystem}, this option is accepted at any component, but it probably
     1004only makes sense at the @code{defsystem} level. Programmers are cautioned not
     1005to use this component option except at the @code{defsystem} level, as
     1006this anomalous behavior may be removed without warning.
    9891007
    9901008@subsection Pathname specifiers
  • trunk/abcl/src/org/armedbear/lisp/asdf.lisp

    r13704 r13911  
    11;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
    2 ;;; This is ASDF 2.019: Another System Definition Facility.
     2;;; This is ASDF 2.20: Another System Definition Facility.
    33;;;
    44;;; Feedback, bug reports, and patches are all welcome:
     
    6262        (remove "asdf" excl::*autoload-package-name-alist*
    6363                :test 'equalp :key 'car)) ; need that BEFORE any mention of package ASDF as below
    64   #+ecl (unless (member :ecl-bytecmp *features*) (require :cmp))
     64  #+ecl (defun use-ecl-byte-compiler-p () (and (member :ecl-bytecmp *features*) t))
     65  #+ecl (unless (use-ecl-byte-compiler-p) (require :cmp))
    6566  #+gcl ;; Debian's GCL 2.7 has bugs with compiling multiple-value stuff, but can run ASDF 2.011
    6667  (when (or (< system::*gcl-major-version* 2) ;; GCL 2.6 fails to fully compile ASDF at all
     
    108109         ;; "2.345.0.7" would be your seventh local modification of official release 2.345
    109110         ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
    110          (asdf-version "2.019")
     111         (asdf-version "2.20")
    111112         (existing-asdf (find-class 'component nil))
    112113         (existing-version *asdf-version*)
     
    27942795           (ret (find-component parent name)))
    27952796      (when weakly-depends-on
    2796         (appendf depends-on (remove-if (complement #'find-system) weakly-depends-on)))
     2797        (appendf depends-on (remove-if (complement #'(lambda (x) (find-system x nil))) weakly-depends-on)))
    27972798      (when *serial-depends-on*
    27982799        (push *serial-depends-on* depends-on))
     
    30863087     (:java :java :java-1.4 :java-1.5 :java-1.6 :java-1.7))))
    30873088
     3089#+clozure
     3090(defun* ccl-fasl-version ()
     3091  ;; the fasl version is target-dependent from CCL 1.8 on.
     3092  (or (and (fboundp 'ccl::target-fasl-version)
     3093           (funcall 'ccl::target-fasl-version))
     3094      (and (boundp 'ccl::fasl-version)
     3095           (symbol-value 'ccl::fasl-version))
     3096      (error "Can't determine fasl version.")))
     3097
    30883098(defun lisp-version-string ()
    30893099  (let ((s (lisp-implementation-version)))
     
    31053115              ccl::*openmcl-major-version*
    31063116              ccl::*openmcl-minor-version*
    3107               (logand ccl::fasl-version #xFF))
     3117              (logand (ccl-fasl-version) #xFF))
    31083118      #+cmu (substitute #\- #\/ s)
    31093119      #+scl (format nil "~A~A" s
    3110         ;; ANSI upper case vs lower case.
    3111         (ecase ext:*case-mode* (:upper "") (:lower "l")))
     3120                    ;; ANSI upper case vs lower case.
     3121                    (ecase ext:*case-mode* (:upper "") (:lower "l")))
    31123122      #+ecl (format nil "~A~@[-~A~]" s
    31133123                    (let ((vcs-id (ext:lisp-implementation-vcs-id)))
     
    31423152    #-mcl (user-homedir-pathname))))
    31433153
     3154(defun* ensure-absolute-pathname* (x fmt &rest args)
     3155  (and (plusp (length x))
     3156       (or (absolute-pathname-p x)
     3157           (cerror "ignore relative pathname"
     3158                   "Invalid relative pathname ~A~@[ ~?~]" x fmt args))
     3159       x))
     3160(defun* split-absolute-pathnames (x fmt &rest args)
     3161  (loop :for dir :in (split-string
     3162                      x :separator (string (inter-directory-separator)))
     3163    :do (apply 'ensure-absolute-pathname* dir fmt args)
     3164    :collect dir))
     3165(defun getenv-absolute-pathname (x &aux (s (getenv x)))
     3166  (ensure-absolute-pathname* s "from (getenv ~S)" x))
     3167(defun getenv-absolute-pathnames (x &aux (s (getenv x)))
     3168  (split-absolute-pathnames s "from (getenv ~S) = ~S" x s))
     3169
    31443170(defun* user-configuration-directories ()
    31453171  (let ((dirs
    31463172         `(,@(when (os-unix-p)
    31473173               (cons
    3148                 (subpathname* (getenv "XDG_CONFIG_HOME") "common-lisp/")
    3149                 (loop :with dirs = (getenv "XDG_CONFIG_DIRS")
    3150                   :for dir :in (split-string dirs :separator ":")
     3174                (subpathname* (getenv-absolute-pathname "XDG_CONFIG_HOME") "common-lisp/")
     3175                (loop :for dir :in (getenv-absolute-pathnames "XDG_CONFIG_DIRS")
    31513176                  :collect (subpathname* dir "common-lisp/"))))
    31523177           ,@(when (os-windows-p)
    31533178               `(,(subpathname* (or #+lispworks (sys:get-folder-path :local-appdata)
    3154                                     (getenv "LOCALAPPDATA"))
     3179                                    (getenv-absolute-pathname "LOCALAPPDATA"))
    31553180                               "common-lisp/config/")
    31563181                 ;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData
    31573182                 ,(subpathname* (or #+lispworks (sys:get-folder-path :appdata)
    3158                                     (getenv "APPDATA"))
     3183                                    (getenv-absolute-pathname "APPDATA"))
    31593184                                "common-lisp/config/")))
    31603185           ,(subpathname (user-homedir) ".config/common-lisp/"))))
     
    31693194      ;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Common AppData
    31703195      (subpathname* (or #+lispworks (sys:get-folder-path :common-appdata)
    3171                         (getenv "ALLUSERSAPPDATA")
    3172                         (subpathname* (getenv "ALLUSERSPROFILE") "Application Data/"))
     3196                        (getenv-absolute-pathname "ALLUSERSAPPDATA")
     3197                        (subpathname* (getenv-absolute-pathname "ALLUSERSPROFILE") "Application Data/"))
    31733198                    "common-lisp/config/")
    31743199      (list it)))))
     
    32943319  (flet ((try (x &rest sub) (and x `(,x ,@sub))))
    32953320    (or
    3296      (try (getenv "XDG_CACHE_HOME") "common-lisp" :implementation)
     3321     (try (getenv-absolute-pathname "XDG_CACHE_HOME") "common-lisp" :implementation)
    32973322     (when (os-windows-p)
    32983323       (try (or #+lispworks (sys:get-folder-path :local-appdata)
    3299                 (getenv "LOCALAPPDATA")
     3324                (getenv-absolute-pathname "LOCALAPPDATA")
    33003325                #+lispworks (sys:get-folder-path :appdata)
    3301                 (getenv "APPDATA"))
     3326                (getenv-absolute-pathname "APPDATA"))
    33023327            "common-lisp" "cache" :implementation))
    33033328     '(:home ".cache" "common-lisp" :implementation))))
     
    34343459(defun* location-function-p (x)
    34353460  (and
    3436    (consp x)
    34373461   (length=n-p x 2)
    3438    (or (and (equal (first x) :function)
    3439             (typep (second x) 'symbol))
    3440        (and (equal (first x) 'lambda)
    3441             (cddr x)
    3442             (length=n-p (second x) 2)))))
     3462   (eq (car x) :function)
     3463   (or (symbolp (cadr x))
     3464       (and (consp (cadr x))
     3465            (eq (caadr x) 'lambda)
     3466            (length=n-p (cadadr x) 2)))))
    34433467
    34443468(defun* validate-output-translations-directive (directive)
     
    40164040      ,@(loop :for dir :in
    40174041          `(,@(when (os-unix-p)
    4018                 `(,(or (getenv "XDG_DATA_HOME")
     4042                `(,(or (getenv-absolute-pathname "XDG_DATA_HOME")
    40194043                       (subpathname (user-homedir) ".local/share/"))
    4020                   ,@(split-string (or (getenv "XDG_DATA_DIRS")
    4021                                       "/usr/local/share:/usr/share")
    4022                                   :separator ":")))
     4044                  ,@(or (getenv-absolute-pathnames "XDG_DATA_DIRS")
     4045                        '("/usr/local/share" "/usr/share"))))
    40234046            ,@(when (os-windows-p)
    40244047                `(,(or #+lispworks (sys:get-folder-path :local-appdata)
    4025                        (getenv "LOCALAPPDATA"))
     4048                       (getenv-absolute-pathname "LOCALAPPDATA"))
    40264049                  ,(or #+lispworks (sys:get-folder-path :appdata)
    4027                        (getenv "APPDATA"))
     4050                       (getenv-absolute-pathname "APPDATA"))
    40284051                  ,(or #+lispworks (sys:get-folder-path :common-appdata)
    4029                        (getenv "ALLUSERSAPPDATA")
    4030                        (subpathname* (getenv "ALLUSERSPROFILE") "Application Data/")))))
     4052                       (getenv-absolute-pathname "ALLUSERSAPPDATA")
     4053                       (subpathname* (getenv-absolute-pathname "ALLUSERSPROFILE") "Application Data/")))))
    40314054          :collect `(:directory ,(subpathname* dir "common-lisp/systems/"))
    40324055          :collect `(:tree ,(subpathname* dir "common-lisp/source/")))
     
    41144137          ,@*default-source-registries*)
    41154138        :register #'(lambda (directory &key recurse exclude)
    4116                       (collect (list directory :recurse recurse :exclude exclude)))))
    4117      :test 'equal :from-end t)))
     4139                      (collect (list directory :recurse recurse :exclude exclude))))))
     4140   :test 'equal :from-end t))
    41184141
    41194142;; Will read the configuration and initialize all internal variables.
     
    41914214  (setf *compile-op-compile-file-function* 'ecl-compile-file)
    41924215
    4193   (defun use-ecl-byte-compiler-p ()
    4194     (member :ecl-bytecmp *features*))
    4195 
    41964216  (defun ecl-compile-file (input-file &rest keys &key &allow-other-keys)
    41974217    (if (use-ecl-byte-compiler-p)
Note: See TracChangeset for help on using the changeset viewer.