From: Keith M. <kei...@us...> - 2006-03-25 00:36:53
|
On Thursday 23 March 2006 5:27 am, Chris Sutcliffe wrote: > I managed to cleanly compile the sources. I created a 'build' > subdirectory and executed: > > ../configure --prefix=/mingw --sysconfdir=/etc > > However, after doing a make / make install, I attempted to do a 'man > man' and got 'No manual entry for man'. I also tried 'man -M > /mingw/man man' with the same result. After some investigation, and a brief dialogue with Chris, we've identified that this failure occurred because he overlooked this note, in my initial posting: > ... Do note that you need to have groff installed *before* you attempt > to configure man ... The reason that this produced a man which appeared to work, but not be able to find an installed man page is explained as follows:-- - Man is capable of operating in two distinct modes: it's most common mode reads *unformatted* man page sources, stored as troff source files, and formats them "just in time" for display; the alternative mode requires preformated man pages, which are simply displayed "as is". - To format the raw troff sources, either for display or for the purpose of creating a preformatted page file, man invokes `nroff'; this isn't provided with the man package; it is provided by installing groff. - When searching for pages to display, man "walks" the MANPATH, much like the shell "walks" the PATH to find executables. For each MANDIR component of MANPATH, it first looks for a preformatted page file, in the directory `$MANDIR/catN', (where `N' represents the MANSECT number); only if the preformatted page is *not* found, does it then look for the unformatted page source, in `$MANDIR/manN'. - By configuring man, with no groff/nroff command installed, Chris generated a configuration in which the search for unformatted man pages was disabled, but the search for preformatted pages was still available. - The man package provides only unformatted man pages, which in Chris' configuration, were installed into /mingw/man/man[158]; the corresponding /mingw/man/cat[158] directories, where the preformatted pages would be stored, were neither created, nor populated. - When Chris invoked the `man man' command, it looked only for /mingw/man/cat*/man.*; because nothing matched, and because the search for unformatted man pages was disabled, causing it to ignore the /mingw/man/man1/man.1 file which *did* exist, it gave up and reported "No manual entry for man". BTW, while helping Chris to identify his problem, I've noticed that I have omitted the canonicalisation of `prefix', from the configure script. This results in the `apropos' and `whatis' paths being built into the man executable in MSYS-POSIX format. This will still work, provided the MSYS shell can be found in the PATH, when man is invoked; to make it portable to other (UNIXy) shells, configuring with ./configure --prefix=`cd /mingw; pwd -W` --sysconfdir=/etc is required; (the `sysconfdir' *is* canonicalised, as are all other paths resolved during configuration). Regards, Keith. |