1*140ae54cSschwarze.\" $OpenBSD: makewhatis.8,v 1.15 2022/03/16 23:23:24 schwarze Exp $ 2a5562a52Sschwarze.\" 3bea7dc21Sschwarze.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> 4af17c515Sschwarze.\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze <schwarze@openbsd.org> 5a5562a52Sschwarze.\" 6a5562a52Sschwarze.\" Permission to use, copy, modify, and distribute this software for any 7a5562a52Sschwarze.\" purpose with or without fee is hereby granted, provided that the above 8a5562a52Sschwarze.\" copyright notice and this permission notice appear in all copies. 9a5562a52Sschwarze.\" 10a5562a52Sschwarze.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11a5562a52Sschwarze.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12a5562a52Sschwarze.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13a5562a52Sschwarze.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14a5562a52Sschwarze.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15a5562a52Sschwarze.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16a5562a52Sschwarze.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17a5562a52Sschwarze.\" 18*140ae54cSschwarze.Dd $Mdocdate: March 16 2022 $ 19b8f15b54Sschwarze.Dt MAKEWHATIS 8 20a5562a52Sschwarze.Os 21a5562a52Sschwarze.Sh NAME 22b8f15b54Sschwarze.Nm makewhatis 23a5562a52Sschwarze.Nd index UNIX manuals 24a5562a52Sschwarze.Sh SYNOPSIS 25a5562a52Sschwarze.Nm 26a10a1a6fSschwarze.Op Fl aDnpQ 278ed73071Sschwarze.Op Fl T Cm utf8 28a5562a52Sschwarze.Op Fl C Ar file 29a5562a52Sschwarze.Nm 30a10a1a6fSschwarze.Op Fl aDnpQ 318ed73071Sschwarze.Op Fl T Cm utf8 32a5562a52Sschwarze.Ar dir ... 33a5562a52Sschwarze.Nm 34a10a1a6fSschwarze.Op Fl DnpQ 358ed73071Sschwarze.Op Fl T Cm utf8 36a5562a52Sschwarze.Fl d Ar dir 37a5562a52Sschwarze.Op Ar 38a5562a52Sschwarze.Nm 39a10a1a6fSschwarze.Op Fl Dnp 408ed73071Sschwarze.Op Fl T Cm utf8 41a5562a52Sschwarze.Fl u Ar dir 42a5562a52Sschwarze.Op Ar 43a5562a52Sschwarze.Nm 44dbb14b0bSschwarze.Op Fl DQ 45a5562a52Sschwarze.Fl t Ar 46a5562a52Sschwarze.Sh DESCRIPTION 47a5562a52SschwarzeThe 48a5562a52Sschwarze.Nm 49a5562a52Sschwarzeutility extracts keywords from 50a5562a52Sschwarze.Ux 51bea7dc21Sschwarzemanuals and indexes them in a database for fast retrieval by 52a5562a52Sschwarze.Xr apropos 1 , 53a5562a52Sschwarze.Xr whatis 1 , 54a5562a52Sschwarzeand 55*140ae54cSschwarze.Xr man 1 . 56a5562a52Sschwarze.Pp 57a5562a52SschwarzeBy default, 58a5562a52Sschwarze.Nm 59bea7dc21Sschwarzecreates a database in each 60a5562a52Sschwarze.Ar dir 61a5562a52Sschwarzeusing the files 62a5562a52Sschwarze.Sm off 63a5562a52Sschwarze.Sy man Ar section Li / 64a5562a52Sschwarze.Op Ar arch Li / 65a5562a52Sschwarze.Ar title . section 66a5562a52Sschwarze.Sm on 67a5562a52Sschwarzeand 68a5562a52Sschwarze.Sm off 69a5562a52Sschwarze.Sy cat Ar section Li / 70a5562a52Sschwarze.Op Ar arch Li / 71a5562a52Sschwarze.Ar title . Sy 0 72a5562a52Sschwarze.Sm on 73bea7dc21Sschwarzein that directory. 74bea7dc21SschwarzeExisting databases are replaced. 7595d9e8b1SschwarzeIf a directory contains no manual pages, no database is created in that 7695d9e8b1Sschwarzedirectory. 77a5562a52SschwarzeIf 78a5562a52Sschwarze.Ar dir 79a5562a52Sschwarzeis not provided, 80a5562a52Sschwarze.Nm 81a5562a52Sschwarzeuses the default paths stipulated by 82bea7dc21Sschwarze.Xr man.conf 5 . 83a5562a52Sschwarze.Pp 84a5562a52SschwarzeThe arguments are as follows: 85a5562a52Sschwarze.Bl -tag -width "-C file" 86a5562a52Sschwarze.It Fl a 87a5562a52SschwarzeUse all directories and files found below 88a5562a52Sschwarze.Ar dir ... . 89a5562a52Sschwarze.It Fl C Ar file 90a5562a52SschwarzeSpecify an alternative configuration 91a5562a52Sschwarze.Ar file 92a5562a52Sschwarzein 93a5562a52Sschwarze.Xr man.conf 5 94a5562a52Sschwarzeformat. 95dada979aSschwarze.It Fl D 96dada979aSschwarzeDisplay all files added or removed to the index. 97dada979aSschwarzeWith a second 98dada979aSschwarze.Fl D , 998a6116b7Sschwarzealso show all keywords added for each file. 100a5562a52Sschwarze.It Fl d Ar dir 101a5562a52SschwarzeMerge (remove and re-add) 102a5562a52Sschwarze.Ar 103a5562a52Sschwarzeto the database in 104bea7dc21Sschwarze.Ar dir . 105bea7dc21Sschwarze.It Fl n 106e4570e6cSschwarzeDo not create or modify any database; scan and parse only, 107e4570e6cSschwarzeand print manual page names and descriptions to standard output. 108a10a1a6fSschwarze.It Fl p 109a10a1a6fSschwarzePrint warnings about potential problems with manual pages 110a10a1a6fSschwarzeto the standard error output. 1118ed73071Sschwarze.It Fl Q 1128ed73071SschwarzeQuickly build reduced-size databases 1138ed73071Sschwarzeby reading only the NAME sections of manuals. 1148ed73071SschwarzeThe resulting databases will usually contain names and descriptions only. 1158ed73071Sschwarze.It Fl T Cm utf8 1168ed73071SschwarzeUse UTF-8 encoding instead of ASCII for strings stored in the databases. 117a5562a52Sschwarze.It Fl t Ar 118a5562a52SschwarzeCheck the given 119a5562a52Sschwarze.Ar files 120a5562a52Sschwarzefor potential problems. 121a5562a52SschwarzeImplies 122bea7dc21Sschwarze.Fl a , 123bea7dc21Sschwarze.Fl n , 124a5562a52Sschwarzeand 125a10a1a6fSschwarze.Fl p . 126a5562a52SschwarzeAll diagnostic messages are printed to the standard output; 127a5562a52Sschwarzethe standard error output is not used. 128a5562a52Sschwarze.It Fl u Ar dir 129a5562a52SschwarzeRemove 130a5562a52Sschwarze.Ar 131a5562a52Sschwarzefrom the database in 132bea7dc21Sschwarze.Ar dir . 13395d9e8b1SschwarzeIf that causes the database to become empty, also delete the database file. 134a5562a52Sschwarze.El 135a5562a52Sschwarze.Pp 136a5562a52SschwarzeIf fatal parse errors are encountered while parsing, the offending file 137a5562a52Sschwarzeis printed to stderr, omitted from the index, and the parse continues 138a5562a52Sschwarzewith the next input file. 139af17c515Sschwarze.Sh ENVIRONMENT 140af17c515Sschwarze.Bl -tag -width MANPATH 141af17c515Sschwarze.It Ev MANPATH 142af17c515SschwarzeA colon-separated list of directories to create databases in. 143af17c515SschwarzeIgnored if a 144af17c515Sschwarze.Ar dir 145af17c515Sschwarzeargument or the 146af17c515Sschwarze.Fl t 147af17c515Sschwarzeoption is specified. 148af17c515Sschwarze.El 149a5562a52Sschwarze.Sh FILES 150a5562a52Sschwarze.Bl -tag -width Ds 151a5562a52Sschwarze.It Pa mandoc.db 152bea7dc21SschwarzeA database of manpages relative to the directory of the file. 153bea7dc21SschwarzeThis file is portable across architectures and systems, so long as the 154bea7dc21Sschwarzemanpage hierarchy it indexes does not change. 155a5562a52Sschwarze.It Pa /etc/man.conf 156a5562a52SschwarzeThe default 157a5562a52Sschwarze.Xr man 1 158a5562a52Sschwarzeconfiguration file. 159a5562a52Sschwarze.El 160a5562a52Sschwarze.Sh EXIT STATUS 161a5562a52SschwarzeThe 162a5562a52Sschwarze.Nm 163a5562a52Sschwarzeutility exits with one of the following values: 164a5562a52Sschwarze.Pp 165a5562a52Sschwarze.Bl -tag -width Ds -compact 166a5562a52Sschwarze.It 0 167a5562a52SschwarzeNo errors occurred. 168a5562a52Sschwarze.It 5 169a5562a52SschwarzeInvalid command line arguments were specified. 170a5562a52SschwarzeNo input files have been read. 171a5562a52Sschwarze.It 6 172a5562a52SschwarzeAn operating system error occurred, for example memory exhaustion or an 173a5562a52Sschwarzeerror accessing input files. 174a5562a52SschwarzeSuch errors cause 175a5562a52Sschwarze.Nm 176a5562a52Sschwarzeto exit at once, possibly in the middle of parsing or formatting a file. 177a5562a52SschwarzeThe output databases are corrupt and should be removed. 178a5562a52Sschwarze.El 179a5562a52Sschwarze.Sh SEE ALSO 180a5562a52Sschwarze.Xr apropos 1 , 181a5562a52Sschwarze.Xr man 1 , 182a5562a52Sschwarze.Xr whatis 1 , 183a5562a52Sschwarze.Xr man.conf 5 184082ba4baSschwarze.Sh HISTORY 185082ba4baSschwarzeA 186a5562a52Sschwarze.Nm 187082ba4baSschwarzeutility first appeared in 188082ba4baSschwarze.Bx 2 . 189082ba4baSschwarzeIt was rewritten in 190082ba4baSschwarze.Xr perl 1 191082ba4baSschwarzefor 192082ba4baSschwarze.Ox 2.7 193082ba4baSschwarzeand in C for 1948ed73071Sschwarze.Ox 5.6 . 195082ba4baSschwarze.Pp 196082ba4baSschwarzeThe 197082ba4baSschwarze.Ar dir 198082ba4baSschwarzeargument first appeared in 199082ba4baSschwarze.Nx 1.0 ; 200082ba4baSschwarzethe options 201a10a1a6fSschwarze.Fl dpt 202082ba4baSschwarzein 203082ba4baSschwarze.Ox 2.7 ; 204a10a1a6fSschwarzethe option 205a10a1a6fSschwarze.Fl u 206a10a1a6fSschwarzein 207a10a1a6fSschwarze.Ox 3.4 ; 208082ba4baSschwarzeand the options 209a10a1a6fSschwarze.Fl aCDnQT 210082ba4baSschwarzein 2118ed73071Sschwarze.Ox 5.6 . 212082ba4baSschwarze.Sh AUTHORS 213082ba4baSschwarze.An -nosplit 214082ba4baSschwarze.An Bill Joy 215082ba4baSschwarzewrote the original 216082ba4baSschwarze.Bx 217082ba4baSschwarze.Nm 218082ba4baSschwarzein February 1979, 219082ba4baSschwarze.An Marc Espie 220082ba4baSschwarzestarted the Perl version in 2000, 221bea7dc21Sschwarzeand the current version of 222bea7dc21Sschwarze.Nm 223bea7dc21Sschwarzewas written by 224bea7dc21Sschwarze.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv 225bea7dc21Sschwarzeand 226bea7dc21Sschwarze.An Ingo Schwarze Aq Mt schwarze@openbsd.org . 227