1.\"	$OpenBSD: makewhatis.8,v 1.13 2004/07/06 14:20:19 jmc Exp $
2.\"	$NetBSD: makewhatis.8,v 1.2.2.1 1997/11/10 19:57:45 thorpej Exp $
3.\"
4.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" This code is derived from software contributed to The NetBSD Foundation
8.\" by Robert Dobbs <banshee@gabriella.resort.com>.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgement:
20.\"        This product includes software developed by the NetBSD
21.\"        Foundation, Inc. and its contributors.
22.\" 4. Neither the name of The NetBSD Foundation nor the names of its
23.\"    contributors may be used to endorse or promote products derived
24.\"    from this software without specific prior written permission.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36.\" POSSIBILITY OF SUCH DAMAGE.
37.\"
38.Dd October 17, 1997
39.Dt MAKEWHATIS 8
40.Os
41.Sh NAME
42.Nm makewhatis
43.Nd create a whatis.db database
44.Sh SYNOPSIS
45.Nm makewhatis
46.Op Fl p
47.Op Ar manpath ...
48.Nm makewhatis
49.Op Fl p
50.Fl d Ar manpath
51.Ar files ...
52.Nm makewhatis
53.Op Fl p
54.Fl u Ar manpath
55.Ar files ...
56.Nm makewhatis
57.Op Fl p
58.Fl t
59.Ar files
60.Sh DESCRIPTION
61.Nm
62strips the NAME lines from compiled or raw
63.Xr man 1
64pages and creates
65a whatis.db database (that is, a subject index)
66for use with
67.Xr apropos 1 ,
68.Xr whatis 1 ,
69and
70.Xr man 1 's
71.Fl k
72option.
73If
74.Ar manpath
75is unspecified,
76.Nm
77by default creates databases for each directory prefixed by
78the _whatdb keyword in
79.Pa /etc/man.conf .
80Man pages compressed with
81.Xr compress 1
82and
83.Xr gzip 1
84are uncompressed before processing.
85.Pp
86If the
87.Fl d
88option is used,
89.Nm
90merges the description of
91.Ar files
92with an existing
93.Pa whatis.db
94database in
95.Ar manpath .
96.Pp
97If the
98.Fl u
99option is used,
100.Nm
101removes the description of
102.Ar files
103from an existing
104.Pa whatis.db
105database in
106.Ar manpath .
107.Pp
108If the
109.Fl p
110option is used,
111.Nm
112is less forgiving and warns about incorrect man pages.
113.Pp
114The
115.Fl t
116option can be used to check a set of potential man pages without
117changing any
118.Pa whatis.db
119database.
120.Sh FILES
121.Bl -tag -width /etc/man.conf -compact
122.It Pa whatis.db
123index to man pages in directory
124.It Pa /etc/man.conf
125man configuration information
126.El
127.Sh SEE ALSO
128.Xr apropos 1 ,
129.Xr man 1 ,
130.Xr nroff 1 ,
131.Xr whatis 1 ,
132.Xr man.conf 5
133.Sh BUGS
134.Nm
135should parse
136.Pa /etc/man.conf
137and deal with extra configuration information.
138In particular, it does not handle
139.Xr nroff 1
140.Cm me
141format.
142Likewise, its use of
143heuristics to retrieve subjects from most man pages is not 100% accurate.
144