Changeset 14569
- Timestamp:
- 07/21/13 19:12:33 (10 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/examples/java-to-lisp-1/MainAlternative.java
r12307 r14569 40 40 // also has a class named Package. 41 41 org.armedbear.lisp.Package defaultPackage = 42 Packages.findPackage("CL-USER");42 org.armedbear.lisp.Package.findPackage("CL-USER"); 43 43 Symbol sym = 44 44 defaultPackage.findAccessibleSymbol("LISPFUNCTION"); -
trunk/abcl/src/org/armedbear/lisp/asdf.lisp
r14502 r14569 1 1 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- 2 ;;; This is ASDF 3.0. 1: Another System Definition Facility.2 ;;; This is ASDF 3.0.2: Another System Definition Facility. 3 3 ;;; 4 4 ;;; Feedback, bug reports, and patches are all welcome: … … 71 71 (existing-version-number (and existing-version (read-from-string existing-major-minor))) 72 72 (away (format nil "~A-~A" :asdf existing-version))) 73 (when (and existing-version (< existing-version-number74 (or #+abcl 2.25 #+cmu 2.018 #-(or abcl cmu) 2.27)))73 (when (and existing-version 74 (< existing-version-number #+abcl 2.25 #+cmu 2.018 #-(or abcl cmu) 2.27)) 75 75 (rename-package :asdf away) 76 76 (when *load-verbose* … … 1515 1515 (defun os-windows-p () 1516 1516 (or #+abcl (featurep :windows) 1517 #+(and (not (or unix cygwin darwin)) (or win32 windows mswindows mingw32)) t))1517 #+(and (not (or abcl unix cygwin darwin)) (or win32 windows mswindows mingw32)) t)) 1518 1518 1519 1519 (defun os-genera-p () 1520 1520 (or #+genera t)) 1521 1521 1522 (defun os-oldmac-p () 1523 (or #+mcl t)) 1524 1522 1525 (defun detect-os () 1523 ( flet ((yes (yes) (pushnew yes *features*))1524 (no (no) (setf *features* (remove no *features*))))1525 (cond1526 ((os-unix-p) (yes :os-unix) (no :os-windows) (no :genera))1527 ((os-windows-p) (yes :os-windows) (no :os-unix) (no :genera))1528 ((os-genera-p) (no :os-unix) (no :os-windows) (yes :genera))1529 (t (error "Congratulations for trying XCVBon an operating system~%~1530 that is neither Unix, nor Windows, nor even Genera.~%Now you port it.")))))1526 (loop* :with o 1527 :for (feature . detect) :in '((:os-unix . os-unix-p) (:os-windows . os-windows-p) 1528 (:genera . os-genera-p) (:os-oldmac . os-oldmac-p)) 1529 :when (and (not o) (funcall detect)) :do (setf o feature) (pushnew o *features*) 1530 :else :do (setf *features* (remove feature *features*)) 1531 :finally 1532 (return (or o (error "Congratulations for trying ASDF on an operating system~%~ 1533 that is neither Unix, nor Windows, nor Genera, nor even old MacOS.~%Now you port it."))))) 1531 1534 1532 1535 (detect-os)) … … 1912 1915 tries hard to make a pathname that will actually behave as documented, 1913 1916 despite the peculiarities of each implementation" 1917 ;; TODO: reimplement defaulting for MCL, whereby an explicit NIL should override the defaults. 1914 1918 (declare (ignorable host device directory name type version defaults)) 1915 1919 (apply 'make-pathname … … 1987 1991 ;; strings and lists of strings or :unspecific 1988 1992 ;; But CMUCL decides to die on NIL. 1993 ;; MCL has issues with make-pathname, nil and defaulting 1994 (declare (ignorable defaults)) 1989 1995 #.`(make-pathname* :directory nil :name nil :type nil :version nil :device nil 1990 1996 :host (or #+cmu lisp::*unix-host*) … … 1992 1998 :username nil :password nil :parameters nil :query nil :fragment nil) 1993 1999 ;; the default shouldn't matter, but we really want something physical 1994 :defaults defaults))2000 #-mcl ,@'(:defaults defaults))) 1995 2001 1996 2002 (defvar *nil-pathname* (nil-pathname (translate-logical-pathname (user-homedir-pathname)))) … … 2260 2266 :directory (unless file-only (cons relative path)) 2261 2267 :name name :type type 2262 :defaults (or defaults *nil-pathname*))2268 :defaults (or #-mcl defaults *nil-pathname*)) 2263 2269 (remove-plist-keys '(:type :dot-dot :defaults) keys)))))) 2264 2270 … … 3144 3150 3145 3151 (defun encoding-external-format (encoding) 3146 (funcall *encoding-external-format-hook* encoding)))3152 (funcall *encoding-external-format-hook* (or encoding *default-encoding*)))) 3147 3153 3148 3154 … … 3614 3620 #+genera (error "You probably don't want to Halt the Machine. (code: ~S)" code) 3615 3621 #+lispworks (lispworks:quit :status code :confirm nil :return nil :ignore-errors-p t) 3616 #+mcl ( ccl:quit) ;; or should we use FFI to call libc's exit(3) ?3622 #+mcl (progn code (ccl:quit)) ;; or should we use FFI to call libc's exit(3) ? 3617 3623 #+mkcl (mk-ext:quit :exit-code code) 3618 3624 #+sbcl #.(let ((exit (find-symbol* :exit :sb-ext nil)) … … 3628 3634 (with-safe-io-syntax () 3629 3635 (ignore-errors 3630 (fresh-line *stderr*) 3631 (apply #'format *stderr* format arguments) 3632 (format! *stderr* "~&"))) 3636 (format! *stderr* "~&~?~&" format arguments))) 3633 3637 (quit code)) 3634 3638 … … 3652 3656 #+(or clozure mcl) 3653 3657 (let ((*debug-io* stream)) 3654 (ccl:print-call-history :count count :start-frame-number 1) 3658 #+clozure (ccl:print-call-history :count count :start-frame-number 1) 3659 #+mcl (ccl:print-call-history :detailed-p nil) 3655 3660 (finish-output stream)) 3656 3661 #+(or cmu scl) … … 3743 3748 #+ecl (loop :for i :from 0 :below (si:argc) :collect (si:argv i)) 3744 3749 #+gcl si:*command-args* 3745 #+ generanil3750 #+(or genera mcl) nil 3746 3751 #+lispworks sys:*line-arguments-list* 3747 3752 #+sbcl sb-ext:*posix-argv* 3748 3753 #+xcl system:*argv* 3749 #-(or abcl allegro clisp clozure cmu ecl gcl genera lispworks sbcl scl xcl)3754 #-(or abcl allegro clisp clozure cmu ecl gcl genera lispworks mcl sbcl scl xcl) 3750 3755 (error "raw-command-line-arguments not implemented yet")) 3751 3756 … … 4140 4145 if it was :INTERACTIVE, the output and the input are inherited from the current process. 4141 4146 4142 Otherwise, the output will be processed by SLURP-INPUT-STREAM, 4143 using OUTPUT as the first argument, and return whatever it returns, 4144 e.g. using :OUTPUT :STRING will have it return the entire output stream as a string. 4145 Use ELEMENT-TYPE and EXTERNAL-FORMAT for the stream passed to the OUTPUT processor." 4147 Otherwise, OUTPUT should be a value that is a suitable first argument to 4148 SLURP-INPUT-STREAM. In this case, RUN-PROGRAM will create a temporary stream 4149 for the program output. The program output, in that stream, will be processed 4150 by SLURP-INPUT-STREAM, according to the using OUTPUT as the first argument. 4151 RUN-PROGRAM will return whatever SLURP-INPUT-STREAM returns. E.g., using 4152 :OUTPUT :STRING will have it return the entire output stream as a string. Use 4153 ELEMENT-TYPE and EXTERNAL-FORMAT for the stream passed to the OUTPUT processor." 4154 4155 ;; TODO: The current version does not honor :OUTPUT NIL on Allegro. Setting 4156 ;; the :INPUT and :OUTPUT arguments to RUN-SHELL-COMMAND on ACL actually do 4157 ;; what :OUTPUT :INTERACTIVE is advertised to do here. To get the behavior 4158 ;; specified for :OUTPUT NIL, one would have to grab up the process output 4159 ;; into a stream and then throw it on the floor. The consequences of 4160 ;; getting this wrong seemed so much worse than having excess output that it 4161 ;; is not currently implemented. 4162 4146 4163 ;; TODO: specially recognize :output pathname ? 4147 4164 (declare (ignorable ignore-error-status element-type external-format)) … … 4185 4202 #+os-unix (coerce (cons (first command) command) 'vector) 4186 4203 #+os-windows command 4187 :input interactive :output (or (and pipe :stream) interactive) :wait wait 4204 :input nil 4205 :output (and pipe :stream) :wait wait 4188 4206 #+os-windows :show-window #+os-windows (and (or (null output) pipe) :hide)) 4189 4207 #+clisp … … 4277 4295 #+allegro 4278 4296 (excl:run-shell-command 4279 command :input interactive :output interactive :wait t 4280 #+os-windows :show-window #+os-windows (unless (or interactive (eq output t)) :hide)) 4297 command 4298 :input nil 4299 :output nil 4300 :error-output :output ; write STDERR to output, too 4301 :wait t 4302 #+os-windows :show-window #+os-windows (unless (or interactive (eq output t)) :hide)) 4281 4303 #+(or clisp clozure cmu (and lispworks os-unix) sbcl scl) 4282 4304 (process-result (run-program command :pipe nil :interactive interactive) nil) … … 4627 4649 #+allegro 4628 4650 (list :functions-defined excl::.functions-defined. 4629 4651 :functions-called excl::.functions-called.) 4630 4652 #+clozure 4631 4653 (mapcar 'reify-deferred-warning … … 4669 4691 #+allegro 4670 4692 (destructuring-bind (&key functions-defined functions-called) 4671 4693 reified-deferred-warnings 4672 4694 (setf excl::.functions-defined. 4673 4695 (append functions-defined excl::.functions-defined.) … … 4884 4906 (defun* (compile-file*) (input-file &rest keys 4885 4907 &key compile-check output-file warnings-file 4886 #+clisp lib-file #+(or ecl mkcl) object-file 4908 #+clisp lib-file #+(or ecl mkcl) object-file #+sbcl emit-cfasl 4887 4909 &allow-other-keys) 4888 4910 "This function provides a portable wrapper around COMPILE-FILE. … … 4925 4947 (compile-file-pathname output-file :fasl-p nil))) 4926 4948 (tmp-file (tmpize-pathname output-file)) 4949 #+sbcl 4950 (cfasl-file (etypecase emit-cfasl 4951 (null nil) 4952 ((eql t) (make-pathname :type "cfasl" :defaults output-file)) 4953 (string (parse-namestring emit-cfasl)) 4954 (pathname emit-cfasl))) 4955 #+sbcl 4956 (tmp-cfasl (when cfasl-file (make-pathname :type "cfasl" :defaults tmp-file))) 4927 4957 #+clisp 4928 4958 (tmp-lib (make-pathname :type "lib" :defaults tmp-file))) … … 4930 4960 (with-saved-deferred-warnings (warnings-file) 4931 4961 (with-muffled-compiler-conditions () 4932 (or #-(or ecl mkcl) (apply 'compile-file input-file :output-file tmp-file keywords) 4962 (or #-(or ecl mkcl) 4963 (apply 'compile-file input-file :output-file tmp-file 4964 #+sbcl (if emit-cfasl (list* :emit-cfasl tmp-cfasl keywords) keywords) 4965 #-sbcl keywords) 4933 4966 #+ecl (apply 'compile-file input-file :output-file 4934 4967 (if object-file … … 4955 4988 (when output-truename 4956 4989 #+clisp (when lib-file (rename-file-overwriting-target tmp-lib lib-file)) 4990 #+sbcl (when cfasl-file (rename-file-overwriting-target tmp-cfasl cfasl-file)) 4957 4991 (rename-file-overwriting-target output-truename output-file) 4958 4992 (setf output-truename (truename output-file))) … … 4960 4994 (t ;; error or failed check 4961 4995 (delete-file-if-exists output-truename) 4996 #+clisp (delete-file-if-exists tmp-lib) 4997 #+sbcl (delete-file-if-exists tmp-cfasl) 4962 4998 (setf output-truename nil))) 4963 4999 (values output-truename warnings-p failure-p)))) … … 5422 5458 ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 5423 5459 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 5424 (asdf-version "3.0. 1")5460 (asdf-version "3.0.2") 5425 5461 (existing-version (asdf-version))) 5426 5462 (setf *asdf-version* asdf-version) … … 5440 5476 #:explain #:perform #:perform-with-restarts #:input-files #:output-files ;; action 5441 5477 #:component-depends-on #:operation-done-p #:component-depends-on 5442 #:traverse ;; plan5478 #:traverse ;; backward-interface 5443 5479 #:operate ;; operate 5444 5480 #:parse-component-form ;; defsystem … … 6619 6655 (with-upgradability () 6620 6656 (defmacro define-convenience-action-methods 6621 (function (operation component &optional keyp) 6622 &key if-no-operation if-no-component operation-initargs) 6657 (function formals &key if-no-operation if-no-component operation-initargs) 6623 6658 (let* ((rest (gensym "REST")) 6624 6659 (found (gensym "FOUND")) 6660 (keyp (equal (last formals) '(&key))) 6661 (formals-no-key (if keyp (butlast formals) formals)) 6662 (len (length formals-no-key)) 6663 (operation 'operation) 6664 (component 'component) 6665 (opix (position operation formals)) 6666 (coix (position component formals)) 6667 (prefix (subseq formals 0 opix)) 6668 (suffix (subseq formals (1+ coix) len)) 6625 6669 (more-args (when keyp `(&rest ,rest &key &allow-other-keys)))) 6670 (assert (and (integerp opix) (integerp coix) (= coix (1+ opix)))) 6626 6671 (flet ((next-method (o c) 6627 6672 (if keyp 6628 `(apply ',function , o ,c,rest)6629 `(,function , o ,c))))6673 `(apply ',function ,@prefix ,o ,c ,@suffix ,rest) 6674 `(,function ,@prefix ,o ,c ,@suffix)))) 6630 6675 `(progn 6631 (defmethod ,function ( (,operation symbol) ,component,@more-args)6676 (defmethod ,function (,@prefix (,operation symbol) component ,@suffix ,@more-args) 6632 6677 (if ,operation 6633 6678 ,(next-method … … 6637 6682 `(or (find-component () ,component) ,if-no-component)) 6638 6683 ,if-no-operation)) 6639 (defmethod ,function ( (,operation operation) ,component,@more-args)6684 (defmethod ,function (,@prefix (,operation operation) ,component ,@suffix ,@more-args) 6640 6685 (if (typep ,component 'component) 6641 6686 (error "No defined method for ~S on ~/asdf-action:format-action/" 6642 6687 ',function (cons ,operation ,component)) 6643 (let ((,found (find-component () ,component))) 6644 (if ,found 6645 ,(next-method operation found) 6646 ,if-no-component))))))))) 6688 (if-let (,found (find-component () ,component)) 6689 ,(next-method operation found) 6690 ,if-no-component)))))))) 6647 6691 6648 6692 … … 6923 6967 (defclass basic-compile-op (operation) 6924 6968 ((proclamations :initarg :proclamations :accessor compile-op-proclamations :initform nil) 6925 (flags :initarg :flags :accessor compile-op-flags 6926 :initform nil)))) 6969 (flags :initarg :flags :accessor compile-op-flags :initform nil)))) 6927 6970 6928 6971 ;;; Our default operations: loading into the current lisp image … … 6931 6974 ((sideway-operation :initform 'load-op))) 6932 6975 (defclass load-op (basic-load-op downward-operation sideway-operation selfward-operation) 6933 ;; NB: even though compile-op depends -onon prepare-op it is not needed-in-image-p,6976 ;; NB: even though compile-op depends on prepare-op it is not needed-in-image-p, 6934 6977 ;; so we need to directly depend on prepare-op for its side-effects in the current image. 6935 6978 ((selfward-operation :initform '(prepare-op compile-op)))) … … 7162 7205 #:circular-dependency #:circular-dependency-actions 7163 7206 #:call-while-visiting-action #:while-visiting-action 7164 #: traverse#:plan-actions #:perform-plan #:plan-operates-on-p7207 #:make-plan #:plan-actions #:perform-plan #:plan-operates-on-p 7165 7208 #:planned-p #:index #:forced #:forced-not #:total-action-count 7166 7209 #:planned-action-count #:planned-output-action-count #:visited-actions … … 7348 7391 ;; Three kinds of actions: 7349 7392 (out-op (and out-files t)) ; those that create files on the filesystem 7350 7351 ;(null-op (and (null out-files) (null in-files))) ; dependencyplaceholders that do nothing7393 ;;(image-op (and in-files (null out-files))) ; those that load stuff into the image 7394 ;;(null-op (and (null out-files) (null in-files))) ; placeholders that do nothing 7352 7395 ;; When was the thing last actually done? (Now, or ask.) 7353 7396 (op-time (or just-done (component-operation-time o c))) … … 7468 7511 :done-p (and done-p (not add-to-plan-p)) 7469 7512 :planned-p add-to-plan-p 7470 :index (if status (action-index status) (incf (plan-total-action-count plan))))) 7513 :index (if status 7514 (action-index status) 7515 (incf (plan-total-action-count plan))))) 7471 7516 (when add-to-plan-p 7472 7517 (incf (plan-planned-action-count plan)) … … 7484 7529 7485 7530 (defgeneric plan-actions (plan)) 7531 (defmethod plan-actions ((plan list)) 7532 plan) 7486 7533 (defmethod plan-actions ((plan sequential-plan)) 7487 7534 (reverse (plan-actions-r plan))) … … 7500 7547 ;;;; high-level interface: traverse, perform-plan, plan-operates-on-p 7501 7548 (with-upgradability () 7502 (defgeneric * (traverse) (operation component &key &allow-other-keys)7549 (defgeneric make-plan (plan-class operation component &key &allow-other-keys) 7503 7550 (:documentation 7504 "Generate and return a plan for performing OPERATION on COMPONENT. 7505 7506 The plan returned is a list of dotted-pairs. Each pair is the CONS 7507 of ASDF operation object and a COMPONENT object. The pairs will be 7508 processed in order by OPERATE.")) 7509 (define-convenience-action-methods traverse (operation component &key)) 7551 "Generate and return a plan for performing OPERATION on COMPONENT.")) 7552 (define-convenience-action-methods make-plan (plan-class operation component &key)) 7510 7553 7511 7554 (defgeneric perform-plan (plan &key)) … … 7514 7557 (defvar *default-plan-class* 'sequential-plan) 7515 7558 7516 (defmethod traverse ((o operation) (c component) &rest keys &key plan-class&allow-other-keys)7559 (defmethod make-plan (plan-class (o operation) (c component) &rest keys &key &allow-other-keys) 7517 7560 (let ((plan (apply 'make-instance 7518 7561 (or plan-class *default-plan-class*) 7519 :system (component-system c) (remove-plist-key :plan-class keys))))7562 :system (component-system c) keys))) 7520 7563 (traverse-action plan o c t) 7521 (plan-actions plan))) 7522 7523 (defmethod perform-plan :around (plan &key) 7524 (declare (ignorable plan)) 7564 plan)) 7565 7566 (defmethod perform-plan :around ((plan t) &key) 7525 7567 (let ((*package* *package*) 7526 7568 (*readtable* *readtable*)) … … 7528 7570 (call-next-method)))) ;; Going forward, see deferred-warning support in lisp-build. 7529 7571 7572 (defmethod perform-plan ((plan t) &rest keys &key &allow-other-keys) 7573 (apply 'perform-plan (plan-actions plan) keys)) 7574 7530 7575 (defmethod perform-plan ((steps list) &key force &allow-other-keys) 7531 7576 (loop* :for (o . c) :in steps … … 7533 7578 :do (perform-with-restarts o c))) 7534 7579 7580 (defmethod plan-operates-on-p ((plan plan-traversal) (component-path list)) 7581 (plan-operates-on-p (plan-actions plan) component-path)) 7582 7535 7583 (defmethod plan-operates-on-p ((plan list) (component-path list)) 7536 7584 (find component-path (mapcar 'cdr plan) … … 7538 7586 7539 7587 7540 ;;;; Incidental traversals 7588 ;;;; Incidental traversals 7541 7589 (with-upgradability () 7542 7590 (defclass filtered-sequential-plan (sequential-plan) … … 7562 7610 (defmethod traverse-actions (actions &rest keys &key plan-class &allow-other-keys) 7563 7611 (let ((plan (apply 'make-instance (or plan-class 'filtered-sequential-plan) keys))) 7564 (loop* :for (o . c) :in actions :do 7565 (traverse-action plan o c t)) 7566 (plan-actions plan))) 7567 7568 (define-convenience-action-methods traverse-sub-actions (o c &key)) 7612 (loop* :for (o . c) :in actions :do (traverse-action plan o c t)) 7613 plan)) 7614 7615 (define-convenience-action-methods traverse-sub-actions (operation component &key)) 7569 7616 (defmethod traverse-sub-actions ((operation operation) (component component) &rest keys &key &allow-other-keys) 7570 7617 (apply 'traverse-actions (direct-dependencies operation component) … … 7574 7621 (with-slots (keep-operation keep-component) plan 7575 7622 (loop* :for (o . c) :in (call-next-method) 7576 :when (and (typep o keep-operation) 7577 (typep c keep-component)) 7623 :when (and (typep o keep-operation) (typep c keep-component)) 7578 7624 :collect (cons o c)))) 7579 7625 7580 7626 (defmethod required-components (system &rest keys &key (goal-operation 'load-op) &allow-other-keys) 7581 7627 (remove-duplicates 7582 (mapcar 'cdr (apply 'traverse-sub-actions goal-operation system 7583 (remove-plist-key :goal-operation keys))) 7628 (mapcar 'cdr (plan-actions 7629 (apply 'traverse-sub-actions goal-operation system 7630 (remove-plist-key :goal-operation keys)))) 7584 7631 :from-end t))) 7585 7632 … … 7672 7719 7673 7720 (defmethod operate ((operation operation) (component component) 7674 &rest keys &key &allow-other-keys)7675 (let ((plan (apply ' traverseoperation component keys)))7721 &rest keys &key plan-class &allow-other-keys) 7722 (let ((plan (apply 'make-plan plan-class operation component keys))) 7676 7723 (apply 'perform-plan plan keys) 7677 7724 (values operation plan))) … … 7798 7845 7799 7846 ;;;; ------------------------------------------------------------------------- 7800 ;;; Internal hacks for backward-compatibility 7847 ;;; Internal hacks for backward-compatibility 7801 7848 7802 7849 (asdf/package:define-package :asdf/backward-internals … … 8182 8229 ;; but instead inherit from a basic-FOO-op as with basic-fasl-op above. 8183 8230 8184 (defclass lib-op (bundle-compile-op) 8231 (defclass no-ld-flags-op (operation) ()) 8232 8233 (defclass lib-op (bundle-compile-op no-ld-flags-op) 8185 8234 ((bundle-type :initform #+(or ecl mkcl) :lib #-(or ecl mkcl) :no-output-file)) 8186 8235 (:documentation #+(or ecl mkcl) "compile the system and produce linkable (.a) library for it." 8187 8236 #-(or ecl mkcl) "just compile the system")) 8188 8237 8189 (defclass dll-op (bundle- op basic-compile-op)8238 (defclass dll-op (bundle-compile-op selfward-operation no-ld-flags-op) 8190 8239 ((bundle-type :initform :dll)) 8191 (:documentation " Link together all the dynamic library used by this system into a single one."))8240 (:documentation "compile the system and produce dynamic (.so/.dll) library for it.")) 8192 8241 8193 8242 (defclass binary-op (basic-compile-op selfward-operation) … … 8212 8261 (:documentation "Create a single fasl for the system and its dependencies.")) 8213 8262 8214 (defclass monolithic-lib-op (monolithic-bundle-compile-op basic-compile-op )8263 (defclass monolithic-lib-op (monolithic-bundle-compile-op basic-compile-op no-ld-flags-op) 8215 8264 ((bundle-type :initform #+(or ecl mkcl) :lib #-(or ecl mkcl) :no-output-file)) 8216 8265 (:documentation #+(or ecl mkcl) "Create a single linkable library for the system and its dependencies." 8217 8266 #-(or ecl mkcl) "Compile a system and its dependencies.")) 8218 8267 8219 (defclass monolithic-dll-op (monolithic-bundle-op basic-compile-op sideway-operation selfward-operation) 8220 ((bundle-type :initform :dll) 8221 (selfward-operation :initform 'dll-op) 8222 (sideway-operation :initform 'dll-op))) 8268 (defclass monolithic-dll-op (monolithic-bundle-compile-op sideway-operation selfward-operation no-ld-flags-op) 8269 ((bundle-type :initform :dll)) 8270 (:documentation "Create a single dynamic (.so/.dll) library for the system and its dependencies.")) 8223 8271 8224 8272 (defclass program-op #+(or mkcl ecl) (monolithic-bundle-compile-op) … … 8234 8282 ((eql :fasl) #-(or ecl mkcl) (compile-file-type) #+(or ecl mkcl) "fasb") 8235 8283 #+ecl 8236 ((member :binary :dll :lib :s tatic-library :program :object :program)8284 ((member :binary :dll :lib :shared-library :static-library :program :object :program) 8237 8285 (compile-file-type :type bundle-type)) 8238 8286 ((eql :binary) "image") … … 8306 8354 (operation-original-initargs instance)))) 8307 8355 8308 (defmethod bundle-op-build-args :around ((o lib-op))8356 (defmethod bundle-op-build-args :around ((o no-ld-flags-op)) 8309 8357 (declare (ignorable o)) 8310 8358 (let ((args (call-next-method))) … … 9033 9081 (:use :uiop/common-lisp :uiop :asdf/upgrade 9034 9082 :asdf/component :asdf/system :asdf/find-system :asdf/operation :asdf/action 9035 :asdf/lisp-action :asdf/ operate :asdf/output-translations)9083 :asdf/lisp-action :asdf/plan :asdf/operate :asdf/output-translations) 9036 9084 (:export 9037 9085 #:*asdf-verbose* 9038 9086 #:operation-error #:compile-error #:compile-failed #:compile-warned 9039 #:error-component #:error-operation 9087 #:error-component #:error-operation #:traverse 9040 9088 #:component-load-dependencies 9041 9089 #:enable-asdf-binary-locations-compatibility … … 9090 9138 or even ASDF:SYSTEM-SOURCE-DIRECTORY or ASDF:SYSTEM-RELATIVE-PATHNAME 9091 9139 if that's whay you mean." ;;) 9092 (system-source-file x))) 9140 (system-source-file x)) 9141 9142 (defgeneric* (traverse) (operation component &key &allow-other-keys) 9143 (:documentation 9144 "Generate and return a plan for performing OPERATION on COMPONENT. 9145 9146 The plan returned is a list of dotted-pairs. Each pair is the CONS 9147 of ASDF operation object and a COMPONENT object. The pairs will be 9148 processed in order by OPERATE.")) 9149 (define-convenience-action-methods traverse (operation component &key)) 9150 9151 (defmethod traverse ((o operation) (c component) &rest keys &key plan-class &allow-other-keys) 9152 (plan-actions (apply 'make-plan plan-class o c keys)))) 9093 9153 9094 9154 … … 9161 9221 (let ((command (apply 'format nil control-string args))) 9162 9222 (asdf-message "; $ ~A~%" command) 9163 (run-program command :force-shell t :ignore-error-status t :output *verbose-out*)))) 9223 (handler-case 9224 (progn 9225 (run-program command :force-shell t :ignore-error-status nil :output *verbose-out*) 9226 0) 9227 (subprocess-error (c) 9228 (let ((code (subprocess-error-code c))) 9229 (typecase code 9230 (integer code) 9231 (t 255)))))))) 9164 9232 9165 9233 (with-upgradability () … … 9471 9539 9472 9540 (defun initialize-source-registry (&optional (parameter *source-registry-parameter*)) 9473 ;; Record the parameter used to configure the registry 9541 ;; Record the parameter used to configure the registry 9474 9542 (setf *source-registry-parameter* parameter) 9475 9543 ;; Clear the previous registry database: … … 9517 9585 (:export 9518 9586 #:defsystem #:find-system #:locate-system #:coerce-name 9519 #:oos #:operate #: traverse#:perform-plan #:sequential-plan9587 #:oos #:operate #:make-plan #:perform-plan #:sequential-plan 9520 9588 #:system-definition-pathname #:with-system-definitions 9521 9589 #:search-for-system-definition #:find-component #:component-find-path … … 9573 9641 #:operation-on-warnings #:operation-on-failure ; backward-compatibility 9574 9642 #:component-property ; backward-compatibility 9643 #:traverse ; backward-compatibility 9575 9644 9576 9645 #:system-description … … 9707 9776 (values-list l)))))))) 9708 9777 9778 #+cmu 9779 (with-upgradability () 9780 (defun herald-asdf (stream) 9781 (format stream " ASDF ~A" (asdf-version))) 9782 (setf (getf ext:*herald-items* :asdf) `(herald-asdf))) 9783 9709 9784 9710 9785 ;;;; Done!
Note: See TracChangeset
for help on using the changeset viewer.