diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2010-01-29 10:47:40 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-02-05 09:03:26 -0500 |
commit | 6fce3ec9157794d1a90ae28b2615c00ce84f95ed (patch) | |
tree | 34502d00ebc90075dc46c4128a675633fe7a6e9b | |
parent | df1fe112b8fca77ce10ecfe2b9e4a082b29b732d (diff) |
Add XORG_ENABLE_DOCS to control the building of documentation
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@videotron.ca>
-rw-r--r-- | 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 7e56bee..e9210a9 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 |