Merge branch 'vendor/GCC50'
[dragonfly.git] / sbin / rcorder / rcorder.8
1 .\"     $NetBSD: rcorder.8,v 1.3 2000/07/17 14:16:22 mrg Exp $
2 .\"
3 .\" Copyright (c) 1998
4 .\"     Perry E. Metzger.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\"    must display the following acknowledgment:
16 .\"     This product includes software developed for the NetBSD Project
17 .\"     by Perry E. Metzger.
18 .\" 4. The name of the author may not be used to endorse or promote products
19 .\"    derived from this software without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 .\"
32 .\" $FreeBSD: src/sbin/rcorder/rcorder.8,v 1.3 2002/11/25 16:23:03 ru Exp $
33 .\"
34 .Dd July 28, 2007
35 .Dt RCORDER 8
36 .Os
37 .Sh NAME
38 .Nm rcorder
39 .Nd print a dependency ordering of interdependent files
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl k Ar keep
43 .Op Fl s Ar skip
44 .Op Fl o Ar keyword
45 .Op Fl p
46 .Ar
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility is designed to print out a dependency ordering of a set of
51 interdependent files.
52 Typically it is used to find an execution
53 sequence for a set of shell scripts in which certain files must be
54 executed before others.
55 .Pp
56 Each file passed to
57 .Nm
58 must be annotated with special lines (which look like comments to the
59 shell) which indicate the dependencies the files have upon certain
60 points in the sequence, known as
61 .Dq conditions ,
62 and which indicate, for each file, which
63 .Dq conditions
64 may be expected to be filled by that file.
65 .Pp
66 Within each file, a block containing a series of
67 .Dq Li REQUIRE ,
68 .Dq Li PROVIDE ,
69 .Dq Li BEFORE
70 and
71 .Dq Li KEYWORD
72 lines must appear.
73 The format of the lines is rigid.
74 Each line must begin with a single
75 .Ql # ,
76 followed by a single space, followed by
77 .Dq Li PROVIDE: ,
78 .Dq Li REQUIRE: ,
79 .Dq Li BEFORE: ,
80 or
81 .Dq Li KEYWORD: .
82 No deviation is permitted.
83 Each dependency line is then followed by a series of conditions,
84 separated by whitespace.
85 Multiple
86 .Dq Li PROVIDE ,
87 .Dq Li REQUIRE ,
88 .Dq Li BEFORE
89 and
90 .Dq Li KEYWORD
91 lines may appear, but all such lines must appear in a sequence without
92 any intervening lines, as once a line that does not follow the format
93 is reached, parsing stops.
94 .Pp
95 The options are as follows:
96 .Bl -tag -width indent
97 .It Fl k
98 Add the specified keyword to the
99 .Dq "keep list" .
100 If any
101 .Fl k
102 option is given, only those files containing the matching keyword are listed.
103 .It Fl s
104 Add the specified keyword to the
105 .Dq "skip list" .
106 If any
107 .Fl s
108 option is given, files containing the matching keyword are not listed.
109 .It Fl o
110 Generate the dependency list required to activate the specified
111 .Ar keyword ,
112 including the file providing
113 .Ar keyword .
114 If several
115 .Fl o
116 options are specified, the results are merged.
117 .It Fl p
118 Output the list of provided keywords for the specified files.
119 .El
120 .Pp
121  An example block follows:
122 .Bd -literal -offset indent
123 # REQUIRE: networking syslog
124 # REQUIRE: usr
125 # PROVIDE: dns nscd
126 .Ed
127 .Pp
128 This block states that the file in which it appears depends upon the
129 .Dq Li networking ,
130 .Dq Li syslog ,
131 and
132 .Dq Li usr
133 conditions, and provides the
134 .Dq Li dns
135 and
136 .Dq Li nscd
137 conditions.
138 .Pp
139 A file may contain zero
140 .Dq Li PROVIDE
141 lines, in which case it provides no conditions, and may contain zero
142 .Dq Li REQUIRE
143 lines, in which case it has no dependencies.
144 There must be at least one file with no dependencies in the set of
145 arguments passed to
146 .Nm
147 in order for it to find a starting place in the dependency ordering.
148 .Sh DIAGNOSTICS
149 The
150 .Nm
151 utility may print one of the following error messages and exit with a non-zero
152 status if it encounters an error while processing the file list.
153 .Bl -diag
154 .It "Requirement %s has no providers, aborting."
155 No file has a
156 .Dq Li PROVIDE
157 line corresponding to a condition present in a
158 .Dq Li REQUIRE
159 line in another file.
160 .It "Circular dependency on provision %s, aborting."
161 A set of files has a circular dependency which was detected while
162 processing the stated condition.
163 .It "Circular dependency on file %s, aborting."
164 A set of files has a circular dependency which was detected while
165 processing the stated file.
166 .El
167 .Sh SEE ALSO
168 .Xr rc 8
169 .Sh HISTORY
170 The
171 .Nm
172 utility first appeared in
173 .Nx 1.5 .
174 .Sh AUTHORS
175 .An -nosplit
176 Written by
177 .An Perry E. Metzger Aq Mt perry@piermont.com
178 and
179 .An Matthew R. Green Aq Mt mrg@eterna.com.au .