Removed _MANPAGES, MANDEPEND and MANSRC.
Added MAN which will eventually replace MAN[0-9] and MAN1aout. For now, the old syntax is still supported. Reviewed by: bde
This commit is contained in:
parent
b139be2503
commit
862d3deac6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74806
@ -19,12 +19,9 @@
|
||||
# MANSUBDIR Subdirectory under the manual page section, i.e. "/i386"
|
||||
# or "/tahoe" for machine specific manual pages.
|
||||
#
|
||||
# MAN${sect} The manual pages to be installed. For sections see
|
||||
# MAN The manual pages to be installed. For sections see
|
||||
# variable ${SECTIONS}
|
||||
#
|
||||
# _MANPAGES List of all man pages to be installed.
|
||||
# (``_MANPAGES=$MAN1 $MAN2 ... $MANn'')
|
||||
#
|
||||
# MCOMPRESS_CMD Program to compress man pages. Output is to
|
||||
# stdout. [${COMPRESS_CMD}]
|
||||
#
|
||||
@ -52,7 +49,6 @@
|
||||
# Install the manual pages and their links.
|
||||
#
|
||||
|
||||
MANSRC?= ${.CURDIR}
|
||||
MINSTALL= ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
|
||||
|
||||
CATDIR= ${MANDIR:H:S/$/\/cat/}
|
||||
@ -64,18 +60,17 @@ MCOMPRESS_EXT?= ${COMPRESS_EXT}
|
||||
|
||||
SECTIONS= 1 1aout 2 3 4 5 6 7 8 9 n
|
||||
|
||||
.undef _MANPAGES
|
||||
.for sect in ${SECTIONS}
|
||||
.if defined(MAN${sect}) && !empty(MAN${sect})
|
||||
.SUFFIXES: .${sect}
|
||||
.PATH.${sect}: ${MANSRC}
|
||||
_MANPAGES+= ${MAN${sect}}
|
||||
|
||||
# Backwards compatibility.
|
||||
.if defined(MAN${sect}) && !empty(MAN${sect})
|
||||
MAN+= ${MAN${sect}}
|
||||
.endif
|
||||
|
||||
.endfor
|
||||
|
||||
# XXX MANDEPEND is only used for man/man, man/manpath, at and atrun.
|
||||
# It should be named more generally.
|
||||
all-man: ${MANDEPEND}
|
||||
all-man:
|
||||
|
||||
.if defined(NOMANCOMPRESS)
|
||||
|
||||
@ -92,11 +87,10 @@ FILTEXTENSION=
|
||||
ZEXT=
|
||||
|
||||
.if defined(MANFILTER)
|
||||
.for sect in ${SECTIONS}
|
||||
.if defined(MAN${sect}) && !empty(MAN${sect})
|
||||
CLEANFILES+= ${MAN${sect}:T:S/$/${FILTEXTENSION}/g}
|
||||
CLEANFILES+= ${MAN${sect}:T:S/$/${CATEXT}${FILTEXTENSION}/g}
|
||||
.for page in ${MAN${sect}}
|
||||
.if defined(MAN) && !empty(MAN)
|
||||
CLEANFILES+= ${MAN:T:S/$/${FILTEXTENSION}/g}
|
||||
CLEANFILES+= ${MAN:T:S/$/${CATEXT}${FILTEXTENSION}/g}
|
||||
.for page in ${MAN}
|
||||
.for target in ${page:T:S/$/${FILTEXTENSION}/g}
|
||||
all-man: ${target}
|
||||
${target}: ${page}
|
||||
@ -111,13 +105,11 @@ ${target}: ${page}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.endfor
|
||||
.else
|
||||
.for sect in ${SECTIONS}
|
||||
.if defined(MAN${sect}) && !empty(MAN${sect})
|
||||
CLEANFILES+= ${MAN${sect}:T:S/$/${CATEXT}/g}
|
||||
.if defined(MAN) && !empty(MAN)
|
||||
CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g}
|
||||
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
|
||||
.for page in ${MAN${sect}}
|
||||
.for page in ${MAN}
|
||||
.for target in ${page:T:S/$/${CATEXT}/g}
|
||||
all-man: ${target}
|
||||
${target}: ${page}
|
||||
@ -126,18 +118,16 @@ ${target}: ${page}
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.else
|
||||
|
||||
ZEXT= ${MCOMPRESS_EXT}
|
||||
|
||||
.for sect in ${SECTIONS}
|
||||
.if defined(MAN${sect}) && !empty(MAN${sect})
|
||||
CLEANFILES+= ${MAN${sect}:T:S/$/${MCOMPRESS_EXT}/g}
|
||||
CLEANFILES+= ${MAN${sect}:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g}
|
||||
.for page in ${MAN${sect}}
|
||||
.if defined(MAN) && !empty(MAN)
|
||||
CLEANFILES+= ${MAN:T:S/$/${MCOMPRESS_EXT}/g}
|
||||
CLEANFILES+= ${MAN:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g}
|
||||
.for page in ${MAN}
|
||||
.for target in ${page:T:S/$/${MCOMPRESS_EXT}/}
|
||||
all-man: ${target}
|
||||
${target}: ${page}
|
||||
@ -160,45 +150,52 @@ ${target}: ${page}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.endif
|
||||
|
||||
maninstall::
|
||||
.for sect in ${SECTIONS}
|
||||
.if defined(MAN${sect}) && !empty(MAN${sect})
|
||||
maninstall:: ${MAN${sect}}
|
||||
.if defined(MAN) && !empty(MAN)
|
||||
maninstall:: ${MAN}
|
||||
.if defined(NOMANCOMPRESS)
|
||||
.if defined(MANFILTER)
|
||||
.for page in ${MAN${sect}}
|
||||
.for page in ${MAN}
|
||||
${MINSTALL} ${page:T:S/$/${FILTEXTENSION}/g} \
|
||||
${DESTDIR}${MANDIR}${sect}${MANSUBDIR}/${page}
|
||||
${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}/${page}
|
||||
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
|
||||
${MINSTALL} ${page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \
|
||||
${DESTDIR}${CATDIR}${sect}${MANSUBDIR}/${page}
|
||||
${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page}
|
||||
.endif
|
||||
.endfor
|
||||
.else
|
||||
${MINSTALL} ${.ALLSRC} ${DESTDIR}${MANDIR}${sect}${MANSUBDIR}
|
||||
@set `echo ${.ALLSRC} " " | sed 's/\.\([^.]*\) /.\1 \1 /g'`; \
|
||||
while : ; do \
|
||||
case $$# in \
|
||||
0) break;; \
|
||||
1) echo "warn: missing extension: $$1"; break;; \
|
||||
esac; \
|
||||
page=$$1; shift; sect=$$1; shift; \
|
||||
d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \
|
||||
${ECHO} ${MINSTALL} $${page} $${d}; \
|
||||
${MINSTALL} $${page} $${d}; \
|
||||
done
|
||||
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
|
||||
.for page in ${MAN${sect}}
|
||||
.for page in ${MAN}
|
||||
${MINSTALL} ${page:T:S/$/${CATEXT}/} \
|
||||
${DESTDIR}${CATDIR}${sect}${MANSUBDIR}/${page:T}
|
||||
${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page:T}
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
.else
|
||||
${MINSTALL} ${.ALLSRC:T:S/$/${MCOMPRESS_EXT}/g} \
|
||||
${DESTDIR}${MANDIR}${sect}${MANSUBDIR}
|
||||
.for page in ${MAN}
|
||||
${MINSTALL} ${page:T:S/$/${MCOMPRESS_EXT}/g} \
|
||||
${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}
|
||||
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
|
||||
.for page in ${MAN${sect}}
|
||||
${MINSTALL} ${page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \
|
||||
${DESTDIR}${CATDIR}${sect}${MANSUBDIR}/${page:T:S/$/${MCOMPRESS_EXT}/}
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page:T:S/$/${MCOMPRESS_EXT}/}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !defined(NOMLINKS) && defined(MLINKS) && !empty(MLINKS)
|
||||
@set `echo ${MLINKS} " " | sed 's/\.\([^.]*\) /.\1 \1 /g'`; \
|
||||
|
@ -56,10 +56,11 @@ ${PROG}: ${OBJS}
|
||||
|
||||
.endif
|
||||
|
||||
.if !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
|
||||
.if !defined(NOMAN) && !defined(MAN) && \
|
||||
!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
|
||||
!defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
|
||||
!defined(MAN7) && !defined(MAN8) && !defined(MAN9) && \
|
||||
!defined(NOMAN) && !defined(MAN1aout)
|
||||
!defined(MAN1aout)
|
||||
MANSECT?= 1
|
||||
.for sect in ${MANSECT}
|
||||
MAN${sect}= ${PROG}.${sect}
|
||||
@ -68,7 +69,11 @@ MAN${sect}= ${PROG}.${sect}
|
||||
.endif
|
||||
|
||||
.MAIN: all
|
||||
.if !defined(NOMAN)
|
||||
all: objwarn ${PROG} all-man _SUBDIR
|
||||
.else
|
||||
all: objwarn ${PROG} _SUBDIR
|
||||
.endif
|
||||
|
||||
CLEANFILES+= ${PROG} ${OBJS}
|
||||
|
||||
@ -165,7 +170,6 @@ tags: ${SRCS} _SUBDIR
|
||||
.include <bsd.man.mk>
|
||||
.elif !target(maninstall)
|
||||
maninstall:
|
||||
all-man:
|
||||
.endif
|
||||
|
||||
.if !target(regress)
|
||||
|
Loading…
Reference in New Issue
Block a user