diff options
author | Wolfram Schneider <wosch@FreeBSD.org> | 1997-02-13 03:26:02 +0000 |
---|---|---|
committer | Wolfram Schneider <wosch@FreeBSD.org> | 1997-02-13 03:26:02 +0000 |
commit | da5636b6b2a56a2a1ddac32998b9b0690a725f78 (patch) | |
tree | ceda39446cccdf8add1dbdbd2029e4130314a833 /share | |
parent | eb26546e6f8ccc88b22c689d036508cec784473a (diff) | |
download | src-da5636b6b2a56a2a1ddac32998b9b0690a725f78.tar.gz src-da5636b6b2a56a2a1ddac32998b9b0690a725f78.zip |
Notes
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.doc.mk | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk index 4912c28e1ecf..9fd8d8032eb7 100644 --- a/share/mk/bsd.doc.mk +++ b/share/mk/bsd.doc.mk @@ -42,7 +42,7 @@ TRFLAGS+= -s TRFALGS+= -R .endif -.if defined(NODOCCOMPRESS) +.if defined(NODOCCOMPRESS) || ${PRINTERDEVICE} == "html" DFILE= ${DOC}.${PRINTERDEVICE} GZIPCMD= cat .else @@ -52,6 +52,13 @@ GZIPCMD= gzip -c PAGES?= 1- +UNROFF?= unroff +HTML_SPLIT?= yes +UNROFFFLAGS?= -ms -fhtml +.if ${HTML_SPLIT} == "yes" +UNROFFFLAGS+= split=1 +.endif + # Compatibility mode flag for groff. Use this when formatting documents with # Berkeley me macros. COMPAT?= -C @@ -70,14 +77,22 @@ print: ${DFILE} .endif .endif -clean: - rm -f ${DOC}.${PRINTERDEVICE} ${DOC}.ps ${DOC}.ascii \ - ${DOC}.ps.gz ${DOC}.ascii.gz Errs errs mklog ${CLEANFILES} +CLEANFILES+= ${DOC}.${PRINTERDEVICE} ${DOC}.${PRINTERDEVICE}.gz \ + ${DOC}.ascii ${DOC}.ascii.gz \ + ${DOC}.ps ${DOC}.ps.gz \ + ${DOC}.html ${DOC}-*.html + FILES?= ${SRCS} realinstall: +.if ${PRINTERDEVICE} == "html" + cd ${SRCDIR}; \ + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME} +.else ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DFILE} ${DESTDIR}${BINDIR}/${VOLUME} +.endif install: beforeinstall realinstall afterinstall @@ -106,6 +121,11 @@ BINMODE= 444 SRCDIR?= ${.CURDIR} .if !target(${DFILE}) +.if ${PRINTERDEVICE} == "html" +${DFILE}: ${SRCS} ${EXTRA} ${OBJS} + cd ${SRCDIR}; ${UNROFF} ${UNROFFFLAGS} document=${DOC} ${.ALLSRC} +.else + ${DFILE}:: ${SRCS} ${EXTRA} ${OBJS} # XXX ${.ALLSRC} doesn't work unless there are a lot of .PATH.foo statements. ALLSRCS= ${SRCS:S;^;${SRCDIR}/;} @@ -121,6 +141,7 @@ ${DFILE}: ${DOC}.${PRINTERDEVICE} ${GZIPCMD} ${DOC}.${PRINTERDEVICE} > ${.TARGET} .endif .endif +.endif .if !target(depend) depend: |