man pages screwed
mouring at etoh.eviladmin.org
mouring at etoh.eviladmin.org
Tue Apr 17 03:03:34 EST 2001
> : Anyway, if you'd like to take a stab at this nroff test, please feel
> : free to do so. If it can be done in a reliable way, I'm all for it.
>
> Okay, here's what i've found from the range of systems i have access to:
>
> platform man formatter -mdoc works (status works)[*]
> -------- ------------- ------------------------------
> sparc-sun-solaris2.5: /usr/bin/nroff no (yes)
> parisc-hp-hpux10.20: /usr/bin/nroff no (yes)
> mips-sgi-irix6.2: /usr/bin/awf[+] no (yes)
> rs6000-ibm-aix4.1.x: /usr/bin/nroff no (yes)
> mips-dec-ultrix4.5: /usr/bin/nroff no (yes)
> alpha-dec-osf3.2: /usr/bin/nroff no (yes)
> i386-redhat-linux: /usr/bin/nroff yes (yes)
> ________
> [*] I.e., nroff returns non-zero if -mdoc doesn't work.
> [+] Yes, really.
>
> Bearing in mind that i haven't looked at the *really* weird (SunOS-4.x,
> NeXTStep/OpenStep, SCO BrokenServer or UnixWare) or esoteric (DG/UX,
> CrayOS, Reliant, LynxOS, Darwin) platforms yet, nor have i checked
> Cygwin, it looks as if the following is a good first cut:
>
> # Allow user to set NROFF if desired.
> if [ -z "${NROFF}" ]; then
> for i in nroff awf; do
> if [ -x /usr/bin/${i} ]; then
> NROFF=/usr/bin/${i}
> break
> fi
> done
> fi
> if [ -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
>
> This isn't much different from what i proposed earlier, except that the
> system nroff (or, in the case of IRIX, awf) is used instead of the
> first nroff on the PATH, and the user can set NROFF in the environment
> if desired.
>
> Ben, could you check whether this would work on {NeXT,Open}Step?
>
nroff -mdoc returns '2' on {NeXT,Open}Step.
May I suggest wrapping the above code fragment in 'if [ -z "$MANTYPE" ];
then; ..; fi'.
That way we can still have --with-mantype={..} and on a case-by-case
requirement for broken systems.
Mark,
As for other hard-coded features. If there is places where it can
be made more robusts, feel free to let us know. A lot of
configure.in/Makefile.in stuff appeared because it was the best solution
at the time.
- Ben
More information about the openssh-unix-dev
mailing list