Index: head/share/mk/bsd.man.mk =================================================================== --- head/share/mk/bsd.man.mk (revision 38897) +++ head/share/mk/bsd.man.mk (revision 38898) @@ -1,241 +1,241 @@ -# $Id: bsd.man.mk,v 1.27 1998/04/27 15:08:07 bde Exp $ +# $Id: bsd.man.mk,v 1.28 1998/08/08 07:02:08 peter Exp $ # # The include file handles installing manual pages and # their links. # # # +++ variables +++ # # DESTDIR Change the tree where the man pages gets installed. [not set] # # MANDIR Base path for manual installation. [${SHAREDIR}/man/man] # # MANOWN Manual owner. [${SHAREOWN}] # # MANGRP Manual group. [${SHAREGRP}] # # MANMODE Manual mode. [${NOBINMODE}] # # 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 # 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}] # # MLINKS List of manual page links (using a suffix). The # linked-to file must come first, the linked file # second, and there may be multiple pairs. The files # are hard-linked. # # NOMANCOMPRESS If you do not want unformatted manual pages to be # compressed when they are installed. [not set] # # NOMLINKS If you do not want install manual page links. [not set] # # MANFILTER command to pipe the raw man page though before compressing # or installing. Can be used to do sed substitution. # # MANBUILDCAT create preformatted manual pages in addition to normal # pages. [not set] # # MROFF_CMD command and flags to create preformatted pages # # +++ targets +++ # # maninstall: # Install the manual pages and their links. # .if !target(__initialized__) __initialized__: .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .endif MANSRC?= ${.CURDIR} MINSTALL= ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat MROFF_CMD?= groff -Tascii -man MCOMPRESS_CMD?= ${COMPRESS_CMD} MCOMPRESS_EXT?= ${COMPRESS_EXT} -SECTIONS= 1 2 3 4 5 6 7 8 9 n +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}} .endif .endfor # XXX MANDEPEND is only used for groff, man/man, man/manpath, at and atrun. # It should be named more generally. all-man: ${MANDEPEND} .if defined(NOMANCOMPRESS) COPY= -c # Make special arrangements to filter to a temporary file at build time # for NOMANCOMPRESS. .if defined(MANFILTER) FILTEXTENSION= .filt .else FILTEXTENSION= .endif 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}} .for target in ${page:T:S/$/${FILTEXTENSION}/g} all-man: ${target} ${target}: ${page} ${MANFILTER} < ${.ALLSRC} > ${.TARGET} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for target in ${page:T:S/$/${CATEXT}${FILTEXTENSION}/g} all-man: ${target} ${target}: ${page} ${MANFILTER} < ${.ALLSRC} | ${MROFF_CMD} > ${.TARGET} .endfor .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(MANBUILDCAT) && !empty(MANBUILDCAT) .for page in ${MAN${sect}} .for target in ${page:T:S/$/${CATEXT}/g} all-man: ${target} ${target}: ${page} ${MROFF_CMD} ${.ALLSRC} > ${.TARGET} .endfor .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}} .for target in ${page:T:S/$/${MCOMPRESS_EXT}/} all-man: ${target} ${target}: ${page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET} .else ${MCOMPRESS_CMD} ${.ALLSRC} > ${.TARGET} .endif .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for target in ${page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/} all-man: ${target} ${target}: ${page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MROFF_CMD} | ${MCOMPRESS_CMD} > ${.TARGET} .else ${MROFF_CMD} ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET} .endif .endfor .endif .endfor .endif .endfor .endif maninstall:: .for sect in ${SECTIONS} .if defined(MAN${sect}) && !empty(MAN${sect}) maninstall:: ${MAN${sect}} .if defined(NOMANCOMPRESS) .if defined(MANFILTER) .for page in ${MAN${sect}} ${MINSTALL} ${page:T:S/$/${FILTEXTENSION}/g} \ ${DESTDIR}${MANDIR}${sect}${MANSUBDIR}/${page} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) ${MINSTALL} ${page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \ ${DESTDIR}${CATDIR}${sect}${MANSUBDIR}/${page} .endif .endfor .else ${MINSTALL} ${.ALLSRC} ${DESTDIR}${MANDIR}${sect}${MANSUBDIR} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for page in ${MAN${sect}} ${MINSTALL} ${page:T:S/$/${CATEXT}/} \ ${DESTDIR}${CATDIR}${sect}${MANSUBDIR}/${page:T} .endfor .endif .endif .else ${MINSTALL} ${.ALLSRC:T:S/$/${MCOMPRESS_EXT}/g} \ ${DESTDIR}${MANDIR}${sect}${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 .endif .endfor .if !defined(NOMLINKS) && defined(MLINKS) && !empty(MLINKS) @set `echo ${MLINKS} " " | sed 's/\.\([^.]*\) /.\1 \1 /g'`; \ while : ; do \ case $$# in \ 0) break;; \ [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \ esac; \ name=$$1; shift; sect=$$1; shift; \ l=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \ name=$$1; shift; sect=$$1; shift; \ t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \ ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ rm -f $${t} $${t}${MCOMPRESS_EXT}; \ ln $${l}${ZEXT} $${t}${ZEXT}; \ done .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) @set `echo ${MLINKS} " " | sed 's/\.\([^.]*\) /.\1 \1 /g'`; \ while : ; do \ case $$# in \ 0) break;; \ [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \ esac; \ name=$$1; shift; sect=$$1; shift; \ l=${DESTDIR}${CATDIR}$${sect}${MANSUBDIR}/$$name; \ name=$$1; shift; sect=$$1; shift; \ t=${DESTDIR}${CATDIR}$${sect}${MANSUBDIR}/$$name; \ ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ rm -f $${t} $${t}${MCOMPRESS_EXT}; \ ln $${l}${ZEXT} $${t}${ZEXT}; \ done .endif .endif Index: head/share/mk/bsd.prog.mk =================================================================== --- head/share/mk/bsd.prog.mk (revision 38897) +++ head/share/mk/bsd.prog.mk (revision 38898) @@ -1,171 +1,172 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.prog.mk,v 1.76 1998/08/08 07:02:08 peter Exp $ +# $Id: bsd.prog.mk,v 1.77 1998/08/30 20:33:27 jb Exp $ .if !target(__initialized__) __initialized__: .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .endif # Default executable format OBJFORMAT?= aout .SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S CFLAGS+=${COPTS} ${DEBUG_FLAGS} .if defined(DESTDIR) CFLAGS+= -I${DESTDIR}/usr/include CXXINCLUDES+= -I${DESTDIR}/usr/include/g++ .endif .if !defined(DEBUG_FLAGS) STRIP?= -s .endif .if defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" ) LDFLAGS+= -static .endif .if defined(PROG) .if defined(SRCS) # If there are Objective C sources, link with Objective C libraries. .if ${SRCS:M*.m} != "" OBJCLIBS?= -lobjc LDADD+= ${OBJCLIBS} .endif OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ${PROG}: ${OBJS} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD} .else !defined(SRCS) .if !target(${PROG}) SRCS= ${PROG}.c # Always make an intermediate object file because: # - it saves time rebuilding when only the library has changed # - the name of the object gets put into the executable symbol table instead of # the name of a variable temporary object. # - it's useful to keep objects around for crunching. OBJS= ${PROG}.o ${PROG}: ${OBJS} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD} .endif .endif .if !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \ !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \ - !defined(MAN7) && !defined(MAN8) && !defined(NOMAN) + !defined(MAN7) && !defined(MAN8) && !defined(NOMAN) && \ + !defined(MAN1aout) MAN1= ${PROG}.1 .endif .endif .MAIN: all all: objwarn ${PROG} all-man _SUBDIR CLEANFILES+= ${PROG} ${OBJS} .if defined(PROG) && !defined(NOEXTRADEPEND) _EXTRADEPEND: .if ${OBJFORMAT} == aout echo ${PROG}: `${CC} -Wl,-f ${CFLAGS} ${LDFLAGS} ${LDDESTDIR} \ ${LDADD:S/^/-Wl,/}` >> ${DEPENDFILE} .else .if defined(DPADD) && !empty(DPADD) echo ${PROG}: ${DPADD} >> ${DEPENDFILE} .endif .endif .endif .if !target(install) .if !target(beforeinstall) beforeinstall: .endif realinstall: beforeinstall .if defined(PROG) ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR} .endif .if defined(HIDEGAME) (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \ chown games:bin ${PROG}) .endif .if defined(LINKS) && !empty(LINKS) @set ${LINKS}; \ while test $$# -ge 2; do \ l=${DESTDIR}$$1; \ shift; \ t=${DESTDIR}$$1; \ shift; \ ${ECHO} $$t -\> $$l; \ rm -f $$t; \ ln ${LN_FLAGS} $$l $$t; \ done; true .endif install: afterinstall _SUBDIR .if !defined(NOMAN) afterinstall: realinstall maninstall .else afterinstall: realinstall .endif .endif DISTRIBUTION?= bin .if !target(distribute) distribute: _SUBDIR .for dist in ${DISTRIBUTION} cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${dist} SHARED=copies .endfor .endif .if !target(lint) lint: ${SRCS} _SUBDIR .if defined(PROG) @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1 .endif .endif .if defined(NOTAGS) tags: .endif .if !target(tags) tags: ${SRCS} _SUBDIR .if defined(PROG) @cd ${.CURDIR} && gtags ${GTAGSFLAGS} ${.OBJDIR} .if defined(HTML) @cd ${.CURDIR} && htags ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR} .endif .endif .endif .if !defined(NOMAN) .include .elif !target(maninstall) maninstall: all-man: .endif .if !target(regress) regress: .endif .if ${OBJFORMAT} != aout || make(checkdpadd) .include .endif .include .if defined(PROG) && !exists(${DEPENDFILE}) ${OBJS}: ${SRCS:M*.h} .endif .include