NetBSD/usr.bin/man
abhinav 5652c781e4 Teach man -p to respect the MANPATH environment variable and the -M option.
Currently, `man -p` generates its output based on the value of the _default tag
in man.conf. However, man(1) modifies its search path based on the value of the
MANPATH variable and the list of directories specified via the -M option. In such
a case, `man -p` does not represent the correct search path. This commit intends
to fix this.

This change has the side effect that now the output of `man -p` will also include
the machine class specific subdirectories (such as man8/x86), while previously it
did not. The output would include subdirectories only for those machine classes
which are specified in the man.conf file.

Also, with this change, it is possible to run makemandb(8), by setting MANPATH
environment variable (e.g. env MANPATH=/usr/share/man makemandb).

Patch reviewed by wiz@
2017-05-02 14:19:23 +00:00
..
Makefile
man.1 Document -f option for man(1). 2016-06-16 15:10:58 +00:00
man.c Teach man -p to respect the MANPATH environment variable and the -M option. 2017-05-02 14:19:23 +00:00
man.conf.5 Replace makewhatis(8) with makemandb(8) in SEE ALSO. 2016-06-16 15:11:43 +00:00
manconf.c
manconf.h
pathnames.h put back _PATH_WHATIS, it is used. 2016-05-21 20:54:34 +00:00