From root@tao.org.uk  Sat Jan  5 15:38:49 2002
Return-Path: <root@tao.org.uk>
Received: from tao.org.uk (genius.tao.org.uk [212.135.162.51])
	by hub.freebsd.org (Postfix) with ESMTP id 1597037B405
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <joe@tao.org.uk>
Reply-To: Joe Karthauser <joe@tao.org.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Patch to doc.docbook.mk to post process .tex files.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         33589
>Category:       docs
>Synopsis:       [patch] to doc.docbook.mk to post process .tex files.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       all
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 05 15:40:00 PST 2002
>Closed-Date:    Wed Jan 22 13:36:32 UTC 2014
>Last-Modified:  Wed Jan 22 13:36:32 UTC 2014
>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:

From: Nik Clayton <nik@freebsd.org>
To: Joe Karthauser <joe@tao.org.uk>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/33589: Patch to doc.docbook.mk to post process .tex files.
Date: Wed, 9 Jan 2002 17:34:07 +0000

 --1UWUbFP1cBYEclgG
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, Jan 05, 2002 at 11:38:40PM +0000, Joe Karthauser wrote:
 > >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.
 
 As discussed with Joe on the phone, a better approach to this is to
 define a set of pre- and post- targets for each stage of the process, so
 that individual Makefiles can put in their commands as necessary -- in
 the same way that the ports system does.
 
 For the moment, keep this PR open, in the hope that someone has the
 cycles to tackle it.
 
 N
 --=20
 FreeBSD: The Power to Serve             http://www.freebsd.org/
 FreeBSD Documentation Project           http://www.freebsd.org/docproj/
 
           --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---
 
 --1UWUbFP1cBYEclgG
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iEYEARECAAYFAjw8fw4ACgkQk6gHZCw343VxTwCdE0YQlVcwSdlYKnDPew0TChK3
 fCUAoJSKdOQq0mhtqoLjDZirhC/dwixd
 =h/C2
 -----END PGP SIGNATURE-----
 
 --1UWUbFP1cBYEclgG--
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Fri Dec 23 21:27:10 UTC 2005 
State-Changed-Why:  
Mark as suspended awaiting someone to pick up the idea of pre/post targets. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=33589 
State-Changed-From-To: suspended->closed 
State-Changed-By: gabor 
State-Changed-When: Wed Jan 22 13:35:51 UTC 2014 
State-Changed-Why:  
We do not use TeX any more in the rendering process.  Thanks for your 
contribution, though. 


Responsible-Changed-From-To: freebsd-doc->gabor 
Responsible-Changed-By: gabor 
Responsible-Changed-When: Wed Jan 22 13:35:51 UTC 2014 
Responsible-Changed-Why:  
We do not use TeX any more in the rendering process.  Thanks for your 
contribution, though. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=33589 
>Unformatted:
