Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 723830890bac44da3d113209b14e090b > files > 252

sbcl-1.0.31-1mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>Using asdf to load systems - asdf Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="asdf Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="index.html#Top" title="Top">
<link rel="next" href="Defining-systems-with-defsystem.html#Defining-systems-with-defsystem" title="Defining systems with defsystem">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes asdf, a system definition facility for Common
Lisp programs and libraries.

asdf Copyright (C) 2001-2004 Daniel Barlow and contributors

This manual Copyright (C) 2001-2004 Daniel Barlow and
contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Using-asdf-to-load-systems"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Defining-systems-with-defsystem.html#Defining-systems-with-defsystem">Defining systems with defsystem</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>

<!-- node-name,  next,  previous,  up -->
<h2 class="chapter">1 Using asdf to load systems</h2>

<p><a name="index-system-directory-designator-1"></a><a name="index-g_t_002acentral_002dregistry_002a-2"></a>
This chapter describes how to use asdf to compile and load ready-made
Lisp programs and libraries.

<h3 class="section">1.1 Downloading asdf</h3>

<p>Some Lisp implementations (such as SBCL and OpenMCL) come with asdf
included already, so you don't need to download it separately. 
Consult your Lisp system's documentation.  If you need to download
asdf and install it by hand, the canonical source is the cCLan CVS
repository at
<a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/</a>.

<h3 class="section">1.2 Setting up asdf</h3>

<p>The single file <samp><span class="file">asdf.lisp</span></samp> is all you need to use asdf normally. 
Once you load it in a running Lisp, you're ready to use asdf.  For
maximum convenience you might want to have asdf loaded whenever you
start your Lisp implementation, for example by loading it from the
startup script or dumping a custom core &ndash; check your Lisp
implementation's manual for details.

   <p>The variable <code>asdf:*central-registry*</code> is a list of &ldquo;system
directory designators&rdquo;<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>.  A <dfn>system directory designator</dfn> is a form which
will be evaluated whenever a system is to be found, and must evaluate
to a directory to look in.  You might want to set or augment
<code>*central-registry*</code> in your Lisp init file, for example:

<pre class="lisp">     (setf asdf:*central-registry*
       (list* '*default-pathname-defaults*
              #p"/home/me/cl/systems/"
              #p"/usr/share/common-lisp/systems/"
              asdf:*central-registry*))
</pre>
   <h3 class="section">1.3 Setting up a system to be loaded</h3>

<p>To compile and load a system, you need to ensure that a symbolic link to its
system definition is in one of the directories in
<code>*central-registry*</code><a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a>.

   <p>For example, if <code>#p"/home/me/cl/systems/"</code> (note the trailing
slash) is a member of <code>*central-registry*</code>, you would set up a
system <var>foo</var> that is stored in a directory
<samp><span class="file">/home/me/src/foo/</span></samp> for loading with asdf with the following
commands at the shell (this has to be done only once):

<pre class="example">     $ cd /home/me/cl/systems/
     $ ln -s ~/src/foo/foo.asd .
</pre>
   <h3 class="section">1.4 Loading a system</h3>

<p>The system <var>foo</var> is loaded (and compiled, if necessary) by
evaluating the following form in your Lisp implementation:

<pre class="example">     (asdf:operate 'asdf:load-op '<var>foo</var>)
</pre>
   <p>That's all you need to know to use asdf to load systems written by
others.  The rest of this manual deals with writing system
definitions for Lisp software you write yourself.

   <div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> When we say &ldquo;directory&rdquo; here, we
mean &ldquo;designator for a pathname with a supplied DIRECTORY
component&rdquo;.</p>

   <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> It is possible to customize the
system definition file search.  That's considered advanced use, and
covered later: search forward for
<code>*system-definition-search-functions*</code>.  See <a href="Defining-systems-with-defsystem.html#Defining-systems-with-defsystem">Defining systems with defsystem</a>.</p>

   <hr></div>

   </body></html>