[PATCH util-macros] doc: add XORG_ENABLE_DEVEL_DOCS and XORG_ENABLE_SPECS

Gaetan Nadon memsize at videotron.ca
Wed Feb 3 18:02:35 PST 2010


Identical to XORG_ENABLE_DOCS, this macros allows modules
to classify docs per type and selectively control their building.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 xorg-macros.m4.in |   70 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 8ad049b..b2bfc2f 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -676,6 +676,76 @@ AC_MSG_CHECKING([whether to build documentation])
 AC_MSG_RESULT([$build_docs])
 ]) # XORG_ENABLE_DOCS
 
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
+# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
+#			'no' user instructs the module not to generate developer docs
+# parm1:		specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+	AS_HELP_STRING([--enable-devel-docs],
+	   [Enable building the developer documentation (default: yes)]),
+	   [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:		used in makefiles to conditionally generate specs
+# --enable-specs:	'yes' user instructs the module to generate specs
+#			'no' user instructs the module not to generate specs
+# parm1:		specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+	AS_HELP_STRING([--enable-specs],
+	   [Enable building the specs (default: yes)]),
+	   [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
 # XORG_CHECK_MALLOC_ZERO
 # ----------------------
 # Minimum version: 1.0.0
-- 
1.6.0.4

As discussed, these 2 additional macros will allow modules to qualify their documents
as they see fit. 

Any preference?
libXaw now used enable-docs but directory is called 'spec'
How about xserver dmx and xfree86?
http://wiki.x.org/wiki/Development/Documentation/WritingDocumentation








More information about the xorg-devel mailing list