diff options
-rw-r--r-- | share/doc/psd/title/Makefile | 5 | ||||
-rw-r--r-- | share/doc/smm/title/Makefile | 5 | ||||
-rw-r--r-- | share/doc/usd/13.viref/Makefile | 2 | ||||
-rw-r--r-- | share/doc/usd/title/Makefile | 7 | ||||
-rw-r--r-- | share/man/man5/make.conf.5 | 4 | ||||
-rw-r--r-- | share/mk/bsd.doc.mk | 97 |
6 files changed, 68 insertions, 52 deletions
diff --git a/share/doc/psd/title/Makefile b/share/doc/psd/title/Makefile index c125c084489d..d073730b322c 100644 --- a/share/doc/psd/title/Makefile +++ b/share/doc/psd/title/Makefile @@ -4,9 +4,4 @@ VOLUME= psd DOC= Title SRCS= Title -# unroff(1) requires a macro package as an argument -.if defined(PRINTERDEVICE) && ${PRINTERDEVICE} == "html" -MACROS= -ms -.endif - .include <bsd.doc.mk> diff --git a/share/doc/smm/title/Makefile b/share/doc/smm/title/Makefile index b2bbe8fe9ee7..c1f1c9b64419 100644 --- a/share/doc/smm/title/Makefile +++ b/share/doc/smm/title/Makefile @@ -4,9 +4,4 @@ VOLUME= smm DOC= Title SRCS= Title -# unroff(1) requires a macro package as an argument -.if defined(PRINTERDEVICE) && ${PRINTERDEVICE} == "html" -MACROS= -ms -.endif - .include <bsd.doc.mk> diff --git a/share/doc/usd/13.viref/Makefile b/share/doc/usd/13.viref/Makefile index 7d4260019ed9..ac9f088c3657 100644 --- a/share/doc/usd/13.viref/Makefile +++ b/share/doc/usd/13.viref/Makefile @@ -22,7 +22,7 @@ CLEANFILES+= index.so.${_dev} # Build index.so as a side-effect of building the paper. index.so.${_dev}: ${SRCS} ${EXTRA:Nindex.so.${_dev}} sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$::' vi.ref-patched | \ - ${ROFF} -U -z + ${ROFF.${_dev}} -U -z sed -e 's/MINUSSIGN/-/' \ -e 's/DOUBLEQUOTE/""/' \ -e "s/SQUOTE/'/" \ diff --git a/share/doc/usd/title/Makefile b/share/doc/usd/title/Makefile index 4b140434fcfb..b773fc3c1358 100644 --- a/share/doc/usd/title/Makefile +++ b/share/doc/usd/title/Makefile @@ -1,12 +1,7 @@ # $FreeBSD$ VOLUME= usd -SRCS= Title DOC= Title - -# unroff(1) requires a macro package as an argument -.if defined(PRINTERDEVICE) && ${PRINTERDEVICE} == "html" -MACROS= -ms -.endif +SRCS= Title .include <bsd.doc.mk> diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 0cc21367ae47..0d6c7455996d 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -626,10 +626,10 @@ The default format for system documentation, depends on your printer. This can be set to .Dq Li ascii -for simple printers or +for simple printers, or .Dq Li ps for postscript or graphics printers with a ghostscript -filter. +filter, or both. .El .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk index d27372a9dc05..3c74de8f9aa3 100644 --- a/share/mk/bsd.doc.mk +++ b/share/mk/bsd.doc.mk @@ -19,24 +19,23 @@ PRINTERDEVICE?= ascii BIB?= bib -EQN?= eqn -T${PRINTERDEVICE} GREMLIN?= grn GRIND?= vgrind -f INDXBIB?= indxbib PIC?= pic REFER?= refer -.if ${PRINTERDEVICE} == "ascii" -ROFF?= groff -mtty-char ${TRFLAGS} ${MACROS} -o${PAGES} -.else -ROFF?= groff ${TRFLAGS} ${MACROS} -o${PAGES} -.endif +.for _dev in ${PRINTERDEVICE:Mascii} +ROFF.ascii?= groff -Tascii ${TRFLAGS} -mtty-char ${MACROS} -o${PAGES} +.endfor +.for _dev in ${PRINTERDEVICE:Nascii} +ROFF.${_dev}?= groff -T${_dev} ${TRFLAGS} ${MACROS} -o${PAGES} +.endfor SOELIM?= soelim TBL?= tbl DOC?= paper LPR?= lpr -TRFLAGS+= -T${PRINTERDEVICE} .if defined(USE_EQN) TRFLAGS+= -e .endif @@ -54,12 +53,17 @@ TRFLAGS+= -t .endif DCOMPRESS_EXT?= ${COMPRESS_EXT} -.if defined(NODOCCOMPRESS) || ${PRINTERDEVICE} == "html" -DFILE= ${DOC}.${PRINTERDEVICE} -.else -DFILE= ${DOC}.${PRINTERDEVICE}${DCOMPRESS_EXT} DCOMPRESS_CMD?= ${COMPRESS_CMD} +.for _dev in ${PRINTERDEVICE:Mhtml} +DFILE.html= ${DOC}.html +.endfor +.for _dev in ${PRINTERDEVICE:Nhtml} +.if defined(NODOCCOMPRESS) +DFILE.${_dev}= ${DOC}.${_dev} +.else +DFILE.${_dev}= ${DOC}.${_dev}${DCOMPRESS_EXT} .endif +.endfor PAGES?= 1- @@ -76,33 +80,41 @@ COMPAT?= -C .PATH: ${.CURDIR} ${SRCDIR} -all: ${DFILE} +.for _dev in ${PRINTERDEVICE} +all: ${DFILE.${_dev}} +.endfor .if !target(print) -print: ${DFILE} +.for _dev in ${PRINTERDEVICE} +print: ${DFILE.${_dev}} +.endfor +print: +.for _dev in ${PRINTERDEVICE} .if defined(NODOCCOMPRESS) - ${LPR} ${DFILE} + ${LPR} ${DFILE.${_dev}} .else - ${DCOMPRESS_CMD} -d ${DFILE} | ${LPR} + ${DCOMPRESS_CMD} -d ${DFILE.${_dev}} | ${LPR} .endif +.endfor .endif -.if ${PRINTERDEVICE} != "ascii" && ${PRINTERDEVICE} != "ps" -CLEANFILES+= ${DOC}.${PRINTERDEVICE} ${DOC}.${PRINTERDEVICE}${DCOMPRESS_EXT} -.endif +.for _dev in ${PRINTERDEVICE:Nascii:Nps:Nhtml} +CLEANFILES+= ${DOC}.${_dev} ${DOC}.${_dev}${DCOMPRESS_EXT} +.endfor CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \ ${DOC}.ps ${DOC}.ps${DCOMPRESS_EXT} \ ${DOC}.html ${DOC}-*.html realinstall: -.if ${PRINTERDEVICE} == "html" +.for _dev in ${PRINTERDEVICE:Mhtml} cd ${SRCDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME} -.else +.endfor +.for _dev in ${PRINTERDEVICE:Nhtml} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - ${DFILE} ${DESTDIR}${BINDIR}/${VOLUME} -.endif + ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME} +.endfor spell: ${SRCS} (cd ${.CURDIR}; spell ${SRCS} ) | sort | \ @@ -113,32 +125,51 @@ BINMODE= 444 SRCDIR?= ${.CURDIR} -.if !target(${DFILE}) .if defined(EXTRA) && !empty(EXTRA) _stamp.extra: ${EXTRA} touch ${.TARGET} +.endif + CLEANFILES+= _stamp.extra -${DFILE}: _stamp.extra +.for _dev in ${PRINTERDEVICE:Nhtml} +.if !target(${DFILE.${_dev}}) +.if target(_stamp.extra) +${DFILE.${_dev}}: _stamp.extra .endif -${DFILE}: ${SRCS} -.if ${PRINTERDEVICE} == "html" - cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \ - document=${DOC} ${SRCS} -.elif defined(NODOCCOMPRESS) +${DFILE.${_dev}}: ${SRCS} +.if defined(NODOCCOMPRESS) .if defined(CD_HACK) - (cd ${CD_HACK}; ${ROFF} ${.ALLSRC:N_stamp.extra}) > ${.TARGET} + (cd ${CD_HACK}; ${ROFF.${_dev}} ${.ALLSRC:N_stamp.extra}) > ${.TARGET} .else - ${ROFF} ${.ALLSRC:N_stamp.extra} > ${.TARGET} + ${ROFF.${_dev}} ${.ALLSRC:N_stamp.extra} > ${.TARGET} .endif .else .if defined(CD_HACK) - (cd ${CD_HACK}; ${ROFF} ${.ALLSRC:N_stamp.extra}) | \ + (cd ${CD_HACK}; ${ROFF.${_dev}} ${.ALLSRC:N_stamp.extra}) | \ ${DCOMPRESS_CMD} > ${.TARGET} .else - ${ROFF} ${.ALLSRC:N_stamp.extra} | ${DCOMPRESS_CMD} > ${.TARGET} + ${ROFF.${_dev}} ${.ALLSRC:N_stamp.extra} | ${DCOMPRESS_CMD} > ${.TARGET} +.endif +.endif +.endif +.endfor + +.for _dev in ${PRINTERDEVICE:Mhtml} +.if !target(${DFILE.html}) +.if target(_stamp.extra) +${DFILE.html}: _stamp.extra .endif +${DFILE.html}: ${SRCS} +.if defined(MACROS) && !empty(MACROS) + cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \ + document=${DOC} ${SRCS} +.else # unroff(1) requires a macro package as an argument + cd ${SRCDIR}; ${UNROFF} -ms ${UNROFFFLAGS} \ + document=${DOC} ${SRCS} +.else .endif .endif +.endfor DISTRIBUTION?= doc |