From owner-freebsd-doc Sat Jan 5 15:40: 9 2002 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E230F37B405 for ; Sat, 5 Jan 2002 15:40:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g05Ne0a69955; Sat, 5 Jan 2002 15:40:00 -0800 (PST) (envelope-from gnats) Received: from tao.org.uk (genius.tao.org.uk [212.135.162.51]) by hub.freebsd.org (Postfix) with ESMTP id 1597037B405 for ; Sat, 5 Jan 2002 15:38:49 -0800 (PST) Received: by tao.org.uk (Postfix, from userid 0) id A5F2D2AE; Sat, 5 Jan 2002 23:38:40 +0000 (GMT) Message-Id: <20020105233840.A5F2D2AE@tao.org.uk> Date: Sat, 5 Jan 2002 23:38:40 +0000 (GMT) From: Joe Karthauser Reply-To: Joe Karthauser To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: docs/33589: Patch to doc.docbook.mk to post process .tex files. Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33589 >Category: docs >Synopsis: Patch to doc.docbook.mk to post process .tex files. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 05 15:40:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Joe Karthauser >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD genius.tao.org.uk 5.0-CURRENT FreeBSD 5.0-CURRENT #71: Wed Jan 2 19:47:25 GMT 2002 joe@genius.tao.org.uk:/usr/obj/usr/src/sys/GENIUS i386 >Description: Sometimes it's useful to be able to post process the tex file before a pdf or ps, etc, is made from it. This patch defines a new variable TEX_POSTPROCESS, in which you can define the name of a filter command that can be used to process the tex file if required. >How-To-Repeat: >Fix: Index: doc.docbook.mk =================================================================== RCS file: /home/ncvs/doc/share/mk/doc.docbook.mk,v retrieving revision 1.61 diff -u -r1.61 doc.docbook.mk --- doc.docbook.mk 2 Jan 2002 01:10:37 -0000 1.61 +++ doc.docbook.mk 5 Jan 2002 23:35:51 -0000 @@ -90,6 +90,10 @@ # a book. This option may be an order of magnitude more # CPU intensive than the default build. # +# TEX_POSTPROCESS If defined, then the command contained in this variable +# is evoked as a filter on the tex file produced +# giving the caller a chance to post-process the +# tex file before further use of it. # # Documents should use the += format to access these. @@ -408,6 +412,10 @@ ${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS} ${INDEX_SGML} ${PRINT_INDEX} ${JADE} -V tex-backend ${PRINTOPTS} \ ${JADEOPTS} -t tex -o ${.TARGET} ${MASTERDOC} +.if defined(TEX_POSTPROCESS) + ${TEX_POSTPROCESS} < ${DOC}.tex > ${DOC}.tmp + mv ${DOC}.tmp ${DOC}.tex +.endif ${DOC}.tex-ps: ${DOC}.tex ${LN} -f ${.ALLSRC} ${.TARGET} @@ -416,6 +424,10 @@ ${CP} -p ${PDFTEX_DEF} ${.TARGET} ${JADE} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \ ${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET} +.if defined(TEX_POSTPROCESS) + ${TEX_POSTPROCESS} < ${DOC}.tex-pdf > ${DOC}.tmp + mv ${DOC}.tmp ${DOC}.tex-pdf +.endif ${DOC}.dvi: ${DOC}.tex ${LOCAL_IMAGES_EPS} @${ECHO} "==> TeX pass 1/3" >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message