Date: Fri, 7 Nov 2003 14:21:03 -0500 From: Michael Edenfield <kutulu@kutulu.org> To: freebsd-doc@freebsd.org Subject: Re: Does XML Docbook work with the /usr/doc makefiles? Message-ID: <20031107192103.GC44915@wombat.localnet> In-Reply-To: <20031107184212.GB44915@wombat.localnet> References: <20031107184212.GB44915@wombat.localnet>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
* Michael Edenfield <kutulu@kutulu.org> [031107 13:42]:
> DOC = book
> DOCBOOKSUFFIX = .xml
> SRCS = book.xml \
> part1/magnetism.xml part1/energy.xml part1/matter.xml \
> part1/emf.xml part1/conservation.xml \
> part2/acdc.xml \
> biblio/biblio.xml
> STYLESHEET_TYPE = xsl
> FORMATS = html html-split
>
> .include "/usr/doc/share/mk/doc.project.mk"
Apparently the problem was more obvious than I thought. doc.docbook.mk
has a target if ${DOC}.xml which is always built, and depends on
${SRCS}. I assume this is to allow automatic conversion of SGML -> XML
so that the XSL style sheets can be applied. Obviously if your SRCS
includes ${DOC}.xml this doesn't work. The fix is simple:
--- doc.docbook.mk.orig Fri Nov 7 14:19:33 2003
+++ doc.docbook.mk Fri Nov 7 14:19:47 2003
@@ -421,10 +421,14 @@
#
# Better approaches to handling this would be most welcome
+# If our master doc is already ${DOC}.xml then we don't need this next
+# part. In fact, it causes a circular graph reference.
+.if ${SRCS:M${DOC}.xml} == ""
${DOC}.xml: ${SRCS}
echo '<!DOCTYPE book SYSTEM "/usr/local/share/xml/docbook/4.2/docbookx.dtd">' > ${DOC}.xml
${SX} -xlower -xndata ${MASTERDOC} 2> .sxerr | tail -n +2 >> ${DOC}.xml
@-grep -v 'reference to internal SDATA entity' .sxerr
+.endif
# HTML-SPLIT -------------------------------------------------------------
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/q/CfCczNhKRsh48RApUiAKCFFjyHG6UpCAQpf89XeV01GsISOACgsF0Y
8vRcTAwgSI7M7JSEHlXuUiQ=
=1sAN
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031107192103.GC44915>
