[PATCH] Use DocBook stylesheets from xorg-sgml-doctools if they're available

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jun 25 17:23:18 PDT 2010


Bumps minimum xorg-macros requirement from 1.6 to 1.7

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac        |    8 +++++---
 doc/xml/xmlrules.in |   12 +++++++++++-
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4491e90..89e0420 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,12 +32,14 @@ AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require xorg-macros minimum of 1.7 for XORG_CHECK_SGML_DOCTOOLS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.6)
+          [m4_fatal([must install xorg-macros 1.7 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.7)
 XORG_DEFAULT_OPTIONS
 XORG_WITH_DOXYGEN(1.6.1)
+XORG_CHECK_SGML_DOCTOOLS(1.5)
+AM_CONDITIONAL([HAVE_DOCBOOK_STYLESHEETS], [test "x$XORG_SGML_PATH" != "x"])
 
 m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])])
 XORG_FONT_MACROS_VERSION(1.1)
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index 1be3691..a9629e9 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -39,6 +39,16 @@ SUFFIXES = .xml .txt .html .pdf
 XML_ENT_DIR = $(abs_top_builddir)/doc/xml
 XMLTO_FLAGS = --searchpath $(XML_ENT_DIR)
 
+if HAVE_DOCBOOK_STYLESHEETS
+STYLESHEET_SRCDIR = $(XORG_SGML_PATH)/X11
+XSL_STYLESHEET = $(STYLESHEET_SRCDIR)/xorg.xsl
+XMLTO_FLAGS += -m $(XSL_STYLESHEET)
+BUILT_DOC_FILES += xorg.css
+
+xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
+	$(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+endif
+
 if HAVE_XMLTO
 BUILT_DOC_FILES += $(TXT_FILES)
 .xml.txt:
@@ -59,7 +69,7 @@ endif
 
 endif
 
-CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
+CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css
 
 # All the files we build depend on the entities
 $(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent
-- 
1.5.6.5



More information about the xorg-devel mailing list