Commit 7d519c10 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files
parents d253f1e0 73b746da
......@@ -74,7 +74,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.0.1.9" ;; to be automatically updated by make bump-version
:version "3.0.1.13" ;; to be automatically updated by make bump-version
:depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8
;; For most purposes, asdf itself specially counts as a builtin system.
......
;;;; -------------------------------------------------------------------------
;;; Internal hacks for backward-compatibility
;;; Internal hacks for backward-compatibility
(asdf/package:define-package :asdf/backward-internals
(:recycle :asdf/backward-internals :asdf)
......
......@@ -49,14 +49,16 @@
;; we'd have to have the monolithic-op not inherit from the main op,
;; but instead inherit from a basic-FOO-op as with basic-fasl-op above.
(defclass lib-op (bundle-compile-op)
(defclass no-ld-flags-op (operation) ())
(defclass lib-op (bundle-compile-op no-ld-flags-op)
((bundle-type :initform #+(or ecl mkcl) :lib #-(or ecl mkcl) :no-output-file))
(:documentation #+(or ecl mkcl) "compile the system and produce linkable (.a) library for it."
#-(or ecl mkcl) "just compile the system"))
(defclass dll-op (bundle-op basic-compile-op)
(defclass dll-op (bundle-compile-op selfward-operation no-ld-flags-op)
((bundle-type :initform :dll))
(:documentation "Link together all the dynamic library used by this system into a single one."))
(:documentation "compile the system and produce dynamic (.so/.dll) library for it."))
(defclass binary-op (basic-compile-op selfward-operation)
((selfward-operation :initform '(fasl-op lib-op)))
......@@ -79,15 +81,14 @@
(defclass monolithic-fasl-op (monolithic-bundle-compile-op basic-fasl-op) ()
(:documentation "Create a single fasl for the system and its dependencies."))
(defclass monolithic-lib-op (monolithic-bundle-compile-op basic-compile-op)
(defclass monolithic-lib-op (monolithic-bundle-compile-op basic-compile-op no-ld-flags-op)
((bundle-type :initform #+(or ecl mkcl) :lib #-(or ecl mkcl) :no-output-file))
(:documentation #+(or ecl mkcl) "Create a single linkable library for the system and its dependencies."
#-(or ecl mkcl) "Compile a system and its dependencies."))
(defclass monolithic-dll-op (monolithic-bundle-op basic-compile-op sideway-operation selfward-operation)
((bundle-type :initform :dll)
(selfward-operation :initform 'dll-op)
(sideway-operation :initform 'dll-op)))
(defclass monolithic-dll-op (monolithic-bundle-compile-op sideway-operation selfward-operation no-ld-flags-op)
((bundle-type :initform :dll))
(:documentation "Create a single dynamic (.so/.dll) library for the system and its dependencies."))
(defclass program-op #+(or mkcl ecl) (monolithic-bundle-compile-op)
#-(or mkcl ecl) (monolithic-bundle-op selfward-operation)
......@@ -101,7 +102,7 @@
((or null string) bundle-type)
((eql :fasl) #-(or ecl mkcl) (compile-file-type) #+(or ecl mkcl) "fasb")
#+ecl
((member :binary :dll :lib :static-library :program :object :program)
((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")))
......@@ -173,7 +174,7 @@
(remove-plist-keys '(:type :monolithic :name-suffix)
(operation-original-initargs instance))))
(defmethod bundle-op-build-args :around ((o lib-op))
(defmethod bundle-op-build-args :around ((o no-ld-flags-op))
(declare (ignorable o))
(let ((args (call-next-method)))
(remf args :ld-flags)
......
......@@ -41,6 +41,12 @@
(and (first l) (register-pre-built-system (coerce-name name)))
(values-list l))))))))
#+cmu
(with-upgradability ()
(defun herald-asdf (stream)
(format stream " ASDF ~A" (asdf-version)))
(setf (getf ext:*herald-items* :asdf) `(herald-asdf)))
;;;; Done!
(with-upgradability ()
......
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 3.0.1.9: Another System Definition Facility.
;;; This is ASDF 3.0.1.13: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......@@ -70,8 +70,8 @@
(existing-major-minor (subseq existing-version 0 second-dot))
(existing-version-number (and existing-version (read-from-string existing-major-minor)))
(away (format nil "~A-~A" :asdf existing-version)))
(when (and existing-version (< existing-version-number
(or #+abcl 2.25 #+cmu 2.018 #-(or abcl cmu) 2.27)))
(when (and existing-version
(< existing-version-number #+abcl 2.25 #+cmu 2.018 #-(or abcl cmu) 2.27))
(rename-package :asdf away)
(when *load-verbose*
(format t "~&; Renamed old ~A package away to ~A~%" :asdf away))))))
......
......@@ -33,15 +33,14 @@
(defclass basic-load-op (operation) ())
(defclass basic-compile-op (operation)
((proclamations :initarg :proclamations :accessor compile-op-proclamations :initform nil)
(flags :initarg :flags :accessor compile-op-flags
:initform nil))))
(flags :initarg :flags :accessor compile-op-flags :initform nil))))
;;; Our default operations: loading into the current lisp image
(with-upgradability ()
(defclass prepare-op (upward-operation sideway-operation)
((sideway-operation :initform 'load-op)))
(defclass load-op (basic-load-op downward-operation sideway-operation selfward-operation)
;; NB: even though compile-op depends-on on prepare-op it is not needed-in-image-p,
;; NB: even though compile-op depends on prepare-op it is not needed-in-image-p,
;; so we need to directly depend on prepare-op for its side-effects in the current image.
((selfward-operation :initform '(prepare-op compile-op))))
(defclass compile-op (basic-compile-op downward-operation selfward-operation)
......
......@@ -206,8 +206,8 @@ the action of OPERATION on COMPONENT in the PLAN"))
(in-files (input-files o c))
;; Three kinds of actions:
(out-op (and out-files t)) ; those that create files on the filesystem
;(image-op (and in-files (null out-files))) ; those that load stuff into the image
;(null-op (and (null out-files) (null in-files))) ; dependency placeholders that do nothing
;;(image-op (and in-files (null out-files))) ; those that load stuff into the image
;;(null-op (and (null out-files) (null in-files))) ; placeholders that do nothing
;; When was the thing last actually done? (Now, or ask.)
(op-time (or just-done (component-operation-time o c)))
;; Accumulated timestamp from dependencies (or T if forced or out-of-date)
......@@ -326,7 +326,9 @@ the action of OPERATION on COMPONENT in the PLAN"))
:stamp stamp
:done-p (and done-p (not add-to-plan-p))
:planned-p add-to-plan-p
:index (if status (action-index status) (incf (plan-total-action-count plan)))))
:index (if status
(action-index status)
(incf (plan-total-action-count plan)))))
(when add-to-plan-p
(incf (plan-planned-action-count plan))
(unless aniip
......@@ -399,7 +401,7 @@ the action of OPERATION on COMPONENT in the PLAN"))
:test 'equal :key 'component-find-path)))
;;;; Incidental traversals
;;;; Incidental traversals
(with-upgradability ()
(defclass filtered-sequential-plan (sequential-plan)
((action-filter :initform t :initarg :action-filter :reader plan-action-filter)
......@@ -423,8 +425,7 @@ the action of OPERATION on COMPONENT in the PLAN"))
(defmethod traverse-actions (actions &rest keys &key plan-class &allow-other-keys)
(let ((plan (apply 'make-instance (or plan-class 'filtered-sequential-plan) keys)))
(loop* :for (o . c) :in actions :do
(traverse-action plan o c t))
(loop* :for (o . c) :in actions :do (traverse-action plan o c t))
plan))
(define-convenience-action-methods traverse-sub-actions (operation component &key))
......@@ -435,8 +436,7 @@ the action of OPERATION on COMPONENT in the PLAN"))
(defmethod plan-actions ((plan filtered-sequential-plan))
(with-slots (keep-operation keep-component) plan
(loop* :for (o . c) :in (call-next-method)
:when (and (typep o keep-operation)
(typep c keep-component))
:when (and (typep o keep-operation) (typep c keep-component))
:collect (cons o c))))
(defmethod required-components (system &rest keys &key (goal-operation 'load-op) &allow-other-keys)
......
......@@ -288,7 +288,7 @@ system names to pathnames of .asd files")
(defvar *source-registry-parameter* nil)
(defun initialize-source-registry (&optional (parameter *source-registry-parameter*))
;; Record the parameter used to configure the registry
;; Record the parameter used to configure the registry
(setf *source-registry-parameter* parameter)
;; Clear the previous registry database:
(setf *source-registry* (make-hash-table :test 'equal))
......
#+ecl
(ffi:clines "
extern int sample_function();
int sample_function()
{
return 42;
}
")
(in-package :test-package)
(ffi:def-function "sample_function" () :returning :int)
(in-package :test-package)
(assert *file1*)
(defvar *f2c* 0)
(incf *f2c*)
......@@ -70,3 +70,7 @@
(defsystem :test-asdf/bundle-2
:depends-on (:test-asdf/bundle-1) :components ((:file "file2")))
(defsystem :test-asdf/dll-test :components ((:file "dll-test")))
(defsystem :test-asdf/dll-user :components ((:file "dll-user")))
;;; -*- Lisp -*-
(in-package :asdf-test)
;;;---------------------------------------------------------------------------
......@@ -11,9 +9,17 @@
(asdf:clear-system :test-asdf/bundle-1)
(asdf:clear-system :test-asdf/bundle-2)
(when (find-package :test-package) (delete-package :test-package))
#+(or abcl (and ecl ecl-bytecmp) gcl)
#+(or (and ecl ecl-bytecmp) gcl) ;; actually available on ABCL 1.2.0 and later.
(leave-test "bundles not on this implementation" 0)
#+abcl
(let* ((version (lisp-implementation-version))
(version-nums (subseq version 0 (position-if-not (lambda (x) (find x "0123456789.")) version))))
(when (version< version-nums "1.2.0")
(leave-test "Your old ABCL is known to fail this test script, so skipping it." 0)))
(defparameter *bundle-1* (output-file 'fasl-op :test-asdf/bundle-1))
(defparameter *bundle-2* (output-file 'fasl-op :test-asdf/bundle-2))
(defparameter *mono-bundle-2* (output-file 'monolithic-fasl-op :test-asdf/bundle-2))
......@@ -33,3 +39,11 @@
(DBG "Now for the mono-fasl")
(operate 'monolithic-fasl-op :test-asdf/bundle-2)
(assert (probe-file *mono-bundle-2*))
;;; Test DLL-op on ECL.
#+ecl
(progn
(operate 'dll-op :test-asdf/dll-test)
(si:load-foreign-module (first (output-files 'dll-op :test-asdf/dll-test)))
(operate 'load-op :test-asdf/dll-user)
(assert (= (test-package::sample-function) 42)))
......@@ -313,7 +313,7 @@ using READ within a WITH-SAFE-IO-SYNTAX, that represents the warnings currently
WITH-COMPILATION-UNIT. One of three functions required for deferred-warnings support in ASDF."
#+allegro
(list :functions-defined excl::.functions-defined.
:functions-called excl::.functions-called.)
:functions-called excl::.functions-called.)
#+clozure
(mapcar 'reify-deferred-warning
(if-let (dw ccl::*outstanding-deferred-warnings*)
......@@ -355,7 +355,7 @@ One of three functions required for deferred-warnings support in ASDF."
(declare (ignorable reified-deferred-warnings))
#+allegro
(destructuring-bind (&key functions-defined functions-called)
reified-deferred-warnings
reified-deferred-warnings
(setf excl::.functions-defined.
(append functions-defined excl::.functions-defined.)
excl::.functions-called.
......
......@@ -398,7 +398,7 @@ ELEMENT-TYPE and EXTERNAL-FORMAT for the stream passed to the OUTPUT processor."
#+allegro
(excl:run-shell-command
command
:input nil
:input nil
:output nil
:error-output :output ; write STDERR to output, too
:wait t
......
......@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
(asdf-version "3.0.1.9")
(asdf-version "3.0.1.13")
(existing-version (asdf-version)))
(setf *asdf-version* asdf-version)
(when (and existing-version (not (equal asdf-version existing-version)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment