Does XML Docbook work with the /usr/doc makefiles?
Michael Edenfield
kutulu at kutulu.org
Fri Nov 7 19:21:48 UTC 2003
* Michael Edenfield <kutulu at 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 -------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20031107/b5a9432e/attachment.sig>
More information about the freebsd-doc
mailing list