Subject: misc/3497: source man pages are installed with .0 suffix
To: None <gnats-bugs@gnats.netbsd.org>
From: Manuel BOUYER <bouyer@antioche.ibp.fr>
List: netbsd-bugs
Date: 04/15/1997 17:24:18
>Number:         3497
>Category:       misc
>Synopsis:       source man pages are installed with .0 suffix
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 15 08:35:01 1997
>Last-Modified:
>Originator:     Manuel Bouyer
>Organization:

MASI, Universite Paris VI.

>Release:        -current 1997/04/14
>Environment:
	
System: NetBSD chassiron.ensta.fr 1.2D NetBSD 1.2D (CHASSIRON) #2: Tue Apr 15 16:40:49 MEST 1997 bouyer@chassiron.ensta.fr:/usr/src/src_current/sys/arch/i386/compile/CHASSIRON i386


>Description:
	
	When installing the sources man pages (by setting MANINSTALL=maninstall
	in /etc/mk.conf), the man pages are installed in the right directory
	(/usr/share/man/man?), but with the wrong suffix (e.g. 0). So man
	will display the nroff source instead of the formmated man page.

>How-To-Repeat:

    Do a make build with MANINSTALL=maninstall in /etc/mk.conf. Then
	remove the old man pages and do a "man cat" (or wathever you need).
	Man will give you the nroff sources.
	
>Fix:
	The following patch will install the man pages with the correct suffix.

Index: bsd.man.mk
===================================================================
RCS file: /usr/cvs/cvsroot/sources/src_current/share/mk/bsd.man.mk,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 bsd.man.mk
--- bsd.man.mk	1997/04/14 14:48:06	1.1.1.7
+++ bsd.man.mk	1997/04/15 15:00:41
@@ -50,12 +50,12 @@
 # Rules for source page installation
 .if defined(MANPAGES) && !empty(MANPAGES)
 .   for P in ${MANPAGES}
-manpages:: ${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}
+manpages:: ${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}
 .	if !defined(UPDATE)
-.PHONY: ${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}
+.PHONY: ${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}
 .	endif
 
-${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: ${P} __installpage
+${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}: ${P} __installpage
 .   endfor
 .else
 manpages::
@@ -106,11 +106,11 @@
 		name=$$1; \
 		shift; \
 		dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
-		l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
+		l=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
 		name=$$1; \
 		shift; \
 		dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
-		t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
+		t=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
 		if [ ! -f $$t -o -z "${UPDATE}" ]; then \
 		    echo $$t -\> $$l; \
 		    rm -f $$t; \
>Audit-Trail:
>Unformatted: