This file is indexed.

/usr/share/doc/cl-asdf/asdf/The-defsystem-grammar.html is in cl-asdf 2:3.1.7-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- 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-2015 Daniel Barlow and contributors.

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

This manual revised (C) 2009-2015 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.
 -->
<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>ASDF Manual: The defsystem grammar</title>

<meta name="description" content="ASDF Manual: The defsystem grammar">
<meta name="keywords" content="ASDF Manual: The defsystem grammar">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Defining-systems-with-defsystem.html#Defining-systems-with-defsystem" rel="up" title="Defining systems with defsystem">
<link href="Other-code-in-_002easd-files.html#Other-code-in-_002easd-files" rel="next" title="Other code in .asd files">
<link href="A-more-involved-example.html#A-more-involved-example" rel="prev" title="A more involved example">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {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}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="The-defsystem-grammar"></a>
<div class="header">
<p>
Next: <a href="Other-code-in-_002easd-files.html#Other-code-in-_002easd-files" accesskey="n" rel="next">Other code in .asd files</a>, Previous: <a href="A-more-involved-example.html#A-more-involved-example" accesskey="p" rel="prev">A more involved example</a>, Up: <a href="Defining-systems-with-defsystem.html#Defining-systems-with-defsystem" accesskey="u" rel="up">Defining systems with defsystem</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="The-defsystem-grammar-1"></a>
<h3 class="section">6.3 The defsystem grammar</h3>
<a name="index-defsystem-2"></a>
<a name="index-DEFSYSTEM-grammar"></a>



<div class="example">
<pre class="example">system-definition := ( defsystem system-designator <var>system-option</var>* )

system-option := :defsystem-depends-on system-list
                 | :weakly-depends-on <var>system-list</var>
                 | :class class-name (see discussion below)
                 | :build-operation <var>operation-name</var>
                 | system-option
                 | module-option
                 | option

# These are only available since ASDF 3 (actually its alpha release 2.27)
system-option := :homepage string
                 | :bug-tracker string
                 | :mailto string
                 | :long-name string
                 | :source-control source-control
                 | :version version-specifier

source-control := (keyword string)

module-option := :components component-list
                 | :serial [ t | nil ]

option :=
        | :pathname pathname-specifier
        | :default-component-class class-name
        | :perform method-form
        | :explain method-form
        | :output-files method-form
        | :operation-done-p method-form
        | :if-feature feature-expression
        | :depends-on ( <var>dependency-def</var>* )
        | :in-order-to ( <var>dependency</var>+ )


system-list := ( <var>simple-component-name</var>* )

component-list := ( <var>component-def</var>* )

component-def  := ( component-type simple-component-name <var>option</var>* )

component-type := :module | :file | :static-file | other-component-type

other-component-type := symbol-by-name
                        (see <a href="#The-defsystem-grammar">Component types</a>)

# This is used in :depends-on, as opposed to ``dependency,''
# which is used in :in-order-to
dependency-def := simple-component-name
               | ( :feature <var>feature-expression</var> dependency-def )
               | ( :version simple-component-name version-specifier )
               | ( :require module-name )

# ``dependency'' is used in :in-order-to, as opposed to
# ``dependency-def''
dependency := (dependent-op <var>requirement</var>+)
requirement := (required-op <var>required-component</var>+)
dependent-op := operation-name
required-op := operation-name

simple-component-name := string
                      |  symbol

pathname-specifier := pathname | string | symbol

method-form := (operation-name qual lambda-list &amp;rest body)
qual := method qualifier?

component-dep-fail-option := :fail | :try-next | :ignore

feature-expression := keyword
                      | (:and <var>feature-expression</var>*)
                      | (:or <var>feature-expression</var>*)
                      | (:not <var>feature-expression</var>)
</pre></div>


<a name="Component-names"></a>
<h4 class="subsection">6.3.1 Component names</h4>

<p>Component names (<code>simple-component-name</code>)
may be either strings or symbols.
</p>
<a name="Component-types"></a>
<h4 class="subsection">6.3.2 Component types</h4>

<p>Component type names, even if expressed as keywords, will be looked up
by name in the current package and in the asdf package, if not found in
the current package.  So a component type <code>my-component-type</code>, in
the current package <code>my-system-asd</code> can be specified as
<code>:my-component-type</code>, or <code>my-component-type</code>.
</p>
<p><code>system</code> and its subclasses are <em>not</em>
allowed as component types for such children components.
</p>
<a name="System-class-names"></a>
<h4 class="subsection">6.3.3 System class names</h4>

<p>A system class name will be looked up
in the same way as a Component type (see above),
except that only <code>system</code> and its subclasses are allowed.
Typically, one will not need to specify a system
class name, unless using a non-standard system class defined in some
ASDF extension, typically loaded through <code>DEFSYSTEM-DEPENDS-ON</code>,
see below.  For such class names in the ASDF package, we recommend that
the <code>:class</code> option be specified using a keyword symbol, such as
</p>
<div class="example">
<pre class="example">:class :MY-NEW-SYSTEM-SUBCLASS
</pre></div>

<p>This practice will ensure that package name conflicts are avoided.
Otherwise, the symbol <code>MY-NEW-SYSTEM-SUBCLASS</code> will be read into
the current package <em>before</em> it has been exported from the ASDF
extension loaded by <code>:defsystem-depends-on</code>, causing a name
conflict in the current package.
</p>
<a name="Defsystem-depends-on"></a>
<h4 class="subsection">6.3.4 Defsystem depends on</h4>
<a name="index-_003adefsystem_002ddepends_002don"></a>

<p>The <code>:defsystem-depends-on</code> option to <code>defsystem</code> allows the
programmer to specify another ASDF-defined system or set of systems that
must be loaded <em>before</em> the system definition is processed.
Typically this is used to load an ASDF extension that is used in the
system definition.
</p>
<a name="Build_002doperation"></a>
<h4 class="subsection">6.3.5 Build-operation</h4>
<a name="index-_003abuild_002doperation"></a>

<p>The <code>:build-operation</code> option to <code>defsystem</code> allows the
programmer to specify an operation that will be applied, in place of
<code>load-op</code> when <code>make</code> (see <a href="Convenience-Functions.html#Convenience-Functions">make</a>)
is run on the system.    The option
value should be the name of an operation.  E.g., <code>:build-operation doc-op</code>
</p>
<p>This feature is
experimental and largely untested.  Use at your own risk.
</p>
<a name="Weakly-depends-on"></a>
<h4 class="subsection">6.3.6 Weakly depends on</h4>
<a name="index-_003aweakly_002ddepends_002don"></a>

<p>We do <em>NOT</em> recommend you use this feature.
If you are tempted to write a system <var>foo</var>
that weakly-depends-on a system <var>bar</var>,
we recommend that you should instead
write system <var>foo</var> in a parametric way,
and offer some special variable and/or some hook to specialize its behaviour;
then you should write a system <var>foo+bar</var>
that does the hooking of things together.
</p>
<p>The (deprecated) <code>:weakly-depends-on</code> option to <code>defsystem</code>
allows the programmer to specify another ASDF-defined system or set of systems
that ASDF should <em>try</em> to load,
but need not load in order to be successful.
Typically this is used if there are a number of systems
that, if present, could provide additional functionality,
but which are not necessary for basic function.
</p>
<p>Currently, although it is specified to be an option only to <code>defsystem</code>,
this option is accepted at any component, but it probably
only makes sense at the <code>defsystem</code> level.
Programmers are cautioned not
to use this component option except at the <code>defsystem</code> level, as
this anomalous behaviour may be removed without warning.
</p>


<a name="Pathname-specifiers"></a>
<h4 class="subsection">6.3.7 Pathname specifiers</h4>
<a name="index-pathname-specifiers"></a>

<p>A pathname specifier (<code>pathname-specifier</code>)
may be a pathname, a string or a symbol.
When no pathname specifier is given for a component,
which is the usual case, the component name itself is used.
</p>
<p>If a string is given, which is the usual case,
the string will be interpreted as a Unix-style pathname
where <code>/</code> characters will be interpreted as directory separators.
Usually, Unix-style relative pathnames are used
(i.e. not starting with <code>/</code>, as opposed to absolute pathnames);
they are relative to the path of the parent component.
Finally, depending on the <code>component-type</code>,
the pathname may be interpreted as either a file or a directory,
and if it&rsquo;s a file,
a file type may be added corresponding to the <code>component-type</code>,
or else it will be extracted from the string itself (if applicable).
</p>
<p>For instance, the <code>component-type</code> <code>:module</code>
wants a directory pathname, and so a string <code>&quot;foo/bar&quot;</code>
will be interpreted as the pathname <samp>#p&quot;foo/bar/&quot;</samp>.
On the other hand, the <code>component-type</code> <code>:file</code>
wants a file of type <code>lisp</code>, and so a string <code>&quot;foo/bar&quot;</code>
will be interpreted as the pathname <samp>#p&quot;foo/bar.lisp&quot;</samp>,
and a string <code>&quot;foo/bar.quux&quot;</code>
will be interpreted as the pathname <samp>#p&quot;foo/bar.quux.lisp&quot;</samp>.
Finally, the <code>component-type</code> <code>:static-file</code>
wants a file without specifying a type, and so a string <code>&quot;foo/bar&quot;</code>
will be interpreted as the pathname <samp>#p&quot;foo/bar&quot;</samp>,
and a string <code>&quot;foo/bar.quux&quot;</code>
will be interpreted as the pathname <samp>#p&quot;foo/bar.quux&quot;</samp>.
</p>
<p>ASDF interprets the string <code>&quot;..&quot;</code>
as the pathname directory component word <code>:back</code>,
which when merged, goes back one level in the directory hierarchy.
</p>
<p>If a symbol is given, it will be translated into a string,
and downcased in the process.
The downcasing of symbols is unconventional,
but was selected after some consideration.
Observations suggest that the type of systems we want to support
either have lowercase as customary case (Unix, Mac, windows)
or silently convert lowercase to uppercase (lpns),
so this makes more sense than attempting to use <code>:case :common</code>
as argument to <code>make-pathname</code>,
which is reported not to work on some implementations.
</p>
<p>Pathname objects may be given to override the path for a component.
Such objects are typically specified using reader macros such as <code>#p</code>
or <code>#.(make-pathname ...)</code>.
Note however, that <code>#p...</code> is
a shorthand for <code>#.(parse-namestring ...)</code>
and that the behaviour of <code>parse-namestring</code> is completely non-portable,
unless you are using Common Lisp <code>logical-pathname</code>s,
which themselves involve other non-portable behaviour
(see <a href="#The-defsystem-grammar">Using logical pathnames</a>, below).
Pathnames made with <code>#.(make-pathname ...)</code>
can usually be done more easily with the string syntax above.
The only case that you really need a pathname object is to override
the component-type default file type for a given component.
Therefore, pathname objects should only rarely be used.
Unhappily, ASDF 1 used not to properly support
parsing component names as strings specifying paths with directories,
and the cumbersome <code>#.(make-pathname ...)</code> syntax had to be used.
An alternative to <code>#.</code> read-time evaluation is to use
<code>(eval `(defsystem ... ,pathname ...))</code>.
</p>
<p>Note that when specifying pathname objects,
ASDF does not do any special interpretation of the pathname
influenced by the component type, unlike the procedure for
pathname-specifying strings.
On the one hand, you have to be careful to provide a pathname that correctly
fulfills whatever constraints are required from that component type
(e.g. naming a directory or a file with appropriate type);
on the other hand, you can circumvent the file type that would otherwise
be forced upon you if you were specifying a string.
</p>
<a name="Version-specifiers"></a>
<h4 class="subsection">6.3.8 Version specifiers</h4>
<a name="index-version-specifiers"></a>
<a name="index-_003aversion-1"></a>

<p>Version specifiers are strings to be parsed as period-separated lists of integers.
I.e., in the example, <code>&quot;0.2.1&quot;</code> is to be interpreted,
roughly speaking, as <code>(0 2 1)</code>.
In particular, version <code>&quot;0.2.1&quot;</code> is interpreted the same as <code>&quot;0.0002.1&quot;</code>,
though the latter is not canonical and may lead to a warning being issued.
Also, <code>&quot;1.3&quot;</code> and <code>&quot;1.4&quot;</code> are both strictly <code>uiop:version&lt;</code> to <code>&quot;1.30&quot;</code>,
quite unlike what would have happened
had the version strings been interpreted as decimal fractions.
</p>
<p>Instead of a string representing the version,
the <code>:version</code> argument can be an expression that is resolved to
such a string using the following trivial domain-specific language:
in addition to being a literal string, it can be an expression of the form
<code>(:read-file-form &lt;pathname-or-string&gt; :at &lt;access-at-specifier&gt;)</code>,
which will be resolved by reading a form in the specified pathname
(read as a subpathname of the current system if relative or a unix-namestring).
You may use a <code>uiop:access-at</code> specifier
with the (optional) <code>:at</code> keyword,
by default the specifier is <code>0</code>, meaning the first form is returned;
subforms can also be specified, with e.g. <code>(1 2 2)</code> specifying
&ldquo;the third subform (index 2) of the third subform (index 2) of the second form (index 1)&rdquo;
in the file (mind the off-by-one error in the English language).
</p>
<p>System definers are encouraged to use version identifiers of the form
<var>x</var>.<var>y</var>.<var>z</var> for
major version, minor version and patch level,
where significant API incompatibilities are signaled by an increased major number.
</p>
<p>See <a href="Common-attributes-of-components.html#Common-attributes-of-components">Common attributes of components</a>.
</p>
<a name="Require"></a>
<h4 class="subsection">6.3.9 Require</h4>
<a name="index-_003arequire-dependencies"></a>

<p>Use the implementation&rsquo;s own <code>require</code> to load the <var>module-name</var>.
</p>
<p>It is good taste to use <code>:if-feature <em>:implementation-name</em></code>
rather than <code>#+<em>implementation-name</em></code>
to only depend on the specified module on the specific implementation that provides it.
See <a href="#if_002dfeature_002doption">if-feature-option</a>.
</p>

<a name="Using-logical-pathnames"></a>
<h4 class="subsection">6.3.10 Using logical pathnames</h4>
<a name="index-logical-pathnames"></a>

<p>We do not generally recommend the use of logical pathnames,
especially not so to newcomers to Common Lisp.
However, we do support the use of logical pathnames by old timers,
when such is their preference.
</p>
<p>To use logical pathnames,
you will have to provide a pathname object as a <code>:pathname</code> specifier
to components that use it, using such syntax as
<code>#p&quot;LOGICAL-HOST:absolute;path;to;component.lisp&quot;</code>.
</p>
<p>You only have to specify such logical pathname
for your system or some top-level component.
Sub-components&rsquo; relative pathnames,
specified using the string syntax for names,
will be properly merged with the pathnames of their parents.
The specification of a logical pathname host however is <em>not</em>
otherwise directly supported in the ASDF syntax
for pathname specifiers as strings.
</p>
<p>The <code>asdf-output-translation</code> layer will
avoid trying to resolve and translate logical pathnames.
The advantage of this is that
you can define yourself what translations you want to use
with the logical pathname facility.
The disadvantage is that if you do not define such translations,
any system that uses logical pathnames will behave differently under
asdf-output-translations than other systems you use.
</p>
<p>If you wish to use logical pathnames you will have to configure the
translations yourself before they may be used.
ASDF currently provides no specific support
for defining logical pathname translations.
</p>
<p>Note that the reasons we do not recommend logical pathnames are that
(1) there is no portable way to set up logical pathnames <em>before</em> they are used,
(2) logical pathnames are limited to only portably use
a single character case, digits and hyphens.
While you can solve the first issue on your own,
describing how to do it on each of fifteen implementations supported by ASDF
is more than we can document.
As for the second issue, mind that the limitation is notably enforced on SBCL,
and that you therefore can&rsquo;t portably violate the limitations
but must instead define some encoding of your own and add individual mappings
to name physical pathnames that do not fit the restrictions.
This can notably be a problem when your Lisp files are part of a larger project
in which it is common to name files or directories in a way that
includes the version numbers of supported protocols,
or in which files are shared with software written
in different programming languages where conventions include the use of
underscores, dots or CamelCase in pathnames.
</p>

<a name="Serial-dependencies"></a>
<h4 class="subsection">6.3.11 Serial dependencies</h4>
<a name="index-serial-dependencies"></a>

<p>If the <code>:serial t</code> option is specified for a module,
ASDF will add dependencies for each child component,
on all the children textually preceding it.
This is done as if by <code>:depends-on</code>.
</p>
<div class="lisp">
<pre class="lisp">:serial t
:components ((:file &quot;a&quot;) (:file &quot;b&quot;) (:file &quot;c&quot;))
</pre></div>

<p>is equivalent to
</p>
<div class="lisp">
<pre class="lisp">:components ((:file &quot;a&quot;)
             (:file &quot;b&quot; :depends-on (&quot;a&quot;))
             (:file &quot;c&quot; :depends-on (&quot;a&quot; &quot;b&quot;)))
</pre></div>


<a name="Source-location-_0028_003apathname_0029"></a>
<h4 class="subsection">6.3.12 Source location (<code>:pathname</code>)</h4>

<p>The <code>:pathname</code> option is optional in all cases for systems
defined via <code>defsystem</code>, and generally is unnecessary.  In the
simple case, source files will be found in the same directory as the
system or, in the case of modules, in a subdirectory with the same name
as the module.
</p>

<p>More specifically, ASDF follows a hairy set of rules that are designed so that
</p><ol>
<li> <code>find-system</code>
will load a system from disk
and have its pathname default to the right place.

</li><li> This pathname information will not be overwritten with
<code>*default-pathname-defaults*</code>
(which could be somewhere else altogether)
if the user loads up the <samp>.asd</samp> file into his editor
and interactively re-evaluates that form.
</li></ol>

<p>If a system is being loaded for the first time,
its top-level pathname will be set to:
</p>
<ul>
<li> The host/device/directory parts of <code>*load-truename*</code>,
if it is bound.
</li><li> <code>*default-pathname-defaults*</code>, otherwise.
</li></ul>

<p>If a system is being redefined, the top-level pathname will be
</p>
<ul>
<li> changed, if explicitly supplied or obtained from <code>*load-truename*</code>
(so that an updated source location is reflected in the system definition)

</li><li> changed if it had previously been set from <code>*default-pathname-defaults*</code>

</li><li> left as before, if it had previously been set from <code>*load-truename*</code>
and <code>*load-truename*</code> is currently unbound
(so that a developer can evaluate a <code>defsystem</code> form
from within an editor without clobbering its source location)
</li></ul>

<a name="if_002dfeature-option"></a>
<h4 class="subsection">6.3.13 if-feature option</h4>
<a name="index-_003aif_002dfeature-component-option"></a>
<a name="if_002dfeature_002doption"></a>
<p>This option allows you to specify a feature expression to be evaluated
as if by <code>#+</code> to conditionally include a component in your build.
If the expression is false, the component is dropped
as well as any dependency pointing to it.
As compared to using <code>#+</code> which is expanded at read-time,
this allows you to have an object in your component hierarchy
that can be used for manipulations beside building your project, and
that is accessible to outside code that wishes to reason about system
structure.
</p>
<p>Programmers should be careful to consider <strong>when</strong> the
<code>:if-feature</code> is evaluated.  Recall that ASDF first computes a
build plan, and then executes that plan.  ASDF will check to see whether
or not a feature is present <strong>at planning time</strong>, not during the
build.  It follows that one cannot use <code>:if-feature</code> to check
features that are set during the course of the build.  It can only be
used to check the state of features before any build operations have
been performed.
</p>
<p>This option was added in ASDF 3.  For more information,
See <a href="Common-attributes-of-components.html#required_002dfeatures">Required features</a>.
</p>
<a name="if_002dcomponent_002ddep_002dfails-option"></a>
<h4 class="subsection">6.3.14 if-component-dep-fails option</h4>
<a name="index-_003aif_002dcomponent_002ddep_002dfails-component-option"></a>
<p>This option was removed in ASDF 3.
Its semantics was limited in purpose and dubious to explain,
and its implementation was breaking a hole into the ASDF object model.
Please use the <code>if-feature</code> option instead.
</p>
<a name="feature-requirement"></a>
<h4 class="subsection">6.3.15 feature requirement</h4>
<p>This requirement was removed in ASDF 3.1.  Please do not use it.  In
most cases, <code>:if-feature</code> (see <a href="#if_002dfeature_002doption">if-feature-option</a>) will provide
an adequate substitute.
</p>
<p>The <code>feature</code> requirement used to ensure that a chain of component
dependencies would fail when a key feature was absent.
Used in conjunction with <code>:if-component-dep-fails</code>
this provided
a roundabout way to express conditional compilation.
</p>

<hr>
<div class="header">
<p>
Next: <a href="Other-code-in-_002easd-files.html#Other-code-in-_002easd-files" accesskey="n" rel="next">Other code in .asd files</a>, Previous: <a href="A-more-involved-example.html#A-more-involved-example" accesskey="p" rel="prev">A more involved example</a>, Up: <a href="Defining-systems-with-defsystem.html#Defining-systems-with-defsystem" accesskey="u" rel="up">Defining systems with defsystem</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>