man pages screwed

Jim Knoble jmknoble at jmknoble.cx
Mon Apr 16 16:44:45 EST 2001


Circa 2001-Apr-15 10:56:41 -0500 dixit Mark D. Roth:

: I've finally gotten a chance to work on this.  The attached patch
: replaces the current --with-catman option with this new option:
: 
:   --with-mantype=man|cat|doc  Set man page type
: 
: Selecting "man" will automatically run the pages through mdoc2man.pl,
: selecting "cat" will install the preformatted pages, and selecting
: "doc" will install the BSD-style pages without modification.  fixpaths
: still gets run no matter what you select.  The default is "doc" on
: most BSD systems, and "man" everywhere else.

Hmm ... wouldn't it be better to actually detect whether the -mdoc
macros were available rather than defaulting to -man for non-BSD
systems?  Most releases of GNU groff have pretty good -mdoc macros and
can handle the OpenSSH man pages with no problem.  I think pages
formatted with -mdoc look better and are easier to read than those
formatted with -man (no reflection on you or on mdoc2man.pl, Mark).

Perhaps it's just me who thinks that?

Anyway, it should be relatively easy to detect what format to use:

  AC_PATH_PROG(NROFF, nroff)
  if test -z "${NROFF}"; then
    MANTYPE=cat
  elif ${NROFF} -mdoc ssh.1 >/dev/null 2>&1; then
    MANTYPE=doc
  elif ${NROFF} -man ssh.1 >/dev/null 2>&1; then
    MANTYPE=man
  else
    MANTYPE=cat
  fi
  
Anyone know of any systems with a really broken nroff that won't work
with that?  It seems like the best solution to me.

-- 
jim knoble | jmknoble at jmknoble.cx | http://www.jmknoble.cx/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 249 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010416/86a4c27f/attachment.bin 


More information about the openssh-unix-dev mailing list