Skip to content
Snippets Groups Projects
Commit bf63ffe8 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

1.634: play nicer with ECL that may pre-package some ASDF systems.

More documentation updates. More uses of merge-pathnames*.
parent f828fe8d
No related branches found
No related tags found
No related merge requests found
......@@ -168,8 +168,8 @@
(defmethod output-files ((o bundle-op) (c system))
(let ((name (concatenate 'base-string (component-name c)
(slot-value o 'name-suffix))))
(list (merge-pathnames (compile-file-pathname name :type (bundle-op-type o))
(component-relative-pathname c)))))
(list (merge-pathnames* (compile-file-pathname name :type (bundle-op-type o))
(component-relative-pathname c)))))
(defmethod output-files ((o fasl-op) (c system))
(loop for file in (call-next-method)
......
......@@ -247,7 +247,7 @@
;; This parameter isn't actually user-visible
;; -- please use the exported function ASDF:ASDF-VERSION below.
;; the 1+ hair is to ensure that we don't do an inadvertent find and replace
(subseq "VERSION:1.633" (1+ (length "VERSION"))))
(subseq "VERSION:1.634" (1+ (length "VERSION"))))
(defun asdf-version ()
"Exported interface to the version of ASDF currently installed. A string.
......@@ -2207,7 +2207,7 @@ output to `*verbose-out*`. Returns the shell's exit code."
;;; ---------------------------------------------------------------------------
;;; Generic support for configuration files
(defun user-configuration-directory ()
(merge-pathnames #p".config/" (user-homedir-pathname)))
(merge-pathnames* #p".config/" (user-homedir-pathname)))
(defun system-configuration-directory ()
#p"/etc/")
......@@ -2419,15 +2419,15 @@ with a different configuration, so the configuration would be re-read then."
(defparameter *implementation-output-translations*
`(:output-translations
;; If clozure had any precompiled ASDF system, we'd use that:
; #+clozure (,(ccl::ccl-directory) ())
;; SBCL *does* have precompiled ASDF system, so we use this:
#+sbcl (,(getenv "SBCL_HOME") ())
;; All-import, here is where we want user stuff to be:
:inherit-configuration
;; If we want to enable the user cache by default, here would be the place:
:enable-user-cache
))
;; Some implementations have precompiled ASDF systems,
;; so we must disable translations for implementation paths.
#+sbcl (,(getenv "SBCL_HOME") ())
#+ecl (,(translate-logical-pathname "SYS:**;*.*") ()) ; only needed if LPNs are resolved manually.
#+clozure (,(wilden (ccl::ccl-directory)) ()) ; not needed: no precompiled ASDF system
;; All-import, here is where we want user stuff to be:
:inherit-configuration
;; If we want to enable the user cache by default, here would be the place:
:enable-user-cache))
(defun implementation-output-translations ()
*implementation-output-translations*)
......@@ -2763,10 +2763,10 @@ with a different configuration, so the configuration would be re-read then."
:inherit-configuration))
(defun default-source-registry ()
`(:source-registry
#+sbcl (:directory ,(merge-pathnames ".sbcl/systems/" (user-homedir-pathname)))
#+sbcl (:directory ,(merge-pathnames* ".sbcl/systems/" (user-homedir-pathname)))
(:directory ,(truenamize (directory-namestring *default-pathname-defaults*)))
(:directory ,(merge-pathnames ".local/share/common-lisp/systems/" (user-homedir-pathname)))
(:tree ,(merge-pathnames ".local/share/common-lisp/source/" (user-homedir-pathname)))
(:directory ,(merge-pathnames* ".local/share/common-lisp/systems/" (user-homedir-pathname)))
(:tree ,(merge-pathnames* ".local/share/common-lisp/source/" (user-homedir-pathname)))
(:directory "/usr/local/share/common-lisp/systems/")
(:tree "/usr/local/share/common-lisp/source/")
(:directory "/usr/local/share/common-lisp/systems/")
......@@ -2775,13 +2775,13 @@ with a different configuration, so the configuration would be re-read then."
(:tree "/usr/share/common-lisp/source/")
:inherit-configuration))
(defun user-source-registry ()
(merge-pathnames *source-registry-file* (user-configuration-directory)))
(merge-pathnames* *source-registry-file* (user-configuration-directory)))
(defun system-source-registry ()
(merge-pathnames *source-registry-file* (system-configuration-directory)))
(merge-pathnames* *source-registry-file* (system-configuration-directory)))
(defun user-source-registry-directory ()
(merge-pathnames *source-registry-directory* (user-configuration-directory)))
(merge-pathnames* *source-registry-directory* (user-configuration-directory)))
(defun system-source-registry-directory ()
(merge-pathnames *source-registry-directory* (system-configuration-directory)))
(merge-pathnames* *source-registry-directory* (system-configuration-directory)))
(defun environment-source-registry ()
(getenv "CL_SOURCE_REGISTRY"))
......
......@@ -142,6 +142,17 @@ to learn how to define a system of your own.
@c XXXX missing @xref here!
Later chapters describe the ASDF internals and how to extend ASDF.
NOTA BENE:
We are preparing for a release of ASDF 2,
which will have version 2.000 and later.
The current release 1.634 has all the code we think we need,
but we're still working on documentation,
and on fixing the occasional bug.
For all practical purposes, ASDF 2 refers to releases later than 1.634,
and ASDF 1 to any release earlier than 1.369 or so.
Once ASDF 2.000 is released, older versions will not be supported anymore,
and we'll push @code{:asdf2} onto @code{*features*}.
@node Loading ASDF, Configuring ASDF, Introduction, Top
@comment node-name, next, previous, up
......@@ -1498,29 +1509,29 @@ Configurations specify mappings from source locations to binary locations.
from a script, from its own configuration file, etc.
@item
The source registry will be configured from
The source registry will be configured from
the environment variable @code{ASDF_OUTPUT_TRANSLATIONS} if it exists.
@item
The source registry will be configured from
The source registry will be configured from
user configuration file
@file{~/.config/common-lisp/asdf-output-translations.conf}
if it exists.
@item
The source registry will be configured from
The source registry will be configured from
user configuration directory
@file{~/.config/common-lisp/asdf-output-translations.conf.d/}
if it exists.
@item
The source registry will be configured from
The source registry will be configured from
system configuration file
@file{/etc/common-lisp/asdf-output-translations.conf}
if it exists.
@item
The source registry will be configured from
The source registry will be configured from
system configuration directory
@file{/etc/common-lisp/asdf-output-translations.conf.d/}
if it exists.
......@@ -1537,7 +1548,7 @@ includes its inherited configuration.
Additionally, some implementation-specific directories
may be automatically added to whatever mappings are specified
in configuration files, no matter if the last one inherits or not.
in configuration files, no matter whether the last one inherits or not.
@section Backward Compatibility
......@@ -1634,7 +1645,8 @@ Relative components better be either relative
or subdirectories of the path before them, or bust.
The last component, if not a pathname, is notionally completed by @file{/**/*.*}.
You can specify more fine-grained patterns by using a pathname object,
You can specify more fine-grained patterns
by using a pathname object as the last component
e.g. @file{#p"some/path/**/foo*/bar-*.fasl"}
You may use @code{#+features} to customize the configuration file.
......@@ -1787,7 +1799,7 @@ and to Peter van Eynde for @code{Common Lisp Controller}.
All bad design ideas and implementation bugs are to mine, not theirs.
But so are good design ideas and elegant implementation tricks.
-- Francois-Rene Rideau @email{fare@@tunes.org}
--- Francois-Rene Rideau @email{fare@@tunes.org}
@c @section Default locations
@c @findex output-files-for-system-and-operation
......
(in-package #:common-lisp-user)
(load (merge-pathnames "script-support" *load-pathname*))
(load (make-pathname :name "script-support" :defaults *load-pathname*))
(cond ((probe-file *asdf-lisp*)
(ensure-directories-exist *asdf-fasl*)
......
(in-package #:common-lisp-user)
(defvar *asdf-lisp* (truename (merge-pathnames "../asdf.lisp" *load-truename*)))
(defvar *asdf-fasl* (compile-file-pathname (merge-pathnames "tmp/" *asdf-lisp*)))
(defun load-asdf () (load *asdf-fasl*))
;; We can't use asdf:merge-pathnames* because ASDF isn't loaded yet.
;; We still want to work despite and host/device funkiness.
(defvar *asdf-lisp*
(truename
(merge-pathnames
(make-pathname :directory '(:relative :up) :name "asdf" :type "lisp"
:defaults *load-truename*)
*load-truename*)))
(defvar *asdf-fasl*
(compile-file-pathname
(merge-pathnames
(make-pathname :directory '(:relative "tmp") :defaults *asdf-lisp*)
*asdf-lisp*)))
(defun load-asdf ()
(load *asdf-fasl*))
#+allegro
(setf excl:*warn-on-nested-reader-conditionals* nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment