[PATCH util-macros 2/3] Add XORG_ENABLE_DOCS to control the building of documentation
Gaetan Nadon
memsize at videotron.ca
Fri Jan 29 12:31:32 PST 2010
This macro is intended for modules to control, in a single option,
the building of the documentaion. Using --enable-docs=no, all
documentation is skipped, regardless of the tool used to build it.
It should be used in conjunction with other XORG_WITH_* macros
which handle cases where some specific tool is not available.
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
xorg-macros.m4.in | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 83e1bdf..957c0b6 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -610,6 +610,43 @@ fi
AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
]) # XORG_WITH_PS2PDF
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# 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_DOCS: used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+# 'no' user instructs the module not to generate docs
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+ default="yes"
+fi
+AC_ARG_ENABLE(docs,
+ AS_HELP_STRING([--enable-docs],
+ [Enable building the documentation (default: yes)]),
+ [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
--
1.6.0.4
More information about the xorg-devel
mailing list