Changeset 14604
- Timestamp:
- 01/16/14 17:54:38 (7 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/doc/asdf/asdf.texinfo
r14593 r14604 4297 4297 You may consult with the maintainer for which specific version they recommend, 4298 4298 but the latest @code{release} should be correct. 4299 We trust you to thoroughly test it with your implementation 4299 Though we do try to test ASDF releases against all implementations that we can, 4300 we may not be testing against all variants of your implementation, 4301 and we may not be running enough tetst; 4302 we trust you to thoroughly test it with your own implementation 4300 4303 before you release it. 4301 4304 If there are any issues with the current release, … … 4351 4354 Non-magic systems should be at the back of the @code{wrapping-source-registry} 4352 4355 while magic systems are at the front. 4356 4357 @item 4358 Since ASDF 3, the library UIOP comes transcluded in ASDF. 4359 But for extra brownies, you may package UIOP separately, 4360 so that one may @code{(require "uiop")} and not pull ASDF, 4361 or one may @code{(require "asdf")} 4362 and that would implicitly require the former. 4353 4363 4354 4364 @item -
trunk/abcl/src/org/armedbear/lisp/asdf.lisp
r14593 r14604 1 1 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- 2 ;;; This is ASDF 3.1.0. 36: Another System Definition Facility.2 ;;; This is ASDF 3.1.0.49: Another System Definition Facility. 3 3 ;;; 4 4 ;;; Feedback, bug reports, and patches are all welcome: … … 20 20 ;;; Monday; July 13, 2009) 21 21 ;;; 22 ;;; Copyright (c) 2001-201 2Daniel Barlow and contributors22 ;;; Copyright (c) 2001-2014 Daniel Barlow and contributors 23 23 ;;; 24 24 ;;; Permission is hereby granted, free of charge, to any person obtaining … … 52 52 #+cmu 53 53 (eval-when (:load-toplevel :compile-toplevel :execute) 54 (declaim (optimize (speed 1) (safety 3) (debug 3)))55 54 (setf ext:*gc-verbose* nil)) 56 55 57 #+(or abcl clozure cmu ecl xcl) ;; punt on hard package upgrade on those implementations 56 ;; Punt on hard package upgrade: from ASDF1 always, and even from ASDF2 on most implementations. 58 57 (eval-when (:load-toplevel :compile-toplevel :execute) 59 58 (unless (member :asdf3 *features*) … … 72 71 (away (format nil "~A-~A" :asdf existing-version))) 73 72 (when (and existing-version 74 (< existing-version-number 2.27)) 73 (< existing-version-number 74 (or #+(or allegro clisp lispworks sbcl) 2.0 2.27))) 75 75 (rename-package :asdf away) 76 76 (when *load-verbose* … … 562 562 (t 563 563 (ensure-inherited name symbol to-package from-package t shadowed imported inherited))))))) 564 564 565 565 (defun recycle-symbol (name recycle exported) 566 566 ;; Takes a symbol NAME (a string), a list of package designators for RECYCLE … … 787 787 788 788 (defmacro define-package (package &rest clauses) 789 "DEFINE-PACKAGE takes a PACKAGE and a number of CLAUSES, of the form 789 "DEFINE-PACKAGE takes a PACKAGE and a number of CLAUSES, of the form 790 790 \(KEYWORD . ARGS\). 791 791 DEFINE-PACKAGE supports the following keywords: … … 801 801 created again. In short, except for special cases, always make it the first 802 802 package on the list if the list is not empty. 803 MIX -- Takes a list of package designators. MIX behaves like 803 MIX -- Takes a list of package designators. MIX behaves like 804 804 \(:USE PKG1 PKG2 ... PKGn\) but additionally uses :SHADOWING-IMPORT-FROM to 805 805 resolve conflicts in favor of the first found symbol. It may still yield … … 1449 1449 (with-upgradability () 1450 1450 (defun ensure-gethash (key table default) 1451 "Lookup the TABLE for a KEY as by gethash, but if not present,1451 "Lookup the TABLE for a KEY as by GETHASH, but if not present, 1452 1452 call the (possibly constant) function designated by DEFAULT as per CALL-FUNCTION, 1453 set the corresponding entry to the result in the table, and return that result." 1453 set the corresponding entry to the result in the table. 1454 Return two values: the entry after its optional computation, and whether it was found" 1454 1455 (multiple-value-bind (value foundp) (gethash key table) 1455 (if foundp 1456 value 1457 (setf (gethash key table) (values (call-function default)))))) 1456 (values 1457 (if foundp 1458 value 1459 (setf (gethash key table) (call-function default))) 1460 foundp))) 1458 1461 1459 1462 (defun list-to-hash-set (list &aux (h (make-hash-table :test 'equal))) … … 4277 4280 (dump-hook *image-dump-hook*) 4278 4281 #+clozure prepend-symbols #+clozure (purify t) 4282 #+sbcl compression 4279 4283 #+(and sbcl windows) application-type) 4280 4284 "Dump an image of the current Lisp environment at pathname FILENAME, with various options" … … 4339 4343 (apply 'sb-ext:save-lisp-and-die filename 4340 4344 :executable t ;--- always include the runtime that goes with the core 4341 (when executable (list :toplevel #'restore-image :save-runtime-options t)) ;--- only save runtime-options for standalone executables 4342 #+(and sbcl windows) ;; passing :application-type :gui will disable the console window. 4343 ;; the default is :console - only works with SBCL 1.1.15 or later. 4344 (when application-type (list :application-type application-type)))) 4345 (append 4346 (when compression (list :compression compression)) 4347 ;;--- only save runtime-options for standalone executables 4348 (when executable (list :toplevel #'restore-image :save-runtime-options t)) 4349 #+(and sbcl windows) ;; passing :application-type :gui will disable the console window. 4350 ;; the default is :console - only works with SBCL 1.1.15 or later. 4351 (when application-type (list :application-type application-type))))) 4345 4352 #-(or allegro clisp clozure cmu gcl lispworks sbcl scl) 4346 4353 (error "Can't ~S ~S: UIOP doesn't support image dumping with ~A.~%" … … 4964 4971 #+(or cmu scl) (ext:process-exit-code process) 4965 4972 #+ecl (nth-value 1 (ext:external-process-status process)) 4966 #+lispworks (system:pid-exit-status process :wait t) 4973 #+lispworks 4974 (if-let ((stream (or (getf process-info :input-stream) 4975 (getf process-info :output-stream) 4976 (getf process-info :bidir-stream) 4977 (getf process-info :error-stream)))) 4978 (system:pipe-exit-status stream :wait t) 4979 (if-let ((f (find-symbol* :pid-exit-status :system nil))) 4980 (funcall f process :wait t))) 4967 4981 #+sbcl (sb-ext:process-exit-code process))))) 4968 4982 … … 6436 6450 (defvar *asdf-version* nil) 6437 6451 ;; We need to clear systems from versions yet older than the below: 6438 (defparameter *oldest-forward-compatible-asdf-version* "2. 27")6452 (defparameter *oldest-forward-compatible-asdf-version* "2.33") ;; 2.32.13 renames a slot in component. 6439 6453 (defmacro defparameter* (var value &optional docstring) 6440 6454 (let* ((name (string-trim "*" var)) … … 6467 6481 ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 6468 6482 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 6469 (asdf-version "3.1.0. 36")6483 (asdf-version "3.1.0.49") 6470 6484 (existing-version (asdf-version))) 6471 6485 (setf *asdf-version* asdf-version) … … 7356 7370 (read-file-form version-pathname))) 7357 7371 (old-version (asdf-version))) 7358 (or (version<= old-version version) 7359 (ensure-gethash 7360 (list pathname old-version) *old-asdf-systems* 7361 #'(lambda () 7362 (let ((old-pathname 7363 (if-let (pair (system-registered-p "asdf")) 7364 (system-source-file (cdr pair))))) 7365 (warn "~@<~ 7372 (cond 7373 ((version< old-version version) t) ;; newer version: good! 7374 ((equal old-version version) nil) ;; same version: don't load, but don't warn 7375 (t ;; old version: bad 7376 (ensure-gethash 7377 (list (namestring pathname) version) *old-asdf-systems* 7378 #'(lambda () 7379 (let ((old-pathname 7380 (if-let (pair (system-registered-p "asdf")) 7381 (system-source-file (cdr pair))))) 7382 (warn "~@<~ 7366 7383 You are using ASDF version ~A ~:[(probably from (require \"asdf\") ~ 7367 7384 or loaded by quicklisp)~;from ~:*~S~] and have an older version of ASDF ~ … … 7385 7402 or use :ignore-inherited-configuration to avoid registering the old one. ~ 7386 7403 Please consult ASDF documentation and/or experts.~@:>~%" 7387 old-version old-pathname version pathname)7388 t)))))))7404 old-version old-pathname version pathname)))) 7405 nil))))) ;; only issue the warning the first time, but always return nil 7389 7406 7390 7407 (defun locate-system (name) … … 7676 7693 (in-package :asdf/action) 7677 7694 7678 (eval-when (#-lispworks :compile-toplevel :load-toplevel :execute) 7679 (deftype action () '(cons operation component))) ;; a step to be performed while building 7695 (eval-when (#-lispworks :compile-toplevel :load-toplevel :execute) ;; LispWorks issues spurious warning 7696 (deftype action () '(cons operation component)) ;; a step to be performed while building 7697 7698 (deftype operation-designator () 7699 ;; an operation designates itself, 7700 ;; nil designates a context-dependent current operation, and 7701 ;; class-name or class designates an instance of the designated class. 7702 '(or operation null symbol class))) 7680 7703 7681 7704 (with-upgradability () … … 7781 7804 7782 7805 7783 ;;;; upward-operation, downward-operation 7784 ;; These together handle actions that propagate along the component hierarchy. 7785 ;; Downward operations like load-op or compile-op propagate down the hierarchy: 7786 ;; operation on a parent depends-on operation on its children. 7787 ;; By default, an operation propagates itself, but it may propagate another one instead. 7806 ;;;; upward-operation, downward-operation, sideway-operation, selfward-operation 7807 ;; These together handle actions that propagate along the component hierarchy or operation universe. 7788 7808 (with-upgradability () 7789 7809 (defclass downward-operation (operation) 7790 7810 ((downward-operation 7791 :initform nil :initarg :downward-operation :reader downward-operation :allocation :class))) 7811 :initform nil :reader downward-operation 7812 :type operation-designator :allocation :class)) 7813 (:documentation "A DOWNWARD-OPERATION's dependencies propagate down the component hierarchy. 7814 I.e., if O is a DOWNWARD-OPERATION and its DOWNWARD-OPERATION slot designates operation D, then 7815 the action (O . M) of O on module M will depends on each of (D . C) for each child C of module M. 7816 The default value for slot DOWNWARD-OPERATION is NIL, which designates the operation O itself. 7817 E.g. in order for a MODULE to be loaded with LOAD-OP (resp. compiled with COMPILE-OP), all the 7818 children of the MODULE must have been loaded with LOAD-OP (resp. compiled with COMPILE-OP.")) 7792 7819 (defmethod component-depends-on ((o downward-operation) (c parent-component)) 7793 7820 `((,(or (downward-operation o) o) ,@(component-children c)) ,@(call-next-method))) 7794 ;; Upward operations like prepare-op propagate up the component hierarchy: 7795 ;; operation on a child depends-on operation on its parent. 7796 ;; By default, an operation propagates itself, but it may propagate another one instead. 7821 7797 7822 (defclass upward-operation (operation) 7798 7823 ((upward-operation 7799 :initform nil :initarg :downward-operation :reader upward-operation :allocation :class))) 7824 :initform nil :reader upward-operation 7825 :type operation-designator :allocation :class)) 7826 (:documentation "An UPWARD-OPERATION has dependencies that propagate up the component hierarchy. 7827 I.e., if O is an instance of UPWARD-OPERATION, and its UPWARD-OPERATION slot designates operation U, 7828 then the action (O . C) of O on a component C that has the parent P will depends on (U . P). 7829 The default value for slot UPWARD-OPERATION is NIL, which designates the operation O itself. 7830 E.g. in order for a COMPONENT to be prepared for loading or compiling with PREPARE-OP, its PARENT 7831 must first be prepared for loading or compiling with PREPARE-OP.")) 7800 7832 ;; For backward-compatibility reasons, a system inherits from module and is a child-component 7801 7833 ;; so we must guard against this case. ASDF4: remove that. … … 7803 7835 `(,@(if-let (p (component-parent c)) 7804 7836 `((,(or (upward-operation o) o) ,p))) ,@(call-next-method))) 7805 ;; Sibling operations propagate to siblings in the component hierarchy: 7806 ;; operation on a child depends-on operation on its parent. 7807 ;; By default, an operation propagates itself, but it may propagate another one instead. 7837 7808 7838 (defclass sideway-operation (operation) 7809 7839 ((sideway-operation 7810 :initform nil :initarg :sideway-operation :reader sideway-operation :allocation :class))) 7840 :initform nil :reader sideway-operation 7841 :type operation-designator :allocation :class)) 7842 (:documentation "A SIDEWAY-OPERATION has dependencies that propagate \"sideway\" to siblings 7843 that a component depends on. I.e. if O is a SIDEWAY-OPERATION, and its SIDEWAY-OPERATION slot 7844 designates operation S (where NIL designates O itself), then the action (O . C) of O on component C 7845 depends on each of (S . D) where D is a declared dependency of C. 7846 E.g. in order for a COMPONENT to be prepared for loading or compiling with PREPARE-OP, 7847 each of its declared dependencies must first be loaded as by LOAD-OP.")) 7811 7848 (defmethod component-depends-on ((o sideway-operation) (c component)) 7812 7849 `((,(or (sideway-operation o) o) … … 7814 7851 :collect (resolve-dependency-spec c dep))) 7815 7852 ,@(call-next-method))) 7816 ;; Selfward operations propagate to themselves a sub-operation: 7817 ;; they depend on some other operation being acted on the same component. 7853 7818 7854 (defclass selfward-operation (operation) 7819 7855 ((selfward-operation 7820 :initform nil :initarg :selfward-operation :reader selfward-operation :allocation :class))) 7856 ;; NB: no :initform -- if an operation depends on others, it must explicitly specify which 7857 :type (or operation-designator list) :reader selfward-operation :allocation :class)) 7858 (:documentation "A SELFWARD-OPERATION depends on another operation on the same component. 7859 I.e., if O is a SELFWARD-OPERATION, and its SELFWARD-OPERATION designates a list of operations L, 7860 then the action (O . C) of O on component C depends on each (S . C) for S in L. 7861 A operation-designator designates a singleton list of the designated operation; 7862 a list of operation-designators designates the list of designated operations; 7863 NIL is not a valid operation designator in that context. 7864 E.g. before a component may be loaded by LOAD-OP, it must have been compiled by COMPILE-OP.")) 7821 7865 (defmethod component-depends-on ((o selfward-operation) (c component)) 7822 7866 `(,@(loop :for op :in (ensure-list (selfward-operation o)) … … 8012 8056 (with-upgradability () 8013 8057 (defclass prepare-op (upward-operation sideway-operation) 8014 ((sideway-operation :initform 'load-op )))8058 ((sideway-operation :initform 'load-op :allocation :class))) 8015 8059 (defclass load-op (basic-load-op downward-operation sideway-operation selfward-operation) 8016 8060 ;; NB: even though compile-op depends on prepare-op it is not needed-in-image-p, 8017 8061 ;; so we need to directly depend on prepare-op for its side-effects in the current image. 8018 ((selfward-operation :initform '(prepare-op compile-op) )))8062 ((selfward-operation :initform '(prepare-op compile-op) :allocation :class))) 8019 8063 (defclass compile-op (basic-compile-op downward-operation selfward-operation) 8020 ((selfward-operation :initform 'prepare-op )8021 (downward-operation :initform 'load-op )))8064 ((selfward-operation :initform 'prepare-op :allocation :class) 8065 (downward-operation :initform 'load-op :allocation :class))) 8022 8066 8023 8067 (defclass prepare-source-op (upward-operation sideway-operation) 8024 ((sideway-operation :initform 'load-source-op )))8068 ((sideway-operation :initform 'load-source-op :allocation :class))) 8025 8069 (defclass load-source-op (basic-load-op downward-operation selfward-operation) 8026 ((selfward-operation :initform 'prepare-source-op )))8070 ((selfward-operation :initform 'prepare-source-op :allocation :class))) 8027 8071 8028 8072 (defclass test-op (selfward-operation) 8029 ((selfward-operation :initform 'load-op ))))8073 ((selfward-operation :initform 'load-op :allocation :class)))) 8030 8074 8031 8075 … … 9885 9929 ((bundle-type :initform :fasl))) 9886 9930 (defclass prepare-fasl-op (sideway-operation) 9887 ((sideway-operation :initform 'load-fasl-op )))9931 ((sideway-operation :initform 'load-fasl-op :allocation :class))) 9888 9932 (defclass fasl-op (basic-fasl-op selfward-operation) 9889 ((selfward-operation :initform '(prepare-fasl-op #+ecl lib-op) )))9933 ((selfward-operation :initform '(prepare-fasl-op #+ecl lib-op) :allocation :class))) 9890 9934 (defclass load-fasl-op (basic-load-op selfward-operation) 9891 ((selfward-operation :initform '(prepare-op fasl-op) )))9935 ((selfward-operation :initform '(prepare-op fasl-op) :allocation :class))) 9892 9936 9893 9937 ;; NB: since the monolithic-op's can't be sideway-operation's, … … 9903 9947 #-(or ecl mkcl) "just compile the system")) 9904 9948 9905 (defclass dll-op (bundle-compile-op selfward-operationno-ld-flags-op)9949 (defclass dll-op (bundle-compile-op no-ld-flags-op) 9906 9950 ((bundle-type :initform :dll)) 9907 9951 (:documentation "compile the system and produce dynamic (.so/.dll) library for it.")) 9908 9952 9909 9953 (defclass binary-op (basic-compile-op selfward-operation) 9910 ((selfward-operation :initform '(fasl-op lib-op) ))9954 ((selfward-operation :initform '(fasl-op lib-op) :allocation :class)) 9911 9955 (:documentation "produce fasl and asd files for the system")) 9912 9956 … … 9922 9966 9923 9967 (defclass monolithic-binary-op (monolithic-op binary-op) 9924 ((selfward-operation :initform '(monolithic-fasl-op monolithic-lib-op) ))9968 ((selfward-operation :initform '(monolithic-fasl-op monolithic-lib-op) :allocation :class)) 9925 9969 (:documentation "produce fasl and asd files for combined system and dependencies.")) 9926 9970 … … 10369 10413 (defclass concatenate-source-op (basic-concatenate-source-op) ()) 10370 10414 (defclass load-concatenated-source-op (basic-load-concatenated-source-op) 10371 ((selfward-operation :initform '(prepare-op concatenate-source-op) )))10415 ((selfward-operation :initform '(prepare-op concatenate-source-op) :allocation :class))) 10372 10416 (defclass compile-concatenated-source-op (basic-compile-concatenated-source-op) 10373 ((selfward-operation :initform '(prepare-op concatenate-source-op) )))10417 ((selfward-operation :initform '(prepare-op concatenate-source-op) :allocation :class))) 10374 10418 (defclass load-compiled-concatenated-source-op (basic-load-compiled-concatenated-source-op) 10375 ((selfward-operation :initform '(prepare-op compile-concatenated-source-op) )))10419 ((selfward-operation :initform '(prepare-op compile-concatenated-source-op) :allocation :class))) 10376 10420 10377 10421 (defclass monolithic-concatenate-source-op (basic-concatenate-source-op monolithic-bundle-op) ()) 10378 10422 (defclass monolithic-load-concatenated-source-op (basic-load-concatenated-source-op) 10379 ((selfward-operation :initform 'monolithic-concatenate-source-op )))10423 ((selfward-operation :initform 'monolithic-concatenate-source-op :allocation :class))) 10380 10424 (defclass monolithic-compile-concatenated-source-op (basic-compile-concatenated-source-op) 10381 ((selfward-operation :initform 'monolithic-concatenate-source-op )))10425 ((selfward-operation :initform 'monolithic-concatenate-source-op :allocation :class))) 10382 10426 (defclass monolithic-load-compiled-concatenated-source-op (basic-load-compiled-concatenated-source-op) 10383 ((selfward-operation :initform 'monolithic-compile-concatenated-source-op )))10427 ((selfward-operation :initform 'monolithic-compile-concatenated-source-op :allocation :class))) 10384 10428 10385 10429 (defmethod input-files ((operation basic-concatenate-source-op) (s system)) … … 10636 10680 10637 10681 (defun file-defpackage-form (file) 10682 "Return the first DEFPACKAGE form in FILE." 10638 10683 (with-input-file (f file) 10639 10684 (stream-defpackage-form f))) … … 10648 10693 10649 10694 (defun package-dependencies (defpackage-form) 10695 "Return a list of packages depended on by the package 10696 defined in DEFPACKAGE-FORM. A package is depended upon if 10697 the DEFPACKAGE-FORM uses it or imports a symbol from it." 10650 10698 (assert (defpackage-form-p defpackage-form)) 10651 10699 (remove-duplicates … … 10667 10715 10668 10716 (defun register-system-packages (system packages) 10717 "Register SYSTEM as providing PACKAGES." 10669 10718 (let ((name (or (eq system t) (coerce-name system)))) 10670 10719 (dolist (p (ensure-list packages)) … … 10672 10721 10673 10722 (defun package-name-system (package-name) 10723 "Return the name of the SYSTEM providing PACKAGE-NAME, if such exists, 10724 otherwise return a default system name computed from PACKAGE-NAME." 10674 10725 (check-type package-name string) 10675 10726 (if-let ((system-name (gethash package-name *package-systems*))) … … 10738 10789 ;; TODO: automatically generate interface with reexport? 10739 10790 (:export 10740 #:defsystem #:find-system #:locate-system #:coerce-name 10791 #:defsystem #:find-system #:locate-system #:coerce-name #:primary-system-name 10741 10792 #:oos #:operate #:make-plan #:perform-plan #:sequential-plan 10742 10793 #:system-definition-pathname #:with-system-definitions
Note: See TracChangeset
for help on using the changeset viewer.