1*c9bcef03Schristos.\" Id: makewhatis.8,v 1.6 2017/05/17 22:27:12 schwarze Exp 2fec65c98Schristos.\" 3fec65c98Schristos.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> 4*c9bcef03Schristos.\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze <schwarze@openbsd.org> 5fec65c98Schristos.\" 6fec65c98Schristos.\" Permission to use, copy, modify, and distribute this software for any 7fec65c98Schristos.\" purpose with or without fee is hereby granted, provided that the above 8fec65c98Schristos.\" copyright notice and this permission notice appear in all copies. 9fec65c98Schristos.\" 10fec65c98Schristos.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11fec65c98Schristos.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12fec65c98Schristos.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13fec65c98Schristos.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14fec65c98Schristos.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15fec65c98Schristos.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16fec65c98Schristos.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17fec65c98Schristos.\" 18*c9bcef03Schristos.Dd May 17, 2017 19fec65c98Schristos.Dt MAKEWHATIS 8 20fec65c98Schristos.Os 21fec65c98Schristos.Sh NAME 22fec65c98Schristos.Nm makewhatis 23fec65c98Schristos.Nd index UNIX manuals 24fec65c98Schristos.Sh SYNOPSIS 25fec65c98Schristos.Nm 26fec65c98Schristos.Op Fl aDnpQ 27fec65c98Schristos.Op Fl T Cm utf8 28fec65c98Schristos.Op Fl C Ar file 29fec65c98Schristos.Nm 30fec65c98Schristos.Op Fl aDnpQ 31fec65c98Schristos.Op Fl T Cm utf8 32fec65c98Schristos.Ar dir ... 33fec65c98Schristos.Nm 34fec65c98Schristos.Op Fl DnpQ 35fec65c98Schristos.Op Fl T Cm utf8 36fec65c98Schristos.Fl d Ar dir 37fec65c98Schristos.Op Ar 38fec65c98Schristos.Nm 39fec65c98Schristos.Op Fl Dnp 40fec65c98Schristos.Op Fl T Cm utf8 41fec65c98Schristos.Fl u Ar dir 42fec65c98Schristos.Op Ar 43fec65c98Schristos.Nm 44fec65c98Schristos.Op Fl DQ 45fec65c98Schristos.Fl t Ar 46fec65c98Schristos.Sh DESCRIPTION 47fec65c98SchristosThe 48fec65c98Schristos.Nm 49fec65c98Schristosutility extracts keywords from 50fec65c98Schristos.Ux 51fec65c98Schristosmanuals and indexes them in a database for fast retrieval by 52fec65c98Schristos.Xr apropos 1 , 53fec65c98Schristos.Xr whatis 1 , 54fec65c98Schristosand 55fec65c98Schristos.Xr man 1 Ns 's 56fec65c98Schristos.Fl k 57fec65c98Schristosoption. 58fec65c98Schristos.Pp 59fec65c98SchristosBy default, 60fec65c98Schristos.Nm 61fec65c98Schristoscreates a database in each 62fec65c98Schristos.Ar dir 63fec65c98Schristosusing the files 64fec65c98Schristos.Sm off 65fec65c98Schristos.Sy man Ar section Li / 66fec65c98Schristos.Op Ar arch Li / 67fec65c98Schristos.Ar title . section 68fec65c98Schristos.Sm on 69fec65c98Schristosand 70fec65c98Schristos.Sm off 71fec65c98Schristos.Sy cat Ar section Li / 72fec65c98Schristos.Op Ar arch Li / 73fec65c98Schristos.Ar title . Sy 0 74fec65c98Schristos.Sm on 75fec65c98Schristosin that directory. 76fec65c98SchristosExisting databases are replaced. 77*c9bcef03SchristosIf a directory contains no manual pages, no database is created in that 78*c9bcef03Schristosdirectory. 79fec65c98SchristosIf 80fec65c98Schristos.Ar dir 81fec65c98Schristosis not provided, 82fec65c98Schristos.Nm 83fec65c98Schristosuses the default paths stipulated by 84fec65c98Schristos.Xr man.conf 5 . 85fec65c98Schristos.Pp 86fec65c98SchristosThe arguments are as follows: 87fec65c98Schristos.Bl -tag -width "-C file" 88fec65c98Schristos.It Fl a 89fec65c98SchristosUse all directories and files found below 90fec65c98Schristos.Ar dir ... . 91fec65c98Schristos.It Fl C Ar file 92fec65c98SchristosSpecify an alternative configuration 93fec65c98Schristos.Ar file 94fec65c98Schristosin 95fec65c98Schristos.Xr man.conf 5 96fec65c98Schristosformat. 97fec65c98Schristos.It Fl D 98fec65c98SchristosDisplay all files added or removed to the index. 99fec65c98SchristosWith a second 100fec65c98Schristos.Fl D , 101fec65c98Schristosalso show all keywords added for each file. 102fec65c98Schristos.It Fl d Ar dir 103fec65c98SchristosMerge (remove and re-add) 104fec65c98Schristos.Ar 105fec65c98Schristosto the database in 106fec65c98Schristos.Ar dir . 107fec65c98Schristos.It Fl n 108fec65c98SchristosDo not create or modify any database; scan and parse only, 109fec65c98Schristosand print manual page names and descriptions to standard output. 110fec65c98Schristos.It Fl p 111fec65c98SchristosPrint warnings about potential problems with manual pages 112fec65c98Schristosto the standard error output. 113fec65c98Schristos.It Fl Q 114fec65c98SchristosQuickly build reduced-size databases 115fec65c98Schristosby reading only the NAME sections of manuals. 116fec65c98SchristosThe resulting databases will usually contain names and descriptions only. 117fec65c98Schristos.It Fl T Cm utf8 118fec65c98SchristosUse UTF-8 encoding instead of ASCII for strings stored in the databases. 119fec65c98Schristos.It Fl t Ar 120fec65c98SchristosCheck the given 121fec65c98Schristos.Ar files 122fec65c98Schristosfor potential problems. 123fec65c98SchristosImplies 124fec65c98Schristos.Fl a , 125fec65c98Schristos.Fl n , 126fec65c98Schristosand 127fec65c98Schristos.Fl p . 128fec65c98SchristosAll diagnostic messages are printed to the standard output; 129fec65c98Schristosthe standard error output is not used. 130fec65c98Schristos.It Fl u Ar dir 131fec65c98SchristosRemove 132fec65c98Schristos.Ar 133fec65c98Schristosfrom the database in 134fec65c98Schristos.Ar dir . 135*c9bcef03SchristosIf that causes the database to become empty, also delete the database file. 136fec65c98Schristos.El 137fec65c98Schristos.Pp 138fec65c98SchristosIf fatal parse errors are encountered while parsing, the offending file 139fec65c98Schristosis printed to stderr, omitted from the index, and the parse continues 140fec65c98Schristoswith the next input file. 141*c9bcef03Schristos.Sh ENVIRONMENT 142*c9bcef03Schristos.Bl -tag -width MANPATH 143*c9bcef03Schristos.It Ev MANPATH 144*c9bcef03SchristosA colon-separated list of directories to create databases in. 145*c9bcef03SchristosIgnored if a 146*c9bcef03Schristos.Ar dir 147*c9bcef03Schristosargument or the 148*c9bcef03Schristos.Fl t 149*c9bcef03Schristosoption is specified. 150*c9bcef03Schristos.El 151fec65c98Schristos.Sh FILES 152fec65c98Schristos.Bl -tag -width Ds 153fec65c98Schristos.It Pa mandoc.db 154fec65c98SchristosA database of manpages relative to the directory of the file. 155fec65c98SchristosThis file is portable across architectures and systems, so long as the 156fec65c98Schristosmanpage hierarchy it indexes does not change. 157fec65c98Schristos.It Pa /etc/man.conf 158fec65c98SchristosThe default 159fec65c98Schristos.Xr man 1 160fec65c98Schristosconfiguration file. 161fec65c98Schristos.El 162fec65c98Schristos.Sh EXIT STATUS 163fec65c98SchristosThe 164fec65c98Schristos.Nm 165fec65c98Schristosutility exits with one of the following values: 166fec65c98Schristos.Pp 167fec65c98Schristos.Bl -tag -width Ds -compact 168fec65c98Schristos.It 0 169fec65c98SchristosNo errors occurred. 170fec65c98Schristos.It 5 171fec65c98SchristosInvalid command line arguments were specified. 172fec65c98SchristosNo input files have been read. 173fec65c98Schristos.It 6 174fec65c98SchristosAn operating system error occurred, for example memory exhaustion or an 175fec65c98Schristoserror accessing input files. 176fec65c98SchristosSuch errors cause 177fec65c98Schristos.Nm 178fec65c98Schristosto exit at once, possibly in the middle of parsing or formatting a file. 179fec65c98SchristosThe output databases are corrupt and should be removed. 180fec65c98Schristos.El 181fec65c98Schristos.Sh SEE ALSO 182fec65c98Schristos.Xr apropos 1 , 183fec65c98Schristos.Xr man 1 , 184fec65c98Schristos.Xr whatis 1 , 185fec65c98Schristos.Xr man.conf 5 186fec65c98Schristos.Sh HISTORY 187fec65c98SchristosA 188fec65c98Schristos.Nm 189fec65c98Schristosutility first appeared in 190fec65c98Schristos.Bx 2 . 191fec65c98SchristosIt was rewritten in 192fec65c98Schristos.Xr perl 1 193fec65c98Schristosfor 194fec65c98Schristos.Ox 2.7 195fec65c98Schristosand in C for 196fec65c98Schristos.Ox 5.6 . 197fec65c98Schristos.Pp 198fec65c98SchristosThe 199fec65c98Schristos.Ar dir 200fec65c98Schristosargument first appeared in 201fec65c98Schristos.Nx 1.0 ; 202fec65c98Schristosthe options 203fec65c98Schristos.Fl dpt 204fec65c98Schristosin 205fec65c98Schristos.Ox 2.7 ; 206fec65c98Schristosthe option 207fec65c98Schristos.Fl u 208fec65c98Schristosin 209fec65c98Schristos.Ox 3.4 ; 210fec65c98Schristosand the options 211fec65c98Schristos.Fl aCDnQT 212fec65c98Schristosin 213fec65c98Schristos.Ox 5.6 . 214fec65c98Schristos.Sh AUTHORS 215fec65c98Schristos.An -nosplit 216fec65c98Schristos.An Bill Joy 217fec65c98Schristoswrote the original 218fec65c98Schristos.Bx 219fec65c98Schristos.Nm 220fec65c98Schristosin February 1979, 221fec65c98Schristos.An Marc Espie 222fec65c98Schristosstarted the Perl version in 2000, 223fec65c98Schristosand the current version of 224fec65c98Schristos.Nm 225fec65c98Schristoswas written by 226fec65c98Schristos.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv 227fec65c98Schristosand 228fec65c98Schristos.An Ingo Schwarze Aq Mt schwarze@openbsd.org . 229