Merge from vendor branch BINUTILS:
[dragonfly.git] / gnu / usr.bin / man / makewhatis / makewhatis.1
1 .\" Copyright (c) 1994-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/gnu/usr.bin/man/makewhatis/makewhatis.1,v 1.14.2.6 2001/08/16 10:14:57 ru Exp $
26 .\" $DragonFly: src/gnu/usr.bin/man/makewhatis/Attic/makewhatis.1,v 1.2 2003/06/17 04:25:46 dillon Exp $
27 .Dd January 12, 1995
28 .Dt MAKEWHATIS 1
29 .Os
30 .Sh NAME
31 .Nm makewhatis
32 .Nd create whatis database
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl a | Fl append
36 .Op Fl h | Fl help
37 .Op Fl i | Fl indent Ar column
38 .Op Fl L | Fl locale
39 .Op Fl n | Fl name Ar name
40 .Op Fl o | Fl outfile Ar file
41 .Op Fl v | Fl verbose
42 .Op Ar directories ...
43 .Sh DESCRIPTION 
44 .Nm
45 extracts the name and a short description from unformatted manpages
46 and creates the
47 .Xr whatis 1
48 database. 
49 .Nm
50 can read gzip'ed manpages.
51 .Ar Directory
52 names a directory containing manpage subdirectories
53 (named
54 .Pa man.+ ) .
55 Colons are treated as spaces, hence
56 .Ic makewhatis $MANPATH
57 or
58 .Ic makewhatis `manpath`
59 are allowed.
60 .Sh OPTIONS
61 .Bl -tag -width Ds
62 .It Fl a , Fl append
63 Append mode. Don't delete old entries in whatis database. Note: 
64 the new database will be sorted without repeated lines and
65 .Nm
66 does not check if old entries are valid.
67 .It Fl h , Fl help
68 Print options and exit.
69 .It Fl i , Fl indent Ar column
70 Justify description strings to
71 .Ar column
72 (default 24).
73 .It Fl L , Fl locale
74 Sense locale environment variables for possible localized man subdirectories
75 and process this entries only.
76 .It Fl n , Fl name Ar name
77 Use
78 .Ar name
79 instead of
80 .Pa whatis Ns .
81 .It Fl o , Fl outfile Ar file
82 Write all output to
83 .Ar file
84 instead of
85 .Pa dirname/whatis Ns .
86 .It Fl v , Fl verbose
87 Issue more warnings
88 (to stderr).
89 For every parsed man page write a single char:
90 .Ql .\&
91 for an uncompressed page,
92 .Ql *
93 for a compressed page, and
94 .Ql +
95 for a link.
96 .El
97 .Sh EXAMPLES
98 .Ic makewhatis $MANPATH
99 .Pp
100 Create whatis database for all directories in your
101 .Pa $MANPATH Ns .
102 .Pp
103 .Ic makewhatis -outfile /tmp/mywhatis /usr/local/man $HOME/man
104 .Pp
105 Create whatis database 
106 .Pa /tmp/mywhatis .
107 Traverse directories
108 .Pa /usr/local/man
109 and
110 .Pa $HOME/man Ns .
111 Don't create
112 .Pa /usr/local/man/whatis
113 or
114 .Pa $HOME/man/whatis Ns .
115 .Pp
116 .Ic makewhatis -name windex $HOME/man
117 .Pp
118 Create whatis database
119 .Pa windex
120 instead of
121 .Pa whatis Ns .
122 May be useful for Solaris.
123 .Sh FILES
124 .Bl -tag -width /etc/master.passwdxx -compact
125 .It Pa */man/whatis
126 whatis database
127 .It Pa /etc/periodic/weekly/320.whatis
128 run
129 .Nm makewhatis.local
130 every week
131 .El
132 .Sh SEE ALSO
133 .Xr apropos 1 ,
134 .Xr catman 1 ,
135 .Xr getNAME 1 ,
136 .Xr man 1 ,
137 .Xr manpath 1 ,
138 .Xr sort 1 ,
139 .Xr uniq 1 ,
140 .Xr whatis 1 ,
141 .Xr makewhatis.local 8
142 .Sh HISTORY
143 This
144 .Nm
145 command appeared in
146 .Fx 2.1 .
147 .Sh AUTHORS
148 .An Wolfram Schneider ,
149 Berlin.