man pages screwed
Mark D. Roth
roth+openssh at feep.net
Thu Apr 19 02:33:05 EST 2001
On Wed Apr 18 10:43 2001 -0500, mouring at etoh.eviladmin.org wrote:
> What was the final result? I would perfer testing for BSD formated
> manpages before defaulting to lower quality pages as long as there is
> a way to override it from the ./configure.in. Just in case we need
> it.
I've attached a patch relative to the current CVS snapshot. It
includes both my autoconf/Makefile fixes and a slightly modified
version of Jim's automatic nroff detection stuff.
I've done the usual basic round of testing on this, but I'd appreciate
it if others would take a look at it as well.
> I just fixed up the catman pages a few moments ago (Mark, remember people
> use 'make -f Makefile.in distprep' =).
Sorry about that. ;)
--
Mark D. Roth <roth at feep.net>
http://www.feep.net/~roth/
-------------- next part --------------
Index: Makefile.in
===================================================================
RCS file: /cvs/openssh_cvs/Makefile.in,v
retrieving revision 1.168
diff -u -r1.168 Makefile.in
--- Makefile.in 2001/04/16 00:41:46 1.168
+++ Makefile.in 2001/04/18 16:26:06
@@ -6,6 +6,7 @@
sbindir=@sbindir@
libexecdir=@libexecdir@
mandir=@mandir@
+mansubdir=@mansubdir@
sysconfdir=@sysconfdir@
piddir=@piddir@
srcdir=@srcdir@
@@ -126,9 +127,9 @@
manpage=$<; \
fi; \
if test "$(MANTYPE)" = "man"; then \
- $(FIXPATHSCMD) $(srcdir)/$${manpage} | $(PERL) $(srcdir)/mdoc2man.pl > $@; \
+ $(FIXPATHSCMD) $${manpage} | $(PERL) $(srcdir)/mdoc2man.pl > $@; \
else \
- $(FIXPATHSCMD) $(srcdir)/$${manpage} > $@; \
+ $(FIXPATHSCMD) $${manpage} > $@; \
fi
$(CONFIGFILES)::
@@ -165,6 +166,8 @@
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
$(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
$(INSTALL) -m $(SSH_MODE) -s ssh $(DESTDIR)$(bindir)/ssh
$(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/scp
@@ -175,22 +178,15 @@
$(INSTALL) -m 0755 -s sshd $(DESTDIR)$(sbindir)/sshd
@NO_SFTP@$(INSTALL) -m 0755 -s sftp $(DESTDIR)$(bindir)/sftp
@NO_SFTP@$(INSTALL) -m 0755 -s sftp-server $(DESTDIR)$(SFTP_SERVER)
- if test "$(MANTYPE)" = "doc"; then \
- mansubdir="man"; \
- else \
- mansubdir="$(MANTYPE)"; \
- fi; \
- $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${mansubdir}1; \
- $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${mansubdir}8; \
- $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/ssh.1; \
- $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/scp.1; \
- $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/ssh-add.1; \
- $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/ssh-agent.1; \
- $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/ssh-keygen.1; \
- $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/ssh-keyscan.1; \
- $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$${mansubdir}8/sshd.8; \
- @NO_SFTP@$(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$${mansubdir}1/sftp.1; \
- @NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$${mansubdir}8/sftp-server.8;
+ $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
+ $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
+ $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
+ $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
+ $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
+ $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
+ $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
+ @NO_SFTP@$(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
+ @NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
-rm -f $(DESTDIR)$(bindir)/slogin
ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
Index: configure.in
===================================================================
RCS file: /cvs/openssh_cvs/configure.in,v
retrieving revision 1.276
diff -u -r1.276 configure.in
--- configure.in 2001/04/16 00:41:46 1.276
+++ configure.in 2001/04/18 16:26:06
@@ -70,11 +70,9 @@
AC_DEFINE(NO_X11_UNIX_SOCKETS)
no_libsocket=1
no_libnsl=1
- MANTYPE=doc
;;
*-*-dgux*)
AC_DEFINE(IP_TOS_IS_BROKEN)
- MANTYPE=doc
;;
*-*-hpux10*)
if test -z "$GCC"; then
@@ -124,7 +122,6 @@
AC_DEFINE(DONT_TRY_OTHER_AF)
AC_DEFINE(PAM_TTY_KLUDGE)
inet6_default_4in6=yes
- MANTYPE=doc
;;
mips-sony-bsd|mips-sony-newsos4)
AC_DEFINE(HAVE_NEWS4)
@@ -132,15 +129,12 @@
AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
AC_MSG_ERROR([*** libiberty missing - please install first or check config.log ***])
)
- MANTYPE=doc
;;
*-*-netbsd*)
need_dash_r=1
- MANTYPE=doc
;;
*-*-freebsd*)
check_for_libcrypt_later=1
- MANTYPE=doc
;;
*-next-*)
conf_lastlog_location="/usr/adm/lastlog"
@@ -153,7 +147,6 @@
AC_DEFINE(BROKEN_SAVED_UIDS)
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
CFLAGS="$CFLAGS"
- MANTYPE=doc
;;
*-*-solaris*)
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -1416,13 +1409,25 @@
AC_MSG_ERROR(invalid man type: $withval)
;;
esac
- ], [
- if test -z "$MANTYPE" ; then
- MANTYPE=man
- fi
]
)
+if test -z "$MANTYPE"; then
+ AC_PATH_PROGS(NROFF, nroff awf, /bin/false, /usr/bin)
+ if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
+ MANTYPE=doc
+ elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
+ MANTYPE=man
+ else
+ MANTYPE=cat
+ fi
+fi
AC_SUBST(MANTYPE)
+if test "$MANTYPE" = "doc"; then
+ mansubdir=man;
+else
+ mansubdir=$MANTYPE;
+fi
+AC_SUBST(mansubdir)
# Check whether to enable MD5 passwords
MD5_MSG="no"
@@ -1896,7 +1901,7 @@
C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
-F=`eval echo ${mandir}` ; F=`eval echo ${F}`
+F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
G=`eval echo ${piddir}` ; G=`eval echo ${G}`
H=`eval echo ${user_path}` ; H=`eval echo ${H}`
More information about the openssh-unix-dev
mailing list