[PATCH xorg-docs 1/3] config: build CTEXT spec now in DocBook XML format

Gaetan Nadon memsize at videotron.ca
Mon Sep 13 17:14:47 PDT 2010


Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 Makefile.am             |    3 +-
 configure.ac            |   14 +++++++---
 specs/.gitignore        |    5 +++
 specs/CTEXT/Makefile.am |   32 +++++++++++++++++++++++
 specs/Makefile.am       |   24 +++++++++++++++++
 specs/xmlrules.in       |   64 +++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 136 insertions(+), 6 deletions(-)
 create mode 100644 specs/.gitignore
 create mode 100644 specs/CTEXT/Makefile.am
 create mode 100644 specs/Makefile.am
 create mode 100644 specs/xmlrules.in

diff --git a/Makefile.am b/Makefile.am
index dd3e2aa..36423a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@
 #
 #  Process this file with autoconf to create configure.
 
-SUBDIRS = man sgml
+SUBDIRS = man sgml specs
 
 dist_doc_DATA = MAINTAINERS
 
@@ -32,7 +32,6 @@ EXTRA_DIST = \
 	specs/BDF/bdf.ms \
 	specs/BDF/fig1.ps \
 	specs/BDF/fig2.ps \
-	specs/CTEXT/ctext.xml \
 	specs/ICCCM/icccm.xml \
 	specs/RX/RX.mif \
 	specs/SIAddresses/hostname.txt \
diff --git a/configure.ac b/configure.ac
index 7f6141b..80374bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,12 +32,16 @@ AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+# Require xorg-macros minimum of 1.10 for DocBook XML documentation
 m4_ifndef([XORG_MACROS_VERSION],
-	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.8)
+          [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.10)
 XORG_DEFAULT_OPTIONS
 XORG_ENABLE_DOCS
+XORG_ENABLE_SPECS
+XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_FOP
+XORG_CHECK_SGML_DOCTOOLS(1.5)
 XORG_CHECK_DOCBOOK
 
 AC_CONFIG_FILES([Makefile
@@ -47,5 +51,7 @@ AC_CONFIG_FILES([Makefile
 		 sgml/graphics/Makefile
 		 sgml/input/Makefile
 		 sgml/platforms/Makefile
-		 sgml/security/Makefile])
+		 sgml/security/Makefile
+		 specs/Makefile
+		 specs/CTEXT/Makefile])
 AC_OUTPUT
diff --git a/specs/.gitignore b/specs/.gitignore
new file mode 100644
index 0000000..09b6a89
--- /dev/null
+++ b/specs/.gitignore
@@ -0,0 +1,5 @@
+*.html
+*.ps
+*.pdf
+*.txt
+*.css
diff --git a/specs/CTEXT/Makefile.am b/specs/CTEXT/Makefile.am
new file mode 100644
index 0000000..7d04597
--- /dev/null
+++ b/specs/CTEXT/Makefile.am
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = ctext.xml
+dist_spec_DATA = $(doc_sources)
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/specs/Makefile.am b/specs/Makefile.am
new file mode 100644
index 0000000..dd48065
--- /dev/null
+++ b/specs/Makefile.am
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+SUBDIRS=CTEXT
diff --git a/specs/xmlrules.in b/specs/xmlrules.in
new file mode 100644
index 0000000..313d9bc
--- /dev/null
+++ b/specs/xmlrules.in
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+if HAVE_XMLTO
+spec_DATA = $(doc_sources:.xml=.html)
+
+if HAVE_FOP
+spec_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
+endif
+
+if HAVE_XMLTO_TEXT
+spec_DATA += $(doc_sources:.xml=.txt)
+endif
+
+if HAVE_STYLESHEETS
+XMLTO_FLAGS = -m $(XSL_STYLESHEET) --stringparam img.src.path=$(abs_builddir)/
+
+spec_DATA += xorg.css
+xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
+	$(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+endif
+
+CLEANFILES = $(spec_DATA)
+
+SUFFIXES = .xml .ps .pdf .txt .html
+
+%.txt: %.xml $(dist_spec_DATA)
+	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+
+%.html: %.xml $(dist_spec_DATA)
+	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
+
+%.pdf: %.xml $(dist_spec_DATA)
+	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+
+%.ps: %.xml $(dist_spec_DATA)
+	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+
+chunked-html: $(doc_sources)
+	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) -o html xhtml $(doc_sources)
+
+CLEANFILES += html
+
+endif HAVE_XMLTO
-- 
1.6.0.4



More information about the xorg-devel mailing list