From owner-freebsd-doc@FreeBSD.ORG Fri May 23 07:13:53 2003 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3AF937B401 for ; Fri, 23 May 2003 07:13:53 -0700 (PDT) Received: from arthur.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id D105843F75 for ; Fri, 23 May 2003 07:13:52 -0700 (PDT) (envelope-from simon@arthur.nitro.dk) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 48ECD10BF81; Fri, 23 May 2003 16:13:51 +0200 (CEST) Date: Fri, 23 May 2003 16:13:51 +0200 From: "Simon L. Nielsen" To: Dag-Erling Smorgrav Message-ID: <20030523141349.GF402@nitro.dk> References: <20030523015453.GF92953@nitro.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HnQK338I3UIa/qiP" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: doc@freebsd.org Subject: Re: doc build with .OBJDIR X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 14:13:54 -0000 --HnQK338I3UIa/qiP Content-Type: multipart/mixed; boundary="Ycz6tD7Th1CMF4v7" Content-Disposition: inline --Ycz6tD7Th1CMF4v7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2003.05.23 04:37:42 +0200, Dag-Erling Smorgrav wrote: > Dag-Erling Smorgrav writes: > > "Simon L. Nielsen" writes: > > > I think the correct solution is to use .PATH in the makefiles. > > No, the correct solution is to not use ${.OBJDIR} [...] >=20 > Ah, sorry, I replied without really understanding what you were > saying. Yes, of course, part of the solution is to use .PATH to > specify where the sources for the images are found. Once that is done > you can eliminate most of the ${.OBJDIR} use from doc.images.mk. I have a patch that almost works now... The only problem is with the console server article which use a =2Epng image that is not generated, and therefore is not put in the object directory. That causes the install to fail. I'm currently trying to find the right way to fix this. --=20 Simon L. Nielsen --Ycz6tD7Th1CMF4v7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="doc-build-partial-objdir-buildfix.patch" Content-Transfer-Encoding: quoted-printable Index: share/mk/doc.images.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/doc/share/mk/doc.images.mk,v retrieving revision 1.22 diff -u -d -r1.22 doc.images.mk --- share/mk/doc.images.mk 11 Apr 2003 09:21:15 -0000 1.22 +++ share/mk/doc.images.mk 23 May 2003 15:57:34 -0000 @@ -3,13 +3,15 @@ # # This include file handles image processing. # -# There are two types of images that must be handled: +# There are three types of images that must be handled: # # 1. Images from the library directory, that are shared across multiple # documents. # # 2. Images that are document specific. # +# 3. Images that are document specific, but language neutral. +# # For library images this file ensures that they are copied in to the=20 # documents directory so that they can be reference properly. # @@ -54,11 +56,18 @@ # The name of the directory that contains all the library images for this # language and encoding # -IMAGES_EN_DIR?=3D ${.CURDIR}/../../../share/images =20 -.for _curimage in ${IMAGES_EN} -LOCAL_IMAGES_EN +=3D ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T}/${_curimage} -.endfor +# The document type (book|article) +DOC_TYPE?=3D ${.CURDIR:H:T:S|s$||} + +# The name of the document. Should be the name of the directory the +# document is stored in. +DOC_NAME?=3D ${.CURDIR:T} + +# Tell make where to find the language neutral images +.PATH: ${DOC_PREFIX}/share/images/${DOC_TYPE}s/${DOC_NAME} + +LOCAL_IMAGES_EN+=3D ${IMAGES_EN} =20 _IMAGES_PNG=3D ${IMAGES:M*.png} _IMAGES_PNG+=3D ${LOCAL_IMAGES_EN:M*.png} @@ -91,28 +100,10 @@ IMAGES_EPS=3D ${_IMAGES_EPS} ${IMAGES_GEN_EPS} ${IMAGES_SCR_EPS} ${IMAGES_= PIC_EPS} IMAGES_TXT=3D ${_IMAGES_TXT} ${IMAGES_SCR_TXT} =20 -.if ${.OBJDIR} !=3D ${.CURDIR} -LOCAL_IMAGES=3D ${IMAGES:S|^|${.OBJDIR}/|} -CLEANFILES+=3D ${LOCAL_IMAGES} - -.if !empty(_IMAGES_PNG) -LOCAL_IMAGES_PNG=3D ${_IMAGES_PNG:S|^|${.OBJDIR}/|} -.endif - -.if !empty(_IMAGES_EPS) -LOCAL_IMAGES_EPS=3D ${_IMAGES_EPS:S|^|${.OBJDIR}/|} -.endif - -.if !empty(_IMAGES_TXT) -LOCAL_IMAGES_TXT=3D ${_IMAGES_TXT:S|^|${.OBJDIR}/|} -.endif - -.else LOCAL_IMAGES=3D ${IMAGES} LOCAL_IMAGES_PNG=3D ${_IMAGES_PNG} LOCAL_IMAGES_EPS=3D ${_IMAGES_EPS} LOCAL_IMAGES_TXT=3D ${_IMAGES_TXT} -.endif =20 LOCAL_IMAGES_PNG+=3D ${IMAGES_GEN_PNG} ${IMAGES_SCR_PNG} ${IMAGES_PIC_PNG} LOCAL_IMAGES_EPS+=3D ${IMAGES_GEN_EPS} ${IMAGES_SCR_EPS} ${IMAGES_PIC_EPS} @@ -171,6 +162,7 @@ `${REALPATH} ${.TARGET:S/.png$/.eps/}` =20 .pic.eps: + ${MKDIR} ${.TARGET:H} ${PIC2PS} ${.ALLSRC} > ${.TARGET:S/.eps$/.ps/} ${PS2EPS} ${.TARGET:S/.eps$/.ps/} ${.TARGET} =20 @@ -181,17 +173,20 @@ =20 .for _curimage in ${IMAGES_GEN_PNG} ${_curimage}: ${_curimage:S/.png$/.eps/} + ${MKDIR} ${.TARGET:H} ${EPS2PNG} ${EPS2PNGOPTS} -o ${.TARGET} `${REALPATH} ${.ALLSRC}` .endfor =20 .for _curimage in ${IMAGES_GEN_EPS} ${_curimage}: ${_curimage:S/.eps$/.png/} + ${MKDIR} ${.TARGET:H} ${PNGTOPNM} ${PNGTOPNMOPTS} ${.ALLSRC} | \ ${PNMTOPS} ${PNMTOPSOPTS} > ${.TARGET} .endfor =20 .for _curimage in ${IMAGES_GEN_PDF} ${_curimage}: ${_curimage:S/.pdf$/.eps/} + ${MKDIR} ${.TARGET:H} ${EPSTOPDF} ${EPSTOPDFOPTS} --outfile=3D${.TARGET} ${.ALLSRC} .endfor =20 @@ -225,7 +220,7 @@ # The name of the directory that contains all the library images for this # language and encoding # -IMAGES_LIB_DIR?=3D ${.CURDIR}/../../../share/images +IMAGES_LIB_DIR?=3D ${DOC_PREFIX}/share/images =20 # # The name of the directory *in* the document directory where files and Index: en_US.ISO8859-1/books/handbook/txtfiles.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/txtfiles.ent,v retrieving revision 1.2 diff -u -d -r1.2 txtfiles.ent --- en_US.ISO8859-1/books/handbook/txtfiles.ent 11 Apr 2003 09:21:15 -0000 = 1.2 +++ en_US.ISO8859-1/books/handbook/txtfiles.ent 23 May 2003 03:08:36 -0000 @@ -66,6 +66,6 @@ - - + + --Ycz6tD7Th1CMF4v7-- --HnQK338I3UIa/qiP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+ziyd8kocFXgPTRwRAktHAKCY/3nIcbe6vQOxhC9V/VozUX5hVwCdGMgN vK5PT1TpxnDMdTZrjW6PBJ8= =xd9Z -----END PGP SIGNATURE----- --HnQK338I3UIa/qiP--