Changeset 14502


Ignore:
Timestamp:
05/17/13 11:06:59 (9 years ago)
Author:
Mark Evenson
Message:

asdf-3.0.1

Location:
trunk/abcl
Files:
2 edited

Legend:

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

    r14461 r14502  
    77@c We use @&key, etc to escape & from TeX in lambda lists --
    88@c so we need to define them for info as well.
    9 @macro &allow-other-keys
     9@macro AallowOtherKeys
    1010&allow-other-keys
    1111@end macro
    12 @macro &optional
     12@macro Aoptional
    1313&optional
    1414@end macro
    15 @macro &rest
     15@macro Arest
    1616&rest
    1717@end macro
    18 @macro &key
     18@macro Akey
    1919&key
    2020@end macro
    21 @macro &body
     21@macro Abody
    2222&body
    23 @end macro
    24 @macro &curly
    25 {
    26 @end macro
    27 @macro &ylruc
    28 }
    2923@end macro
    3024
     
    870864@c insufficient node breakdown that I have not put one in.
    871865@item
    872 Make sure you know how the @code{:version} numbers will be parsed!  They
    873 are parsed as period-separated lists of integers.  I.e., in the example,
    874 @code{0.2.1} is to be interpreted, roughly speaking, as @code{(0 2 1)}.
    875 In particular, version @code{0.2.1} is interpreted the same as
    876 @code{0.0002.1} and is strictly version-less-than version @code{0.20.1},
     866Make sure you know how the @code{:version} numbers will be parsed!
     867They are parsed as period-separated lists of integers.
     868I.e., in the example, @code{0.2.1} is to be interpreted,
     869roughly speaking, as @code{(0 2 1)}.
     870In particular, version @code{0.2.1}
     871is interpreted the same as @code{0.0002.1} and
     872is strictly version-less-than version @code{0.20.1},
    877873even though the two are the same when interpreted as decimal fractions.
    878874Instead of a string representing the version,
     
    881877in addition to being a literal string, it can be an expression of the form
    882878@code{(:read-file-form <pathname-or-string> :at <access-at-specifier>)},
    883 which will be resolved by reading a form
    884 in the specified pathname
     879which will be resolved by reading a form in the specified pathname
    885880(read as a subpathname of the current system if relative or a unix-namestring).
    886 You may use an access-at specifier with the (optional) :at keyword,
    887 by default the specifier is 0, meaning the first form is returned.
     881You may use a @code{uiop:access-at} specifier
     882with the (optional) @code{:at} keyword,
     883by default the specifier is @code{0}, meaning the first form is returned.
    888884
    889885@cindex :version
     
    10131009pathname-specifier := pathname | string | symbol
    10141010
    1015 method-form := (operation-name qual lambda-list @&rest body)
     1011method-form := (operation-name qual lambda-list @Arest body)
    10161012qual := method qualifier
    10171013
     
    11891185@cindex :version
    11901186
    1191 Version specifiers are parsed as period-separated lists of integers.  I.e., in the example,
    1192 @code{0.2.1} is to be interpreted, roughly speaking, as @code{(0 2 1)}.
    1193 In particular, version @code{0.2.1} is interpreted the same as
    1194 @code{0.0002.1} and is strictly version-less-than version @code{0.20.1},
    1195 even though the two are the same when interpreted as decimal fractions.
     1187Version specifiers are strings to be parsed as period-separated lists of integers.
     1188I.e., in the example, @code{"0.2.1"} is to be interpreted,
     1189roughly speaking, as @code{(0 2 1)}.
     1190In particular, version @code{"0.2.1"} is interpreted the same as @code{"0.0002.1"},
     1191though the latter is not canonical and may lead to a warning being issued.
     1192Also, @code{"1.3"} and @code{"1.4"} are both strictly @code{uiop:version<} to @code{"1.30"},
     1193quite unlike what would have happened
     1194had the version strings been interpreted as decimal fractions.
    11961195
    11971196System definers are encouraged to use version identifiers of the form
    1198 @var{x}.@var{y}.@var{z} for major version, minor version (compatible
    1199 API) and patch level.
     1197@var{x}.@var{y}.@var{z} for
     1198major version, minor version and patch level,
     1199where significant API incompatibilities are signaled by an increased major number.
    12001200
    12011201@xref{Common attributes of components}.
     
    13491349Files containing @code{defsystem} forms
    13501350are regular Lisp files that are executed by @code{load}.
    1351 Consequently, you can put whatever Lisp code you like into these files
    1352 (e.g., code that examines the compile-time environment
    1353 and adds appropriate features to @code{*features*}).
    1354 However, some conventions should be followed,
     1351Consequently, you can put whatever Lisp code you like into these files.
     1352However, it is recommended to keep such forms to a minimal,
     1353and to instead define @code{defsystem} extensions
     1354that you use with @code{:defsystem-depends-on}.
     1355
     1356If however, you might insist on including code in the @code{.asd} file itself,
     1357e.g., to examine and adjust the compile-time environment,
     1358possibly adding appropriate features to @code{*features*}.
     1359If so, here are some conventions we recommend you follow,
    13551360so that users can control certain details of execution
    13561361of the Lisp in @file{.asd} files:
     
    14851490Operations are invoked on systems via @code{operate}.
    14861491@anchor{operate}
    1487 @deffn {Generic function} @code{operate} @var{operation} @var{system} @&rest @var{initargs} @&key @code{force} @code{force-not} @code{verbose} @&allow-other-keys
    1488 @deffnx {Generic function} @code{oos} @var{operation} @var{system} @&rest @var{initargs} @&key @&allow-other-keys
     1492@deffn {Generic function} @code{operate} @var{operation} @var{system} @Arest @var{initargs} @Akey @code{force} @code{force-not} @code{verbose} @AallowOtherKeys
     1493@deffnx {Generic function} @code{oos} @var{operation} @var{system} @Arest @var{initargs} @Akey @AallowOtherKeys
    14891494@code{operate} invokes @var{operation} on @var{system}.
    14901495@code{oos} is a synonym for @code{operate}.
     
    15411546@end lisp
    15421547
    1543 @deffn Operation @code{compile-op} @&key @code{proclamations}
     1548@deffn Operation @code{compile-op} @Akey @code{proclamations}
    15441549
    15451550This operation compiles the specified component.
     
    15581563@end deffn
    15591564
    1560 @deffn Operation @code{load-op} @&key @code{proclamations}
     1565@deffn Operation @code{load-op} @Akey @code{proclamations}
    15611566
    15621567This operation loads a system.
     
    15661571@end deffn
    15671572
    1568 @deffn Operation @code{parent-load-op} @&key @code{proclamations}
     1573@deffn Operation @code{parent-load-op} @Akey @code{proclamations}
    15691574
    15701575This operation ensures that the dependencies
     
    16521657@end deffn
    16531658
    1654 
    1655 @c @deffn Operation test-system-version @&key minimum
    1656 
    1657 @c Asks the system whether it satisfies a version requirement.
    1658 
    1659 @c The default method accepts a string, which is expected to contain of a
    1660 @c number of integers separated by #\. characters.  The method is not
    1661 @c recursive.  The component satisfies the version dependency if it has
    1662 @c the same major number as required and each of its sub-versions is
    1663 @c greater than or equal to the sub-version number required.
    1664 
    1665 @c @lisp
    1666 @c (defun version-satisfies (x y)
    1667 @c   (labels ((bigger (x y)
    1668 @c           (cond ((not y) t)
    1669 @c                 ((not x) nil)
    1670 @c                 ((> (car x) (car y)) t)
    1671 @c                 ((= (car x) (car y))
    1672 @c                  (bigger (cdr x) (cdr y))))))
    1673 @c     (and (= (car x) (car y))
    1674 @c       (or (not (cdr y)) (bigger (cdr x) (cdr y))))))
    1675 @c @end lisp
    1676 
    1677 @c If that doesn't work for your system, you can override it.  I hope
    1678 @c you have as much fun writing the new method as @verb{|#lisp|} did
    1679 @c reimplementing this one.
    1680 @c @end deffn
    1681 
    1682 @c @deffn Operation feature-dependent-op
    1683 
    1684 @c An instance of @code{feature-dependent-op} will ignore any components
    1685 @c which have a @code{features} attribute, unless the feature combination
    1686 @c it designates is satisfied by @code{*features*}.  This operation is
    1687 @c not intended to be instantiated directly, but other operations may
    1688 @c inherit from it.
    1689 
    1690 @c @end deffn
    16911659
    16921660@node  Creating new operations,  , Predefined operations of ASDF, Operations
     
    18831851@cindex :version
    18841852
    1885 This optional attribute is used by the generic function
    1886 @code{version-satisfies}, which tests to see if @code{:version}
    1887 dependencies are satisfied.
    1888 the version should be a string of integers separated by dots,
     1853This optional attribute specifies a version for the current component.
     1854The version should typically be a string of integers separated by dots,
    18891855for example @samp{1.0.11}.
    1890 For more information on the semantics of version specifiers, see @ref{The defsystem grammar}.
    1891 
    1892 @c This optional attribute is intended to be used by the @code{test-system-version} operation.
    1893 @c @xref{Predefined operations of ASDF}.
    1894 @c @emph{Nota Bene}:
    1895 @c This operation, planned for ASDF 1,
    1896 @c is still not implemented yet as of ASDF 3.
    1897 @c Don't hold your breath.
    1898 
    1899 
     1856For more information on version specifiers, see @ref{The defsystem grammar}.
     1857
     1858A version may then be queried by the generic function @code{version-satisfies},
     1859to see if @code{:version} dependencies are satisfied,
     1860and when specifying dependencies, a constraint of minimal version to satisfy
     1861can be specified using e.g. @code{(:version "mydepname" "1.0.11")}.
     1862
     1863Note that in the wild, we typically see version numbering
     1864only on components of type @code{system}.
     1865Presumably it is much less useful within a given system,
     1866wherein the library author is responsible to keep the various files in synch.
    19001867
    19011868@subsubsection Required features
    19021869
    1903 @emph{FIXME: This subsection seems to contradict the
    1904 @code{defsystem} grammar subsection,
    1905 which doesn't provide any obvious way to specify required features.
    1906 Furthermore, in 2009, discussions on the
    1907 @url{http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel,asdf-devel mailing list}
    1908 suggested that the specification of required features may be broken,
    1909 and that no one may have been using them for a while.
    1910 Please contact the
    1911 @url{http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel,asdf-devel mailing list}
    1912 if you are interested in getting this features feature fixed.}
    1913 
    1914 Traditionally defsystem users have used reader conditionals
     1870Traditionally defsystem users have used @code{#+} reader conditionals
    19151871to include or exclude specific per-implementation files.
    19161872This means that any single implementation cannot read the entire system,
     
    19191875as it will omit to process the system-dependent sources for other systems.
    19201876
    1921 Each component in an asdf system may therefore specify features using
    1922 the same syntax as @code{#+} does, and it will (somehow) be ignored for
    1923 certain operations unless the feature conditional is a member of
    1924 @code{*features*}.
    1925 
     1877Each component in an asdf system may therefore specify using @code{:if-feature}
     1878a feature expression using the same syntax as @code{#+} does,
     1879such that any reference to the component will be ignored
     1880during compilation, loading and/or linking if the expression evaluates to false.
     1881Since the expression is read by the normal reader,
     1882you must explicitly prefix your symbols with @code{:} so they be read as keywords;
     1883this is as contrasted with the @code{#+} syntax
     1884that implicitly reads symbols in the keyword package by default.
     1885
     1886For instance, @code{:if-feature (:and :x86 (:or :sbcl :cmu :scl))} specifies that
     1887the given component is only to be compiled and loaded
     1888when the implementation is SBCL, CMUCL or Scieneer CL on an x86 machine.
     1889You can not write it as @code{:if-feature (and x86 (or sbcl cmu scl))}
     1890since the symbols would presumably fail to be read as keywords.
    19261891
    19271892@subsubsection Dependencies
     
    19531918
    19541919@verbatim
    1955 (this-op {(other-op required-components)}+)
     1920(this-op @{(other-op required-components)@}+)
    19561921
    19571922simple-component-name := string
     
    20061971@c Doesn't CLISP now support LIST method combination?
    20071972
    2008 See the discussion of the semantics of @code{:version} in the defsystem
    2009 grammar.
     1973A minimal version can be specified for a component you depend on
     1974(typically another system), by specifying @code{(:version "other-system" "1.2.3")}
     1975instead of simply @code{"other-system"} as the dependency.
     1976See the discussion of the semantics of @code{:version}
     1977in the defsystem grammar.
    20101978
    20111979@c FIXME: Should have cross-reference to "Version specifiers" in the
     
    21732141@deffn version-satisfies @var{version} @var{version-spec}
    21742142Does @var{version} satisfy the @var{version-spec}.  A generic function.
    2175 ASDF provides built-in methods for @var{version} being a
    2176 @code{component} or @code{string}.  @var{version-spec} should be a
    2177 string.
    2178 
    2179 In the wild, we typically see version numbering only on components of
    2180 type @code{system}.
    2181 
    2182 For more information about how @code{version-satisfies} interprets
    2183 version strings and specifications, @pxref{The defsystem grammar} and
     2143ASDF provides built-in methods for @var{version} being a @code{component} or @code{string}.
     2144@var{version-spec} should be a string.
     2145If it's a component, its version is extracted as a string before further processing.
     2146
     2147A version string satisfies the version-spec if after parsing,
     2148the former is no older than the latter.
     2149Therefore @code{"1.9.1"}, @code{"1.9.2"} and @code{"1.10"} all satisfy @code{"1.9.1"},
     2150but @code{"1.8.4"} or @code{"1.9"} do not.
     2151For more information about how @code{version-satisfies} parses and interprets
     2152version strings and specifications,
     2153@pxref{The defsystem grammar} (version specifiers) and
    21842154@ref{Common attributes of components}.
     2155
     2156Note that in versions of ASDF prior to 3.0.1,
     2157including the entire ASDF 1 and ASDF 2 series,
     2158@code{version-satisfies} would also require that the version and the version-spec
     2159have the same major version number (the first integer in the list);
     2160if the major version differed, the version would be considered as not matching the spec.
     2161But that feature was not documented, therefore presumably not relied upon,
     2162whereas it was a nuisance to several users.
     2163Starting with ASDF 3.0.1,
     2164@code{version-satisfies} does not treat the major version number specially,
     2165and returns T simply if the first argument designates a version that isn't older
     2166than the one specified as a second argument.
     2167If needs be, the @code{(:version ...)} syntax for specifying dependencies
     2168could be in the future extended to specify an exclusive upper bound for compatible versions
     2169as well as an inclusive lower bound.
    21852170@end deffn
    21862171
     
    25842569and for XCVB the corresponding functions are in package XCVB.
    25852570
    2586 @defun initialize-source-registry @&optional PARAMETER
     2571@defun initialize-source-registry @Aoptional PARAMETER
    25872572   will read the configuration and initialize all internal variables.
    25882573   You may extend or override configuration
     
    26092594@end defun
    26102595
    2611 @defun ensure-source-registry @&optional PARAMETER
     2596@defun ensure-source-registry @Aoptional PARAMETER
    26122597   checks whether a source registry has been initialized.
    26132598   If not, initialize it with the given @var{PARAMETER}.
     
    28292814we provide a limited emulation mode:
    28302815
    2831 @defun enable-asdf-binary-locations-compatibility @&key centralize-lisp-binaries default-toplevel-directory include-per-user-information map-all-source-files source-to-target-mappings
     2816@defun enable-asdf-binary-locations-compatibility @Akey centralize-lisp-binaries default-toplevel-directory include-per-user-information map-all-source-files source-to-target-mappings
    28322817This function will initialize the new @code{asdf-output-translations} facility in a way
    28332818that emulates the behavior of the old @code{ASDF-Binary-Locations} facility.
     
    30723057The specified functions are exported from package ASDF.
    30733058
    3074 @defun initialize-output-translations @&optional PARAMETER
     3059@defun initialize-output-translations @Aoptional PARAMETER
    30753060   will read the configuration and initialize all internal variables.
    30763061   You may extend or override configuration
     
    31033088@end defun
    31043089
    3105 @defun ensure-output-translations @&optional PARAMETER
     3090@defun ensure-output-translations @Aoptional PARAMETER
    31063091   checks whether output translations have been initialized.
    31073092   If not, initialize them with the given @var{PARAMETER}.
     
    34023387Please use ASDF-UTILS for the same functions exported from a stable library.
    34033388
    3404 @defun coerce-pathname name @&key type defaults
     3389@defun coerce-pathname name @Akey type defaults
    34053390
    34063391This function (available starting with ASDF 2.012.11)
     
    34223407@end defun
    34233408
    3424 @defun merge-pathnames* @&key specified defaults
     3409@defun merge-pathnames* @Akey specified defaults
    34253410
    34263411This function is a replacement for @code{merge-pathnames} that uses the host and device
     
    34323417@end defun
    34333418
    3434 @defun system-relative-pathname system name @&key type
     3419@defun system-relative-pathname system name @Akey type
    34353420
    34363421It's often handy to locate a file relative to some system.
  • trunk/abcl/src/org/armedbear/lisp/asdf.lisp

    r14487 r14502  
    11;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
    2 ;;; This is ASDF 2.33.7: Another System Definition Facility.
     2;;; This is ASDF 3.0.1: Another System Definition Facility.
    33;;;
    44;;; Feedback, bug reports, and patches are all welcome:
     
    40304030(with-upgradability ()
    40314031  (defgeneric slurp-input-stream (processor input-stream &key &allow-other-keys))
    4032  
     4032
    40334033  #-(or gcl2.6 genera)
    40344034  (defmethod slurp-input-stream ((function function) input-stream &key &allow-other-keys)
     
    50195019  (:recycle :uiop/configuration :asdf/configuration :asdf)
    50205020  (:use :uiop/common-lisp :uiop/utility
    5021    :uiop/os :uiop/pathname :uiop/filesystem :uiop/stream :uiop/image)
     5021   :uiop/os :uiop/pathname :uiop/filesystem :uiop/stream :uiop/image :uiop/lisp-build)
    50225022  (:export
    50235023   #:get-folder-path
     
    52455245       ((eql :home) (user-homedir-pathname))
    52465246       ((eql :here) (resolve-absolute-location
    5247                      *here-directory* :ensure-directory t :wilden nil))
     5247                     (or *here-directory* (pathname-directory-pathname (load-pathname)))
     5248                     :ensure-directory t :wilden nil))
    52485249       ((eql :user-cache) (resolve-absolute-location
    52495250                           *user-cache* :ensure-directory t :wilden nil)))
     
    54215422         ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
    54225423         ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
    5423          (asdf-version "2.33.7")
     5424         (asdf-version "3.0.1")
    54245425         (existing-version (asdf-version)))
    54255426    (setf *asdf-version* asdf-version)
     
    57825783
    57835784  (defmethod version-satisfies ((cver string) version)
    5784     (version-compatible-p cver version)))
     5785    (version<= version cver)))
    57855786
    57865787
     
    85658566|#
    85668567
     8568#+(or ecl mkcl)
     8569(with-upgradability ()
     8570  (defun uiop-library-file ()
     8571    (or (and (find-system :uiop nil)
     8572             (system-source-directory :uiop)
     8573             (progn
     8574               (operate 'lib-op :uiop)
     8575               (output-file 'lib-op :uiop)))
     8576        (resolve-symlinks* (c::compile-file-pathname "sys:asdf" :type :lib))))
     8577  (defmethod input-files :around ((o program-op) (c system))
     8578    (let ((files (call-next-method))
     8579          (plan (traverse-sub-actions o c :plan-class 'sequential-plan)))
     8580      (unless (or (and (find-system :uiop nil)
     8581                       (system-source-directory :uiop)
     8582                       (plan-operates-on-p plan '("uiop")))
     8583                  (and (system-source-directory :asdf)
     8584                       (plan-operates-on-p plan '("asdf"))))
     8585        (pushnew (uiop-library-file) files :test 'pathname-equal))
     8586      files))
     8587
     8588  (defun register-pre-built-system (name)
     8589    (register-system (make-instance 'system :name (coerce-name name) :source-file nil))))
     8590
    85678591#+ecl
    85688592(with-upgradability ()
     
    85988622    (declare (ignore force verbose version))
    85998623    (apply #'operate 'binary-op system args)))
    8600 
    8601 #+(or ecl mkcl)
    8602 (with-upgradability ()
    8603   (defun register-pre-built-system (name)
    8604     (register-system (make-instance 'system :name (coerce-name name) :source-file nil))))
    8605 
    86068624;;;; -------------------------------------------------------------------------
    86078625;;;; Concatenate-source
     
    90139031(asdf/package:define-package :asdf/backward-interface
    90149032  (:recycle :asdf/backward-interface :asdf)
    9015   (:use :asdf/common-lisp :asdf/driver :asdf/upgrade
     9033  (:use :uiop/common-lisp :uiop :asdf/upgrade
    90169034   :asdf/component :asdf/system :asdf/find-system :asdf/operation :asdf/action
    9017    :asdf/lisp-build :asdf/operate :asdf/output-translations)
     9035   :asdf/lisp-action :asdf/operate :asdf/output-translations)
    90189036  (:export
    90199037   #:*asdf-verbose*
     
    90239041   #:enable-asdf-binary-locations-compatibility
    90249042   #:operation-forced
    9025    #:operation-on-failure
    9026    #:operation-on-warnings
     9043   #:operation-on-failure #:operation-on-warnings #:on-failure #:on-warnings
    90279044   #:component-property
    90289045   #:run-shell-command
Note: See TracChangeset for help on using the changeset viewer.