1.\" $Id: makewhatis.8,v 1.5 2014/03/17 08:31:54 schwarze Exp $ 2.\" 3.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> 4.\" Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org> 5.\" 6.\" Permission to use, copy, modify, and distribute this software for any 7.\" purpose with or without fee is hereby granted, provided that the above 8.\" copyright notice and this permission notice appear in all copies. 9.\" 10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.\" 18.Dd $Mdocdate: March 17 2014 $ 19.Dt MAKEWHATIS 8 20.Os 21.Sh NAME 22.Nm makewhatis 23.Nd index UNIX manuals 24.Sh SYNOPSIS 25.Nm 26.Op Fl anvW 27.Op Fl C Ar file 28.Nm 29.Op Fl anvW 30.Ar dir ... 31.Nm 32.Op Fl nvW 33.Fl d Ar dir 34.Op Ar 35.Nm 36.Op Fl nvW 37.Fl u Ar dir 38.Op Ar 39.Nm 40.Fl t Ar 41.Sh DESCRIPTION 42The 43.Nm 44utility extracts keywords from 45.Ux 46manuals and indexes them in a database for fast retrieval by 47.Xr apropos 1 , 48.Xr whatis 1 , 49and 50.Xr man 1 Ns 's 51.Fl k 52option. 53.Pp 54By default, 55.Nm 56creates a database in each 57.Ar dir 58using the files 59.Sm off 60.Sy man Ar section Li / 61.Op Ar arch Li / 62.Ar title . section 63.Sm on 64and 65.Sm off 66.Sy cat Ar section Li / 67.Op Ar arch Li / 68.Ar title . Sy 0 69.Sm on 70in that directory. 71Existing databases are replaced. 72If 73.Ar dir 74is not provided, 75.Nm 76uses the default paths stipulated by 77.Xr man.conf 5 . 78.Pp 79The arguments are as follows: 80.Bl -tag -width "-C file" 81.It Fl a 82Use all directories and files found below 83.Ar dir ... . 84.It Fl C Ar file 85Specify an alternative configuration 86.Ar file 87in 88.Xr man.conf 5 89format. 90.It Fl d Ar dir 91Merge (remove and re-add) 92.Ar 93to the database in 94.Ar dir . 95.It Fl n 96Do not create or modify any database; 97scan and parse only. 98.It Fl t Ar 99Check the given 100.Ar files 101for potential problems. 102Implies 103.Fl a , 104.Fl n , 105and 106.Fl W . 107All diagnostic messages are printed to the standard output; 108the standard error output is not used. 109.It Fl u Ar dir 110Remove 111.Ar 112from the database in 113.Ar dir . 114.It Fl v 115Display all files added or removed to the index. 116.It Fl W 117Print warnings about potential problems with manual pages 118to the standard error output. 119.El 120.Pp 121If fatal parse errors are encountered while parsing, the offending file 122is printed to stderr, omitted from the index, and the parse continues 123with the next input file. 124.Sh FILES 125.Bl -tag -width Ds 126.It Pa mandoc.db 127A database of manpages relative to the directory of the file. 128This file is portable across architectures and systems, so long as the 129manpage hierarchy it indexes does not change. 130.It Pa /etc/man.conf 131The default 132.Xr man 1 133configuration file. 134.El 135.Sh EXIT STATUS 136The 137.Nm 138utility exits with one of the following values: 139.Pp 140.Bl -tag -width Ds -compact 141.It 0 142No errors occurred. 143.It 5 144Invalid command line arguments were specified. 145No input files have been read. 146.It 6 147An operating system error occurred, for example memory exhaustion or an 148error accessing input files. 149Such errors cause 150.Nm 151to exit at once, possibly in the middle of parsing or formatting a file. 152The output databases are corrupt and should be removed. 153.El 154.Sh SEE ALSO 155.Xr apropos 1 , 156.Xr man 1 , 157.Xr whatis 1 , 158.Xr man.conf 5 159.Sh HISTORY 160A 161.Nm 162utility first appeared in 163.Bx 2 . 164It was rewritten in 165.Xr perl 1 166for 167.Ox 2.7 168and in C for 169.Ox 5.1 . 170.Pp 171The 172.Ar dir 173argument first appeared in 174.Nx 1.0 ; 175the options 176.Fl dtu 177in 178.Ox 2.7 ; 179and the options 180.Fl aCvW 181in 182.Ox 5.1 . 183.Sh AUTHORS 184.An -nosplit 185.An Bill Joy 186wrote the original 187.Bx 188.Nm 189in February 1979, 190.An Marc Espie 191started the Perl version in 2000, 192and the current version of 193.Nm 194was written by 195.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv 196and 197.An Ingo Schwarze Aq Mt schwarze@openbsd.org . 198