<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Mon, 2010-05-17 at 20:39 -0700, Alan Coopersmith wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
I can't get xmlto to accept catalogs, but docbook2* takes them fine.
I can't get builddir != srcdir builds to work without catalogs to
specify the *.ent files are in a different directory than the
.xml src files. On the bright side, this avoids having to link/copy
the .ent files to every directory with docbook docs in.
XXX: squash into initial LinuxDoc -> DocBook patch #1 before push/pull
Signed-off-by: Alan Coopersmith <<A HREF="mailto:alan.coopersmith@oracle.com">alan.coopersmith@oracle.com</A>>
---
configure.ac | 12 ++++++++++--
doc/xml/xmlrules.in | 14 ++++++++------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2619862..9a0cafc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -717,8 +717,16 @@ fi
dnl Handle building documentation
AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes)
XORG_ENABLE_DEVEL_DOCS
-XORG_WITH_XMLTO(0.0.20)
-XORG_WITH_FOP
+AC_ARG_ENABLE(txt, AS_HELP_STRING([--enable-txt],
+ [Build TXT versions of documents (default: enabled)]),
+ [BUILD_TXTDOC=$enableval], [BUILD_TXTDOC=yes])
+AC_ARG_ENABLE(pdf, AS_HELP_STRING([--enable-pdf],
+ [Build PDF versions of documents (default: enabled)]),
+ [BUILD_PDFDOC=$enableval], [BUILD_PDFDOC=yes])
+AC_ARG_ENABLE(html, AS_HELP_STRING([--enable-html],
+ [Build HTML versions of documents (default: disabled)]),
+ [BUILD_HTMLDOC=$enableval], [BUILD_HTMLDOC=no])
+XORG_CHECK_DOCBOOK
dnl Handle installing libxf86config
AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes])
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index a4d43f9..b5856f7 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -36,24 +36,26 @@ BUILT_DOC_FILES =
SUFFIXES = .xml .txt .html .pdf
-if HAVE_XMLTO
+if BUILD_TXTDOC
BUILT_DOC_FILES += $(TXT_FILES)
.xml.txt:
        @rm -f $@
-        $(AM_V_GEN)$(XMLTO) txt $<
+        $(AM_V_GEN)$(MAKE_TEXT) $<
+endif
+if BUILD_HTMLDOC
BUILT_DOC_FILES += $(HTML_FILES)
.xml.html:
        @rm -f $@
-        $(AM_V_GEN)$(XMLTO) xhtml-nochunks $<
+        $(AM_V_GEN)$(MAKE_HTML) -u $<
+endif
-if HAVE_FOP
+if BUILD_PDFDOC
BUILT_DOC_FILES += $(PDF_FILES)
.xml.pdf:
        @rm -f $@
-        $(AM_V_GEN)$(XMLTO) --with-fop pdf $<
+        $(AM_V_GEN)$(MAKE_PDF) $<
endif
-endif
CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
Acked-by: Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>><BR>
<BR>
<BR>
Not that I am against it, but I was wondering what is the motivation behind the 3 configure options to select the output format. I don't recall if we are doing this for all other packages. Currently the intent is to protect the build against missing/back level doc tools which may give the impression it was meant as user feature to select output format. <BR>
<BR>
If this selection ability is in fact required, should these options not be nicely integrated whit the xorg docbook macro?
</BODY>
</HTML>