Skip to content
Snippets Groups Projects
Commit 1759ae26 authored by Peter Van Eynde's avatar Peter Van Eynde
Browse files

imported new upstream 1.704

parents 5274f11a 6df0471a
No related branches found
No related tags found
No related merge requests found
Showing with 5065 additions and 3268 deletions
......@@ -4,18 +4,31 @@ common-lisp.net
.vcs
init-lisp.lisp
website/changelog.xml
push
resbcl
reccl
# Test stuff
test/results/
test/tmp/
test/conf.d/
test/dir1/
test/dir2/
# Temporary files from documentation build
doc/asdf/
doc/asdf.aux
doc/asdf.cp
doc/asdf.cps
doc/asdf.fn
doc/asdf.fns
doc/asdf.html
doc/asdf.info
doc/asdf.ky
doc/asdf.log
doc/asdf.pdf
doc/asdf.pg
doc/asdf.toc
doc/asdf.tp
doc/asdf.vr
doc/asdf.vrs
# We build these at various stages in the make process
LICENSE
website/output/
test-results/
tmp/
lift-local.config
*.dribble
......
......@@ -21,7 +21,6 @@ bump_revision: FORCE
bin/bump-revision-and-tag.sh
archive: FORCE
sbcl --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
--eval "(rewrite-license)" --eval "(quit)"
bin/build-tarball.sh
......@@ -33,12 +32,11 @@ archive-copy: archive
git push cl.net
git push --tags cl.net
website-copy: FORCE
bin/rsync-cp.sh website/output/ $(webhome_private)
bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private)
website:
make -C doc website
clean_dirs = $(sourceDirectory)
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl lx64fsl lx32fsl o
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl lx64fsl lx32fsl o bak
clean: FORCE
@for dir in $(clean_dirs); do \
......@@ -52,6 +50,8 @@ clean: FORCE
done; \
fi; \
done
rm -rf tmp
make -C doc clean
test: FORCE
@cd test; make clean;./run-tests.sh $(lisp) $(test-regex)
......
========================
ASDF Output Translations
========================
This file specifies how ASDF stores "binary" outputs for its operations,
typically Lisp FASL files, but also any other files
that may be generated, e.g. C files and executables from CFFI-GROVEL.
Configurations
==============
Configurations specify mappings from source locations to binary locations.
1- An application may explicitly initialize the output-translations
configuration using the `Configuration API`_ below,
in which case this takes precedence.
It may itself compute this configuration from the command-line,
from a script, from its own configuration file, etc.
2- The source registry will be configured from
the environment variable ``ASDF_OUTPUT_TRANSLATIONS`` if it exists.
3- The source registry will be configured from
user configuration file
``~/.config/common-lisp/asdf-output-translations.conf``
if it exists.
4- The source registry will be configured from
user configuration directory
``~/.config/common-lisp/asdf-output-translations.conf.d/``
if it exists.
5- The source registry will be configured from
system configuration file
``/etc/common-lisp/asdf-output-translations.conf``
if it exists.
6- The source registry will be configured from
system configuration directory
``/etc/common-lisp/asdf-output-translations.conf.d/``
if it exists.
Each of these configurations is specified as a SEXP
in a trival domain-specific language (defined below).
Additionally, a more shell-friendly syntax is available
for the environment variable (defined yet below).
Each of these configurations is only used if the previous
configuration explicitly or implicitly specifies that it
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.
Backward Compatibility
======================
We purposefully do NOT provide backward compatibility with earlier versions of
asdf-binary-locations (8 Sept 2009),
common-lisp-controller (7.00) or
cl-launch (2.35),
each of which had similar general capabilities.
Future versions of same packages (if any)
will hopefully use the new ASDF API as defined below.
These previous programs' API was not designed
for easy configuration by the end-user
in an easy way with configuration files,
and their previous API didn't fit the new paradigm.
But this incompatibility won't inconvenience many people.
Indeed, few people use and customize these packages;
these people are experts who can trivially adapt to the new configuration.
Most people are not experts, could not properly configure these features
(except inasmuch as the default configuration of
common-lisp-controller and/or cl-launch
might have been doing the right thing for some users),
and yet will experience software that "just works",
as configured by the system distributor, or by default.
Nevertheless, if you want to use the old ASDF-Binary-Locations
(the one available as an extension to load of top of ASDF,
not the one built into a few old versions of ASDF),
it may still work if you just make sure you do not configure the new
builtin ASDF-Output-Translations.
But if you configure both ASDF's new builtin and ASDF-Binary-Locations
(or an old common-lisp-controller or cl-launch),
you may experience "interesting" issues, so don't do it.
Configuration DSL
=================
Here is the grammar of the SEXP DSL for asdf-output-translations configuration:
;; A configuration is single SEXP starting with keyword :source-registry
;; followed by a list of directives.
CONFIGURATION := (:output-translations DIRECTIVE ...)
;; A directive is one of the following:
DIRECTIVE :=
;; include a configuration file or directory
(:include PATHNAME-DESIGNATOR) |
;; Your configuration expression MUST contain
;; exactly one of either of these:
:inherit-configuration | ; splices contents of inherited configuration
:ignore-inherited-configuration | ; drop contents of inherited configuration
;; enable global cache in ~/.common-lisp/cache/sbcl-1.0.35-x86-64/ or something.
:enable-user-cache |
;; Disable global cache. Map / to /
:disable-cache |
;; add a single directory to be scanned (no recursion)
(DIRECTORY-DESIGNATOR DIRECTORY-DESIGNATOR)
DIRECTORY-DESIGNATOR :=
ABSOLUTE-COMPONENT-DESIGNATOR |
(ABSOLUTE-COMPONENT-DESIGNATOR RELATIVE-COMPONENT-DESIGNATOR ...)
ABSOLUTE-COMPONENT-DESIGNATOR :=
STRING | ;; namestring (directory is assumed, better be absolute or bust, ``/**/*.*`` added)
PATHNAME | ;; pathname (better be an absolute directory or bust)
:HOME | ;; designates the user-homedir-pathname ~/
:USER-CACHE | ;; designates the default location for the user cache
:SYSTEM-CACHE | ;; designates the default location for the system cache
:ROOT | ;; the root of the filesystem hierarchy
:CURRENT-DIRECTORY ;; the current directory
RELATIVE-COMPONENT-DESIGNATOR :=
STRING | ;; namestring, directory is assumed. If the last component, ``/**/*.*`` is added
PATHNAME | ;; pathname unless last component, directory is assumed.
:IMPLEMENTATION | ;; a directory based on implementation, e.g. sbcl-1.0.32.30-linux-x86-64
:IMPLEMENTATION-TYPE | ;; a directory based on lisp-implementation-type only, e.g. sbcl
:CURRENT-DIRECTORY | ;; all components of the current directory, without the :absolute
:UID | ;; current UID -- not available on Windows
:USER ;; current USER name -- NOT IMPLEMENTED(!)
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 ``/**/*.*``.
You can specify more fine-grained patterns by using a pathname object,
e.g. ``#p"some/path/**/foo*/bar-*.fasl"``
You may use ``#+features`` to customize the configuration file.
The second designator of a mapping may be ``NIL``, indicating that files are not mapped
to anything but themselves (same as if the second designator was the same as the first).
``:include`` statements cause the search to recurse with the path specifications
from the file specified.
An ``:inherit-configuration`` statement cause the search to recurse with the path
specifications from the next configuration
(see section Configurations_ above).
:enable-user-cache is the same as ``(:root :user-cache)``.
:disable-cache is the same as ``(:root :root)``.
:user-cache uses the contents of variable ``asdf::*user-cache*``
which by default is the same as using
``(:home ".cache" "common-lisp" :implementation)``.
:system-cache uses the contents of variable ``asdf::*system-cache*``
which by default is the same as using
``(:root "var" "cache" "common-lisp" :uid :implementation-type)``
Configuration Directories
=========================
Configuration directories consist in files each contains
a list of directives without any enclosing ``(:asdf-output-translations ...)`` form.
The files will be sorted by namestring as if by ``#'string<`` and
the lists of directives of these files with be concatenated in order.
An implicit ``:inherit-configuration`` will be included
at the end of the list.
This allows for packaging software that has file granularity
(e.g. Debian's ``dpkg`` or some future version of ``clbuild``)
to easily include configuration information about distributed software.
Directories may be included by specifying a directory pathname
or namestring in an ``:include`` directive, e.g.::
(:include "/foo/bar/")
Shell-friendly syntax for configuration
=======================================
When considering environment variable ``ASDF_OUTPUT_TRANSLATIONS``
ASDF will skip to next configuration if it's an empty string.
It will ``READ`` the string as a SEXP in the DSL
if it begins with a paren ``(``
and it will be interpreted as a colon-separated list of directories.
Directories should come in pairs, each pair indicating a :map directive.
The magic empty entry indicates the splicing of inherited configuration
rather than one of entry in a mapping pair.
Semantics of Output Translations
================================
From the specified configuration, a list of mappings is extracted
in a straightforward way:
mappings are collected in order, recursing through
included or inherited configuration as specified.
To this list is prepended some implementation-specific mappings,
and is appended a global default.
The list is then compiled to a mapping table as follows:
for each entry, in order, resolve the first designated directory
into an actual directory pathname for source locations.
If no mapping was specified yet for that location,
resolve the second designated directory to an output location directory
add a mapping to the table mapping the source location to the output location,
and add another mapping from the output location to itself
(unless a mapping already exists for the output location).
Based on the table, a mapping function is defined,
mapping source pathnames to output pathnames:
given a source pathname, locate the longest matching prefix
in the source column of the mapping table.
Replace that prefix by the corresponding output column
in the same row of the table, and return the result.
If no match is found, return the source pathname.
(A global default mapping the filesystem root to itself
may ensure that there will always be a match,
with same fall-through semantics).
Caching Results
===============
The implementation is allowed to either eagerly compute the information
from the configurations and file system, or to lazily re-compute it
every time, or to cache any part of it as it goes.
To explicitly flush any information cached by the system, use the API below.
Output location API
===================
The specified functions are exported from package ASDF.
(initialize-output-translations)
will read the configuration and initialize all internal variables.
(clear-output-translations)
undoes any output location configuration
and clears any cache for the mapping algorithm.
You might want to call that before you
dump an image that would be resumed with a different configuration,
and return an empty configuration.
Note that this does not include clearing information about
systems defined in the current image, only about
where to look for systems not yet defined.
(ensure-output-translations)
checks whether output translations have been initialized.
If not, initialize them.
This function will be called before any attempt to operate on a system.
If your application wants to override the provided defaults,
it will have to use the below function process-output-translations.
(apply-output-translations PATHNAME)
Applies the configured output location translations to PATHNAME
(calls ensure-output-translations for the translations).
Credits
=======
Thanks a lot to Bjorn Lindberg and Gary King for ASDF-Binary-Locations,
and to Peter van Eynde for 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 <fare@tunes.org>
..
;;; Local Variables:
;;; mode: rst
;;; End:
===========================
Common Lisp Source Registry
===========================
This file specifies how build systems such as ASDF and XCVB
may be configured with respect to filesystem paths
where to search for Common Lisp source code.
Configurations
==============
Configurations specify paths where to find system files.
1- An application may explicitly initialize the source-registry
configuration using the `Configuration API`_ below,
in which case this takes precedence.
It may itself compute this configuration from the command-line,
from a script, from its own configuration file, etc.
2- The source registry will be configured from
the environment variable ``CL_SOURCE_REGISTRY`` if it exists.
3- The source registry will be configured from
user configuration file
``~/.config/common-lisp/source-registry.conf``
if it exists.
4- The source registry will be configured from
user configuration directory
``~/.config/common-lisp/source-registry.conf.d/``
if it exists.
5- The source registry will be configured from
system configuration file
``/etc/common-lisp/source-registry.conf``
if it exists.
6- The source registry will be configured from
system configuration directory
``/etc/common-lisp/source-registry.conf.d/``
if it exists.
7- The source registry will be configured from a default configuration,
which allows for implementation-specific software to be searched.
(See below `Backward Compatibility`_).
Each of these configuration is specified as a SEXP
in a trival domain-specific language (defined below).
Additionally, a more shell-friendly syntax is available
for the environment variable (defined yet below).
Each of these configurations is only used if the previous
configuration explicitly or implicitly specifies that it
includes its inherited configuration.
Additionally, some implementation-specific directories
may be automatically prepended to whatever directories are specified
in configuration files, no matter if the last one inherits or not.
Backward Compatibility
======================
For backward compatibility, ASDF will fall back to its old ways
of searching for ``.asd`` files in the directories specified in
``asdf:*central-registry*``
if it fails to find a configuration for the source registry, or
if it fails to find a requested system in the configured source registry.
This new mechanism will therefore not affect you if you don't use it,
but will take precedence over the old mechanism if you do use it.
Moreover, when using SBCL, now as before, ASDF will first look
for a matching system in the implementation-specific ``contrib`` directory.
This allows for some magic implementation-provided systems
to be loaded specially in a version that matches your implementation.
Configuration DSL
=================
Here is the grammar of the SEXP DSL for source-registry configuration:
;; A configuration is single SEXP starting with keyword :source-registry
;; followed by a list of directives.
CONFIGURATION := (:source-registry DIRECTIVE ...)
;; A directive is one of the following:
DIRECTIVE :=
;; add a single directory to be scanned (no recursion)
(:directory DIRECTORY-PATHNAME-DESIGNATOR) |
;; add a directory hierarchy, recursing but excluding specified patterns
(:tree DIRECTORY-PATHNAME-DESIGNATOR) |
;; override the default defaults for exclusion patterns
(:exclude PATTERN ...) |
;; splice the parsed contents of another config file
(:include REGULAR-FILE-PATHNAME-DESIGNATOR) |
;; Your configuration expression MUST contain
;; exactly one of either of these:
:inherit-configuration | ; splices contents of inherited configuration
:ignore-inherited-configuration | ; drop contents of inherited configuration
;; This directive specifies that some default must be spliced.
:default-registry
PATTERN := a string without wildcards, that will be matched exactly
against the name of a any subdirectory in the directory component
of a path. e.g. "_darcs" will match #p"/foo/bar/_darcs/src/bar.asd"
Configuration Directories
=========================
Configuration directories consist in files each contains
a list of directives without any enclosing ``(:source-registry ...)`` form.
The files will be sorted by namestring as if by #'string< and
the lists of directives of these files with be concatenated in order.
An implicit ``:inherit-configuration`` will be included
at the end of the list.
This allows for packaging software that has file granularity
(e.g. Debian's ``dpkg`` or some future version of ``clbuild``)
to easily include configuration information about distributed software.
Directories may be included by specifying a directory pathname
or namestring in an ``:include`` directive, e.g.::
(:include "/foo/bar/")
Shell-friendly syntax for configuration
=======================================
When considering environment variable ``CL_SOURCE_REGISTRY``
ASDF will skip to next configuration if it's an empty string.
It will ``READ`` the string as a SEXP in the DSL
if it begins with a paren ``(``
and it will be interpreted much like ``TEXINPUTS``
as ``:`` (colon) separated list of paths, where
* each entry is a directory to add to the search path.
* if the entry ends with a double slash ``//``
then it instead indicates a tree in the subdirectories
of which to recurse.
* if the entry is the empty string (which may only appear once),
then it indicates that the inherited configuration should be
spliced there.
Search Algorithm
================
In case that isn't clear, the semantics of the configuration is that
when searching for a system of a given name,
directives are processed in order.
When looking in a directory, if the system is found, the search succeeds,
otherwise it continues.
When looking in a tree, if one system is found, the search succeeds.
If multiple systems are found, the consequences are unspecified:
the search may succeed with any of the found systems,
or an error may be raised.
ASDF currently returns the first system found,
XCVB currently raised an error.
If none is found, the search continues.
Exclude statements specify patterns of subdirectories the systems of which
to ignore. Typically you don't want to use copies of files kept by such
version control systems as Darcs.
Include statements cause the search to recurse with the path specifications
from the file specified.
An inherit-configuration statement cause the search to recurse with the path
specifications from the next configuration
(see section Configurations_ above).
Caching Results
===============
The implementation is allowed to either eagerly compute the information
from the configurations and file system, or to lazily re-compute it
every time, or to cache any part of it as it goes.
To explicitly flush any information cached by the system, use the API below.
Configuration API
=================
The specified functions are exported from your build system's package.
Thus for ASDF the corresponding functions are in package ASDF,
and for XCVB the corresponding functions are in package XCVB.
(initialize-source-registry)
will read the configuration and initialize all internal variables.
(clear-source-registry)
undoes any source registry configuration
and clears any cache for the search algorithm.
You might want to call that before you
dump an image that would be resumed with a different configuration,
and return an empty configuration.
Note that this does not include clearing information about
systems defined in the current image, only about
where to look for systems not yet defined.
(ensure-source-registry)
checks whether a source registry has been initialized.
If not, initialize it.
This function will be called before any attempt to find a system
in the source registry.
If your application wants to override the provided defaults,
it will have to use the below function process-source-registry.
(process-source-registry X &key inherit collect)
If X is a CONS, parse it as a SEXP in the configuration DSL,
and extend or override inheritted configuration.
If X is a STRING, first parse it into a SEXP
as for the CL_SOURCE_REGISTRY
environment variable (see above) then process it.
If X is a PATHNAME, read the file as a single SEXP and process it.
The inheritted configuration is provided in keyword argument inherit,
itself a list of functions that take inherit
and collect keyword arguments
and defaulting to a list of functions
that implements the default behavior.
Future
======
If this mechanism is successful, in the future, we may declare
``asdf:*central-registry*`` obsolete and eventually remove it.
Any hook into implementation-specific search mechanisms will by then
have been integrated in the ``:default-configuration`` which everyone
should either explicitly use or implicit inherit. Some shell syntax
for it should probably be added somehow.
But we're not there yet. For now, let's see how practical this new
source-registry is.
Rejected ideas
==============
Alternatives I considered and rejected included:
1- Keep asdf:*central-registry* as the master with its current semantics,
and somehow the configuration parser expands the new configuration
language into a expanded series of directories of subdirectories to
lookup, pre-recursing through specified hierarchies. This is kludgy,
and leaves little space of future cleanups and extensions.
2- Keep asdf:*central-registry* remains the master but extend its semantics
in completely new ways, so that new kinds of entries may be implemented
as a recursive search, etc. This seems somewhat backwards.
3- Completely remove asdf:*central-registry*
and break backwards compatibility.
Hopefully this will happen in a few years after everyone migrate to
a better ASDF and/or to XCVB, but it would be very bad to do it now.
4- Replace asdf:*central-registry* by a symbol-macro with appropriate magic
when you dereference it or setf it. Only the new variable with new
semantics is handled by the new search procedure.
I've been suggested the below features, but have rejected them,
for the sake of keeping ASDF no more complex than strictly necessary.
* More syntactic sugar: synonyms for the configuration directives, such as
(:add-directory X) for (:directory X), or (:add-directory-hierarchy X)
or (:add-directory X :recurse t) for (:tree X).
* The possibility to register individual files instead of directories.
* Integrate Xach Beane's tilde expander into the parser,
or something similar that is shell-friendly or shell-compatible.
I'd rather keep ASDF minimal. But maybe this precisely keeps it
minimal by removing the need for evaluated entries that ASDF has?
i.e. uses of USER-HOMEDIR-PATHNAME and $SBCL_HOME
Hopefully, these are already superseded by the :default-registry
* Using the shell-unfriendly syntax /** instead of // to specify recursion
down a filesystem tree in the environment variable.
It isn't that Lisp friendly either.
TODO
====
* Integrate into the rest of the documentation.
* Add examples
* Add proper defaults.
* Get inspired by the XDG base directory specification?
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Credits
=======
Thanks a lot to Stelian Ionescu for the initial idea.
Thanks to Rommel Martinez for the initial implementation attempt.
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 <fare@tunes.org>, Mon, 22 Feb 2010 00:07:33 -0500
......@@ -9,6 +9,7 @@
;;;
;;; ECL SPECIFIC OPERATIONS FOR ASDF
;;;
#+xcvb (module (:depends-on ("asdf")))
(in-package :asdf)
(require 'cmp)
......@@ -168,8 +169,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)
......@@ -207,10 +208,36 @@
(defun make-build (system &rest args &key (monolithic nil) (type :fasl)
(move-here nil move-here-p)
&allow-other-keys)
(apply #'operate (select-operation monolithic type)
system
(remove-keys '(monolithic type) args)))
(let* ((operation-name (select-operation monolithic type))
(operation (apply #'operate operation-name
system
(remove-keys '(monolithic type move-here) args)))
(system (find-system system))
(files (and system (output-files operation system))))
(print files)
(print move-here)
(if (or move-here
(and (null move-here-p)
(member operation-name '(:program))))
(loop for path in files
for filename = (namestring (truename path))
for new-path = (make-pathname :name (pathname-name path)
:type (pathname-type path)
:defaults *default-pathname-defaults*)
for new-filename = (namestring new-path)
for command =
#+windows
(format nil "move ~S ~S" filename new-filename)
#-windows
(format nil "mv ~S ~S" filename new-filename)
do (unless (equalp new-filename filename)
(when (plusp (si::system (print command)))
(error "Unable to move file~& ~S~&to new location~& ~S"
path new-path)))
collect new-path)
files)))
;;;
;;; LOAD-FASL-OP
......@@ -254,10 +281,10 @@
(defclass compiled-file (component) ())
(defmethod component-relative-pathname ((component compiled-file))
(compile-file-pathname
(merge-component-relative-pathname
(slot-value component 'relative-pathname)
(component-name component)
"fas")))
(merge-component-name-type
(or (slot-value component 'relative-pathname)
(component-name component))
:type "fas")))
(defmethod output-files (o (c compiled-file))
nil)
......@@ -270,6 +297,33 @@
(defmethod perform (o (c compiled-file))
nil)
;;;
;;; Pre-built systems
;;;
(defclass prebuilt-system (system)
((static-library :accessor prebuilt-system-static-library :initarg :lib)))
(defmethod output-files ((o lib-op) (c prebuilt-system))
(values (list (compile-file-pathname (prebuilt-system-static-library c)
:type :lib))
t ; Advertise that we do not want this path renamed
))
(defmethod perform ((o lib-op) (c prebuilt-system))
(car (output-files o c)))
(defmethod component-depends-on ((o lib-op) (c prebuilt-system))
nil)
(defmethod bundle-sub-operations ((o lib-op) (c prebuilt-system))
nil)
(defmethod bundle-sub-operations ((o monolithic-lib-op) (c prebuilt-system))
(error "Prebuilt system ~S shipped with ECL can not be used in a monolithic library operation." c))
(defmethod bundle-sub-operations ((o monolithic-bundle-op) (c prebuilt-system))
nil)
;;;
;;; Final integration steps
;;;
......@@ -289,7 +343,8 @@
t))))
(defun register-pre-built-system (name)
(register-system name (make-instance 'system :name name)))
(register-system name (make-instance 'system :name name
:source-file nil)))
(setf si::*module-provider-functions*
(loop for f in si::*module-provider-functions*
......
This diff is collapsed.
This diff is collapsed.
cl-asdf (2:1.627-2) UNRELEASED; urgency=low
cl-asdf (2:1.704-1) UNRELEASED; urgency=low
* open for changes
* Imported new upstream.
-- Peter Van Eynde <pvaneynd@debian.org> Sat, 27 Feb 2010 21:40:19 +0100
......
Redirect /project/asdf/manual.html http://common-lisp.net/project/asdf/asdf.html
user=frideau
website:=${user}@common-lisp.net:/project/asdf/public_html/
output = asdf.html asdf asdf.pdf asdf.info
webfiles = index.html .htaccess style.css cclan.png lisp-logo120x80.png favicon.ico ${output}
intermediate = asdf.cps asdf.log asdf.vr asdf.aux asdf.fn asdf.toc asdf.vrs \
asdf.cp asdf.fns asdf.ky asdf.pg asdf.tp
all: asdf.html asdf.info asdf.pdf manual-html
manual-html: asdf.texinfo
makeinfo --html asdf.texinfo
asdf.html: asdf.texinfo
makeinfo --html --no-split --no-headers -o asdf.html asdf.texinfo
asdf.info: asdf.texinfo
makeinfo asdf.texinfo
asdf.pdf: asdf.texinfo
texi2pdf asdf.texinfo
website: all
rsync -av ${webfiles} ${website}
.PHONY: clean veryclean manual-html
clean:
rm -f ${intermediate}
veryclean: clean
rm -f asdf.html asdf.pdf asdf.info
rm -rf asdf/
This diff is collapsed.
File moved
File moved
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>ASDF - Another System Definition Facility</title>
<link type='text/css' href='style.css' rel='stylesheet' />
<meta name="author" content="the ASDF group"/>
</head>
<body>
<div class="header">
<span class="logo">
<a href="http://common-lisp.net/project/asdf/" title="ASDF Homepage">
<img src="lisp-logo120x80.png" title="ASDF homepage" width="100" alt="Lisp Lizzard" />
</a>
</span>
<h2>ASDF</h2><h4>Another System Definition Facility</h4>
</div>
<div class="system-links">
<ul>
<li><a href="#what_it_is">What it is</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#downloads">Getting it</a></li>
<li><a href="#bugs">Reporting Bugs</a></li>
<li><a href="#mailing-list">Mailing List</a></li>
<li><a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git;a=log"
>Changelog</a></li>
</ul>
</div>
<div class="contents">
<a id="what_it_is"></a>
<h3>What it is</h3>
<p>ASDF is a tool for describing how source files are organized:
what depends on which and when.
</p>
<p>It is roughly what Common-Lisp hackers use to build software
where C hackers would use say GNU Make.
</p>
<p>ASDF stands for <em>A</em>nother <em>S</em>ystem <em>D</em>efinition <em>F</em>acility,
in the continuity of the Lisp DEFSYSTEM of yore.
</p>
<a id="documentation"></a>
<h3>Documentation</h3>
<p>You can read our manual:</p>
<ul>
<li><a href="asdf.html">as one HTML file</a></li>
<li><a href="asdf/">split into one HTML file per section</a></li>
<li><a href="asdf.pdf">as a PDF document</a></li>
<li><a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git;a=blob;f=asdf.texinfo">as texinfo source</a></li>
</ul>
<a href="downloads"></a>
<h3>Getting it</h3>
<p>Though they may lag behind the version here, ASDF comes bundled with most Lisps.
To get the greatest and latest, you can:
</p>
<ul>
<li>download just the source for
<!--<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git;a=blob_plain;tag=RELEASE;f=asdf.lisp">asdf.lisp</a>,-->
<a href="http://common-lisp.net/project/asdf/asdf.lisp">asdf.lisp</a>,
</li>
<li>download the
<!--<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git;tag=RELEASE;a=snapshot;sf=tgz">tarball</a>,-->
<a href="http://common-lisp.net/project/asdf/asdf.tar.gz">tarball</a>
to get all bells and whistles,
</li>
<li>pull the latest from our git repository
(<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git">browse</a>)
<pre>git clone http://common-lisp.net/project/asdf/asdf.git</pre>
</li></ul>
<a id="bugs">
<h3>Reporting Bugs</h3>
<p>To report bugs, you can use our
<a href="https://launchpad.net/asdf/">launchpad project</a>.
If you're unsure about the bug or want to discuss how to fix it,
you can send email to the project mailing-list below.
</p>
<a id="mailing-list"></a>
<h3>Mailing List</h3>
<ul>
<li><a href="http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel">asdf-devel</a>:
A list for questions, patches, bug reports, and so on; It's for everything.
</li></ul>
<h3>Contributing</h3>
<p>Join our mailing list, check the code out from git,
send questions, ideas and patches!
</p>
<a id="news"></a>
<h3>What is happening</h3>
<dl>
<dt>December 2009 to April 2010</dt>
<dd>Fran&ccedil;ois-Ren&eacute; Rideau is de facto maintainer,
with notable contributions from Robert P. Goldman.
Push towards an ASDF 2 release
with many clean-ups, better configurability
and updated documentation.
</dd>
<dt>May 2006 to November 2009</dt>
<dd>Gary King is de facto maintainer,
with notable contributions from
Robert P. Goldman, Nikodemus Siivola, Christophe Rhodes, D Herring.
Many small features and bug fixes,
trying to make the project more usable,
moving to using git and common-lisp.net.
</dd>
<dt>May 2004 to April 2006</dt>
<dd>Christophe Rhodes is de facto maintainer,
with notable contributions from
Nikodemus Siivola, Peter Van Eynde, Edi Weitz, Kevin Rosenberg.
The system made more robust, a few more features.
<dt>August 2001 to May 2004</dt>
<dd>Developed by Daniel Barlow, with notable contributions from
Christophe Rhodes, Kevin Rosenberg, Edi Weitz, Rahul Jain.
<dt>August 2001</dt>
<dd>Created by Daniel Barlow</dd>
</dl>
</div>
<div id="footer">
<a class="nav" href="http://validator.w3.org/check/referer" title="xhtml1.1"><img src="http://common-lisp.net/project/cl-containers/shared/buttons/xhtml.gif" width="80" height="15" title="valid xhtml button" alt="valid xhtml" /></a>
<a class="nav" href="http://www.catb.org/hacker-emblem/" title="hacker"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/hacker.png" width="80" height="15" title="hacker emblem" alt="hacker button" /></a>
<a class="nav" href="http://www.lisp.org/" title="Association of Lisp Users"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/lambda-lisp.png" width="80" height="15" title="ALU emblem" alt="ALU button" /></a>
<a class="nav" href="http://common-lisp.net/" title="Common-Lisp.net"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/lisp-lizard.png" width="80" height="15" title="Common-Lisp.net" alt="Common-Lisp.net button" /></a>
<p><span class="copyright"Copyright &copy; 2001-2010 Daniel Barlow and contributors</span></p>
<p>ASDF has an <a href="http://www.opensource.org/licenses/mit-license.php">MIT style</a> license</p>
<div id="timestamp">Last updated 2010-04-08</div>
</div>
</body>
</html>
doc/lisp-logo120x80.png

13.1 KiB

......@@ -244,10 +244,12 @@ a:hover {
font-family: Arial, Helvetica, sans-serif;
}
.system-description {
width: 75%;
.contents {
// width: 90%;
padding-left: 2em;
float: left;
padding-right: 2em;
padding-top: 2em;
padding-bottom: 1.5em;
}
.check {font-size: x-small;
......
This diff is collapsed.
(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*)
(multiple-value-bind (result warnings-p errors-p)
;; style warnings shouldn't abort the compilation [2010/02/03:rpg]
(handler-bind ((style-warning
#'(lambda (w)
(princ w *error-output*)
(muffle-warning w))))
(compile-file *asdf-lisp*
:output-file *asdf-fasl*))
(declare (ignore result))
(cond (warnings-p
;;; ECL gives warnings that it shouldn't!
#+ecl (leave-lisp "ASDF compiled with warnings. Please fix ECL." 0)
#-ecl
(leave-lisp "Testsuite failed: ASDF compiled with warnings" 1))
(errors-p
(leave-lisp "Testsuite failed: ASDF compiled with ERRORS" 2))
(t
(leave-lisp "ASDF compiled cleanly" 0)))))
(t
(leave-lisp "Testsuite failed: unable to find ASDF source" 3)))
(cond
((not (probe-file *asdf-lisp*))
(leave-lisp "Testsuite failed: unable to find ASDF source" 3))
((and (probe-file *asdf-fasl*)
(> (file-write-date *asdf-fasl*) (file-write-date *asdf-lisp*))
(ignore-errors (load *asdf-fasl*)))
(leave-lisp "Reusing previously-compiled ASDF" 0))
(t
(let ((tmp (make-pathname :name "asdf-tmp" :defaults *asdf-fasl*)))
(ensure-directories-exist *asdf-fasl*)
(multiple-value-bind (result warnings-p errors-p)
;; style warnings shouldn't abort the compilation [2010/02/03:rpg]
(handler-bind ((style-warning
#'(lambda (w)
(princ w *error-output*)
(muffle-warning w))))
(compile-file *asdf-lisp* :output-file tmp))
(declare (ignore result))
(cond
#-ecl
(warnings-p
(leave-lisp "Testsuite failed: ASDF compiled with warnings" 1))
(errors-p
(leave-lisp "Testsuite failed: ASDF compiled with ERRORS" 2))
(t
#+ecl
(when warnings-p
(format t "~&ASDF compiled with warnings. Please fix ECL.~%"))
(when (probe-file *asdf-fasl*)
(delete-file *asdf-fasl*))
(rename-file tmp *asdf-fasl*)
(leave-lisp "ASDF compiled cleanly" 0)))))))
......@@ -5,7 +5,18 @@
# - quit with exit status 0 on getting eof
# - quit with exit status >0 if an unhandled error occurs
export CL_SOURCE_REGISTRY="$PWD"
usage () {
echo "$0 [lisp invocation] [scripts-regex]"
echo " - read lisp forms one at a time from matching scripts"
echo " - quit with exit status 0 on getting eof"
echo " - quit with exit status >0 if an unhandled error occurs"
echo " you need to supply the .script in the second argument"
echo " lisps include sbcl, clisp, allegro and allegromodern"
echo "OPTIONS:"
echo " -d -- debug mode"
echo " -u -h -- show this message."
}
unset DEBUG_ASDF_TEST
while getopts "duh" OPTION
......@@ -39,24 +50,16 @@ fi
sok=1
usage () {
echo "$0 [lisp invocation] [scripts-regex]"
echo " - read lisp forms one at a time from matching scripts"
echo " - quit with exit status 0 on getting eof"
echo " - quit with exit status >0 if an unhandled error occurs"
echo " you need to supply the .script in the second argument"
echo " lisps include sbcl, clisp, allegro and allegromodern"
echo "OPTIONS:"
echo " -d -- debug mode"
echo " -u -h -- show this message."
}
DO () { ( set -x ; "$@" ); }
do_tests() {
command=$1 eval=$2 fasl_ext=$3
rm -f *.$fasl_ext ~/.cache/common-lisp/"`pwd`"/*.$fasl_ext || true
( cd .. && $command $eval '(load "test/compile-asdf.lisp")' )
if [ $? -eq 0 ] ; then
echo "Compiled OK"
command="$1" eval="$2"
rm -f ~/.cache/common-lisp/"`pwd`"/* || true
( cd .. && DO $command $eval '(load "test/compile-asdf.lisp")' )
if [ $? -ne 0 ] ; then
echo "Compilation FAILED" >&2
else
echo "Compiled OK" >&2
test_count=0
test_pass=0
test_fail=0
......@@ -65,8 +68,8 @@ do_tests() {
do
echo "Testing: $i" >&2
test_count=`expr "$test_count" + 1`
rm -f *.$fasl_ext ~/.cache/common-lisp/"`pwd`"/*.$fasl_ext || true
if $command $eval "(load \"$i\")" ; then
rm -f ~/.cache/common-lisp/"`pwd`"/* || true
if DO $command $eval "(load \"$i\")" ; then
echo "Using $command, $i passed" >&2
test_pass=`expr "$test_pass" + 1`
else
......@@ -99,78 +102,81 @@ if [ -z $1 ] ; then
lisp="sbcl"
fi
command= flags= nodebug= eval=
case "$lisp" in
sbcl)
if type sbcl ; then
fasl_ext="fasl"
command="sbcl --noinform --userinit /dev/null --sysinit /dev/null"
nodebug="--disable-debugger"
eval="--eval"
fi ;;
command="${SBCL:-sbcl}"
flags="--noinform --userinit /dev/null --sysinit /dev/null"
nodebug="--disable-debugger"
eval="--eval" ;;
clisp)
if type clisp ; then
fasl_ext="fas"
command=`which clisp`
command="$command -norc -ansi -I "
nodebug="-on-error exit"
eval="-x"
fi ;;
command="${CLISP:-clisp}"
flags="-norc -ansi -I "
nodebug="-on-error exit"
eval="-x" ;;
allegro)
if type alisp ; then
fasl_ext="fasl"
command="alisp -q "
nodebug="-batch"
eval="-e"
fi ;;
command="${ALLEGRO:-alisp}"
flags="-q"
nodebug="-batch"
eval="-e" ;;
allegromodern)
if type mlisp ; then
fasl_ext="fasl"
command="mlisp -q"
nodebug="-batch"
eval="-e"
fi ;;
command="${ALLEGROMODERN:-mlisp}"
flags="-q"
nodebug="-batch"
eval="-e" ;;
ccl)
if type ccl ; then
case `uname -s` in
Linux) fasl_os=lx ;;
Darwin) fasl_os=dx ;;
esac
case `uname -m` in
x86_64|ppc64) fasl_bits=64 ;;
i?86|ppc) fasl_bits=32 ;;
esac
fasl_ext="${fasl_os}${fasl_bits}fsl"
command="ccl --no-init --quiet"
nodebug="--batch"
eval="--eval"
fi ;;
command="${CCL:-ccl}"
flags="--no-init --quiet"
nodebug="--batch"
eval="--eval" ;;
cmucl)
if type lisp ; then
fasl_ext="x86f"
command="lisp -noinit"
nodebug="-batch"
eval="-eval"
fi ;;
command="${CMUCL:-lisp}"
flags="-noinit"
nodebug="-batch"
eval="-eval" ;;
ecl)
if type ecl ; then
fasl_ext="fas"
command=`which ecl`
command="$command -norc"
eval="-eval"
fi ;;
command="${ECL:-ecl}"
flags="-norc"
eval="-eval" ;;
lispworks)
if type lispworks ; then
fasl_ext="ofasl"
command=`which ecl`
command="$command -siteinit - -init -"
eval="-eval"
fi ;;
command="${LISPWORKS:-lispworks}"
# If you have a licensed copy of lispworks,
# you can obtain the "lispworks" binary with, e.g.
# echo '(hcl:save-image "/lispworks" :environment nil)' > /tmp/build.lisp ;
# ./lispworks-6-0-0-x86-linux -siteinit - -init - -build /tmp/build.lisp
flags="-siteinit - -init -"
eval="-eval" ;;
gclcvs)
export GCL_ANSI=t
command="${GCL:-gclcvs}"
flags="-batch"
eval="-eval" ;;
abcl)
command="${ABCL:-abcl}"
flags="--noinit --noinform"
eval="--eval" ;;
*)
echo "Unsupported lisp: $1" >&2
echo "Please add support to run-tests.sh" >&2
exit 42 ;;
esac
if ! type "$command" ; then
echo "lisp implementation not found: $command" >&2
exit 43
fi
ASDFDIR="$(cd .. ; /bin/pwd)"
export CL_SOURCE_REGISTRY="${ASDFDIR}"
export ASDF_OUTPUT_TRANSLATIONS="(:output-translations (\"${ASDFDIR}\" (\"${ASDFDIR}/tmp/fasls\" :implementation)) :ignore-inherited-configuration)"
env | grep asdf
command="$command $flags"
if [ -z "${DEBUG_ASDF_TEST}" ] ; then
command="$command $nodebug"
fi
create_config () {
mkdir -p ../tmp/test-source-registry-conf.d ../tmp/test-asdf-output-translations-conf.d
}
......@@ -183,10 +189,9 @@ if [ -z "$command" ] ; then
echo "Error: cannot find or do not know how to run Lisp named $lisp"
else
create_config
mkdir -p results
echo $command
mkdir -p ../tmp/results
thedate=`date "+%Y-%m-%d"`
do_tests "$command" "$eval" "$fasl_ext" 2>&1 | \
tee "results/${lisp}.text" "results/${lisp}-${thedate}.save"
do_tests "$command" "$eval" 2>&1 | \
tee "../tmp/results/${lisp}.text" "../tmp/results/${lisp}-${thedate}.save"
clean_up
fi
(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.
(defparameter *test-directory*
(make-pathname :name nil :type nil :version nil
:defaults (or *load-truename* *compile-file-truename*)))
(defparameter *asdf-directory*
(merge-pathnames
(make-pathname :directory '(:relative :back) :defaults *test-directory*)
*test-directory*))
(defparameter *asdf-lisp*
(make-pathname :name "asdf" :type "lisp" :defaults *asdf-directory*))
(defparameter *asdf-fasl*
(compile-file-pathname
(let ((impl (string-downcase
(or #+allegro
(ecase excl:*current-case-mode*
(:case-sensitive-lower :mlisp)
(:case-insensitive-upper :alisp))
#+armedbear :abcl
#+clisp :clisp
#+clozure :ccl
#+cmu :cmucl
#+corman :cormanlisp
#+digitool :mcl
#+ecl :ecl
#+gcl :gcl
#+lispworks :lispworks
#+sbcl :sbcl
#+scl scl))))
(merge-pathnames
(make-pathname :directory `(:relative "tmp" "fasls" ,impl)
:defaults *asdf-directory*)
*asdf-lisp*))))
(defun load-asdf ()
(load *asdf-fasl*))
#+allegro
(setf excl:*warn-on-nested-reader-conditionals* nil)
......@@ -11,23 +44,28 @@
;; http://www.cliki.net/cl-launch
(defun leave-lisp (message return)
(when message
(format *error-output* message))
(format *error-output* message)
(terpri *error-output*))
(finish-output *error-output*)
(finish-output *standard-output*)
#+allegro
(excl:exit return)
#+clisp
(ext:quit return)
#+(or cmu scl)
(unix:unix-exit code)
(unix:unix-exit return)
#+ecl
(si:quit return)
#+gcl
(lisp:quit code)
(lisp:quit return)
#+lispworks
(lispworks:quit :status code :confirm nil :return nil :ignore-errors-p t)
(lispworks:quit :status return :confirm nil :return nil :ignore-errors-p t)
#+(or openmcl mcl)
(ccl::quit return)
#+sbcl
(sb-ext:quit :unix-status return)
#+abcl
(ext:quit :status return)
(error "Don't know how to quit Lisp; wanting to use exit code ~a" return))
......@@ -41,8 +79,15 @@ is bound, write a message and exit on an error. If
(handler-bind
((error (lambda (c)
(format *error-output* "~a" c)
(if (ignore-errors (funcall (find-symbol "GETENV" :asdf) "DEBUG_ASDF_TEST"))
(break)
(leave-lisp "~&Script failed~%" 1)))))
(cond
((ignore-errors (funcall (find-symbol "GETENV" :asdf) "DEBUG_ASDF_TEST"))
(break))
(t
(format *error-output* "ABORTING:~% ~S~%" c)
#+sbcl (sb-debug:backtrace 69)
#+clozure (ccl:print-call-history :count 69 :start-frame-number 1)
#+clisp (system::print-backtrace)
(format *error-output* "ABORTING:~% ~S~%" c)
(leave-lisp "~&Script failed~%" 1))))))
(funcall thunk)
(leave-lisp "~&Script succeeded~%" 0)))
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