193 lines
9.8 KiB
HTML
193 lines
9.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<!-- This manual describes ASDF, a system definition facility
|
|
for Common Lisp programs and libraries.
|
|
|
|
You can find the latest version of this manual at
|
|
https://common-lisp.net/project/asdf/asdf.html.
|
|
|
|
ASDF Copyright (C) 2001-2019 Daniel Barlow and contributors.
|
|
|
|
This manual Copyright (C) 2001-2019 Daniel Barlow and contributors.
|
|
|
|
This manual revised (C) 2009-2019 Robert P. Goldman and Francois-Rene Rideau.
|
|
|
|
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.
|
|
-->
|
|
<title>Operations (ASDF Manual)</title>
|
|
|
|
<meta name="description" content="Operations (ASDF Manual)">
|
|
<meta name="keywords" content="Operations (ASDF Manual)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
<link href="index.html" rel="start" title="Top">
|
|
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="The-object-model-of-ASDF.html" rel="up" title="The object model of ASDF">
|
|
<link href="Components.html" rel="next" title="Components">
|
|
<link href="The-object-model-of-ASDF.html" rel="prev" title="The object model of ASDF">
|
|
<style type="text/css">
|
|
<!--
|
|
a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
span:hover a.copiable-anchor {visibility: visible}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<div class="section" id="Operations">
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Components.html" accesskey="n" rel="next">Components</a>, Previous: <a href="The-object-model-of-ASDF.html" accesskey="p" rel="prev">The Object model of ASDF</a>, Up: <a href="The-object-model-of-ASDF.html" accesskey="u" rel="up">The Object model of ASDF</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<span id="Operations-1"></span><h3 class="section">7.1 Operations</h3>
|
|
<span id="index-operation"></span>
|
|
|
|
<p>An <em>operation</em> object of the appropriate type is instantiated
|
|
whenever the user wants to do something with a system like
|
|
</p>
|
|
<ul>
|
|
<li> compile all its files
|
|
</li><li> load the files into a running lisp environment
|
|
</li><li> copy its source files somewhere else
|
|
</li></ul>
|
|
|
|
<p>Operations can be invoked directly, or examined
|
|
to see what their effects would be without performing them.
|
|
There are a bunch of methods specialised on operation and component type
|
|
that actually do the grunt work.
|
|
Operations are invoked on systems via <code>operate</code> (see <a href="Operations.html#operate">operate</a>).
|
|
</p>
|
|
<p>ASDF contains a number of pre-defined <tt>operation</tt> classes for common,
|
|
and even fairly uncommon tasks that you might want to do with it.
|
|
In addition, ASDF contains “abstract” <tt>operation</tt> classes that
|
|
programmers can use as building blocks to define ASDF extensions. We
|
|
discuss these in turn below.
|
|
</p>
|
|
|
|
|
|
<p>Operations are invoked on systems via <code>operate</code>.
|
|
<span id="operate"></span></p><dl class="def">
|
|
<dt id="index-operate-1"><span class="category">Generic function: </span><span><strong>operate</strong> <em><var>operation</var> <var>component</var> &rest <var>initargs</var> &key <code>force</code> <code>force-not</code> <code>verbose</code> &allow-other-keys</em><a href='Operations.html#index-operate-1' class='copiable-anchor'> ¶</a></span></dt>
|
|
<dt id="index-oos-1"><span class="category">Generic function: </span><span><strong>oos</strong> <em><var>operation</var> <var>component</var> &rest <var>initargs</var> &key &allow-other-keys</em><a href='Operations.html#index-oos-1' class='copiable-anchor'> ¶</a></span></dt>
|
|
<dd><p><code>operate</code> invokes <var>operation</var> on <var>system</var>.
|
|
<code>oos</code> is a synonym for <code>operate</code> (it stands for operate-on-system).
|
|
</p>
|
|
<p><var>operation</var> is an operation designator:
|
|
it can be an operation object itself, or, typically,
|
|
a symbol that is passed to <code>make-operation</code> (which will call <code>make-instance</code>),
|
|
to create the operation object.
|
|
<var>component</var> is a component designator:
|
|
it can be a component object itself, or, typically,
|
|
a string or symbol (to be <code>string-downcase</code>d) that names a system,
|
|
more rarely a list of strings or symbols that designate a subcomponent of a system.
|
|
</p>
|
|
<p>The ability to pass <var>initargs</var> to <code>make-operation</code> is now deprecated, and will be removed.
|
|
For more details, see <a href="Operations.html#make_002doperation">make-operation</a>.
|
|
Note that dependencies may cause the operation
|
|
to invoke other operations on the system or its components:
|
|
the new operations may or may not be created
|
|
with the same <var>initargs</var> as the original one (for the moment).
|
|
</p>
|
|
<p>If <var>force</var> is <code>:all</code>, then all systems
|
|
are forced to be recompiled even if not modified since last compilation.
|
|
If <var>force</var> is <code>t</code>, then only the system being loaded
|
|
is forced to be recompiled even if not modified since last compilation,
|
|
but other systems are not affected.
|
|
If <var>force</var> is a list, then it specifies a list of systems that
|
|
are forced to be recompiled even if not modified since last compilation.
|
|
If <var>force-not</var> is <code>:all</code>, then all systems
|
|
are forced not to be recompiled even if modified since last compilation.
|
|
If <var>force-not</var> is <code>t</code>, then all systems but the system being loaded
|
|
are forced not to be recompiled even if modified since last compilation
|
|
(note: this was changed in ASDF 3.1.2).
|
|
If <var>force-not</var> is a list, then it specifies a list of systems that
|
|
are forced not to be recompiled even if modified since last compilation.
|
|
</p>
|
|
<span id="index-register_002dimmutable_002dsystem"></span>
|
|
<span id="index-immutable-systems"></span>
|
|
<p>Both <var>force</var> and <var>force-not</var> apply to systems that are dependencies and were already compiled.
|
|
<var>force-not</var> takes precedences over <var>force</var>,
|
|
as it should, really, but unhappily only since ASDF 3.1.2.
|
|
Moreover, systems which have been registered as immutable by <code>register-immutable-system</code> (since ASDF 3.1.5)
|
|
are always considered <var>forced-not</var>, and even their <samp>.asd</samp> are not refreshed from the filesystem.
|
|
See <a href="Miscellaneous-Functions.html">Miscellaneous Functions</a>.
|
|
</p>
|
|
<span id="index-traverse"></span>
|
|
<p>To see what <code>operate</code> would do, you can use:
|
|
</p><div class="example">
|
|
<pre class="example">(asdf:traverse operation-class system-name)
|
|
</pre></div>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="def">
|
|
<dt id="index-make_002doperation"><span class="category">Function: </span><span><strong>make-operation</strong> <em><var>operation-class</var> &rest <var>initargs</var></em><a href='Operations.html#index-make_002doperation' class='copiable-anchor'> ¶</a></span></dt>
|
|
<dd><span id="make_002doperation"></span>
|
|
<p>The <var>initargs</var> are passed to <code>make-instance</code> call
|
|
when creating the operation object.
|
|
</p>
|
|
<p><strong>Note:</strong><var>initargs</var> for <code>operation</code>s are now deprecated,
|
|
and will be removed from ASDF in the near future.
|
|
</p>
|
|
<p><strong>Note:</strong> <code>operation</code> instances must <strong>never</strong> be created
|
|
using <code>make-instance</code> directly: only through
|
|
<code>make-operation</code>. Attempts to directly make <code>operation</code>
|
|
instances will cause a run-time error.
|
|
</p></dd></dl>
|
|
|
|
|
|
<ul class="section-toc">
|
|
<li><a href="Predefined-operations-of-ASDF.html" accesskey="1">Predefined operations of ASDF</a></li>
|
|
<li><a href="Creating-new-operations.html" accesskey="2">Creating new operations</a></li>
|
|
</ul>
|
|
</div>
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Components.html">Components</a>, Previous: <a href="The-object-model-of-ASDF.html">The Object model of ASDF</a>, Up: <a href="The-object-model-of-ASDF.html">The Object model of ASDF</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|