Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2003 16:13:51 +0200
From:      "Simon L. Nielsen" <simon@nitro.dk>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        doc@freebsd.org
Subject:   Re: doc build with .OBJDIR
Message-ID:  <20030523141349.GF402@nitro.dk>
In-Reply-To: <xzpd6iaxua1.fsf@flood.ping.uio.no>
References:  <xzp1xyqzjxg.fsf@flood.ping.uio.no> <20030523015453.GF92953@nitro.dk> <xzphe7mxudr.fsf@flood.ping.uio.no> <xzpd6iaxua1.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <des@ofug.org> writes:
> > "Simon L. Nielsen" <simon@nitro.dk> 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 <doc.images.mk> 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 @@
 <!ENTITY txt.install.timezone1	 	SYSTEM "install/timezone1.txt">
 <!ENTITY txt.install.timezone2	 	SYSTEM "install/timezone2.txt">
 <!ENTITY txt.install.timezone3	 	SYSTEM "install/timezone3.txt">
-<!ENTITY txt.install.userconfig	 	SYSTEM "../../../share/images/books/hand=
book/install/userconfig.txt">
-<!ENTITY txt.install.userconfig2	SYSTEM "../../../share/images/books/handb=
ook/install/userconfig2.txt">
+<!ENTITY txt.install.userconfig	 	SYSTEM "install/userconfig.txt">
+<!ENTITY txt.install.userconfig2	SYSTEM "install/userconfig2.txt">
 <!ENTITY txt.install.xf86setup	 	SYSTEM "install/xf86setup.txt">

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030523141349.GF402>