From eb89687138bfc3ed337544ea6e29a37931dc8f16 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 21 Oct 1995 18:18:46 +0000 Subject: [PATCH] Fix maninstall target for the NOMANCOMPRESS case. The previous revision failed when there was an obj directory. Use .PATH.n for installing too so that make can find the source files. This allows the source files to be in several directories (the old method using cd only works well for a single directory). The dependencies are on the source files even for the compressed case, although it would be more flexible to depend on the files being installed, so that `make install' doesn't attempt to build things Force COPY to -c for the NOMANCOMPRESS case. Then the files to be installed are always sources, so they must not be moved. --- share/mk/bsd.man.mk | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 62d15b931d7..b2913b5e09d 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -1,4 +1,4 @@ -# $Id: bsd.man.mk,v 1.5 1995/10/02 20:01:49 wollman Exp $ +# $Id: bsd.man.mk,v 1.6 1995/10/14 08:16:04 bde Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" @@ -17,10 +17,18 @@ ZEXTENSION= .gz SECTIONS= 1 2 3 3f 4 5 6 7 8 +.for sect in ${SECTIONS} +.if defined(MAN${sect}) && !empty(MAN${sect}) +.SUFFIXES: .${sect} +.PATH.${sect}: ${MANSRC} +.endif +.endfor + all-man: ${MANDEPEND} .if defined(NOMANCOMPRESS) +COPY= -c ZEXT= .else @@ -30,8 +38,6 @@ ZEXT= ${ZEXTENSION} .for sect in ${SECTIONS} .if defined(MAN${sect}) && !empty(MAN${sect}) CLEANFILES+= ${MAN${sect}:T:S/$/${ZEXTENSION}/g} -.SUFFIXES: .${sect} -.PATH.${sect}: ${MANSRC} .for page in ${MAN${sect}} .for target in ${page:T:S/$/${ZEXTENSION}/} all-man: ${target} @@ -44,13 +50,14 @@ ${target}: ${page} .endif -maninstall: +maninstall:: .for sect in ${SECTIONS} .if defined(MAN${sect}) && !empty(MAN${sect}) +maninstall:: ${MAN${sect}} .if defined(NOMANCOMPRESS) - ${MINSTALL} ${MAN${sect}} ${DESTDIR}${MANDIR}${sect}${MANSUBDIR} + ${MINSTALL} ${.ALLSRC} ${DESTDIR}${MANDIR}${sect}${MANSUBDIR} .else - ${MINSTALL} ${MAN${sect}:T:S/$/${ZEXTENSION}/g} \ + ${MINSTALL} ${.ALLSRC:T:S/$/${ZEXTENSION}/g} \ ${DESTDIR}${MANDIR}${sect}${MANSUBDIR} .endif .endif