[PATCH xserver 1/5] config: use new XORG_ENABLE_DEVEL_DOCS util-macro

Gaetan Nadon memsize at videotron.ca
Wed Feb 10 11:10:27 PST 2010


This controls the generation of development documentation.
This is the same configure option used in other modules
A side-effect is to change --enable-builddocs for enable-devel-docs

Affected are hw/dmx/doc and hw/xfree86/doc
The tools used for document generation are under the the
XORG_WITH_DOXYGEN and XORG_CHECK_LINUXDOC which will not
attempt to generate if their respective tool is missing.

Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac                    |   14 ++++++--------
 hw/dmx/Makefile.am              |    6 +-----
 hw/dmx/doc/Makefile.am          |   12 ++++++++----
 hw/xfree86/doc/Makefile.am      |    4 ----
 hw/xfree86/doc/sgml/Makefile.am |    8 ++++++--
 5 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/configure.ac b/configure.ac
index ec9442b..89bbf88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,10 +34,14 @@ AM_MAINTAINER_MODE
 
 # Require xorg-macros: XORG_DEFAULT_OPTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.5 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.5)
+          [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.6)
 XORG_DEFAULT_OPTIONS
+XORG_ENABLE_DEVEL_DOCS(no)
 XORG_WITH_DOXYGEN
+dnl Only build sgml docs when linuxdoc is available and
+dnl def.ents has been installed
+XORG_CHECK_LINUXDOC
 
 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)
@@ -564,9 +568,6 @@ AC_ARG_ENABLE(sparkle,AS_HELP_STRING([--enable-sparkle], [Enable updating of X11
 				[ XQUARTZ_SPARKLE="${enableval}" ],
 				[ XQUARTZ_SPARKLE="no" ])
 AC_SUBST([XQUARTZ_SPARKLE])
-AC_ARG_ENABLE(builddocs,      AS_HELP_STRING([--enable-builddocs], [Build docs (default: disabled)]),
-                                [BUILDDOCS=$enableval],
-                                [BUILDDOCS=no])
 AC_ARG_ENABLE(install-libxf86config,
 				AS_HELP_STRING([--enable-install-libxf86config],
 				[Install libxf86config (default: disabled)]),
@@ -693,9 +694,6 @@ if test "x$INT10" = xyes; then
 	AC_CHECK_HEADERS([sys/vm86.h sys/io.h])
 fi
 
-dnl Handle building documentation
-AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes)
-
 dnl Only build sgml docs when linuxdoc is available and
 dnl def.ents has been installed
 XORG_CHECK_LINUXDOC
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 3c59320..b04f5ae 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -1,6 +1,6 @@
 DIST_SUBDIRS = input config glxProxy examples doc
 
-SUBDIRS = input config examples
+SUBDIRS = input config examples doc
 bin_PROGRAMS = Xdmx
 
 if XINERAMA
@@ -15,10 +15,6 @@ GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
 GLX_DEFS = @GL_CFLAGS@
 endif
 
-if BUILDDOCS
-SUBDIRS += doc
-endif
-
 AM_CFLAGS = \
       -DHAVE_DMX_CONFIG_H \
       $(DIX_CFLAGS) \
diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am
index c6fc1c9..ac18b64 100644
--- a/hw/dmx/doc/Makefile.am
+++ b/hw/dmx/doc/Makefile.am
@@ -21,12 +21,15 @@
 
 SGML_FILES = dmx.sgml scaled.sgml
 
+if ENABLE_DEVEL_DOCS
 if BUILD_LINUXDOC
 TXT_FILES  = $(SGML_FILES:%.sgml=%.txt)
 PS_FILES   = $(SGML_FILES:%.sgml=%.ps)
+
 if BUILD_PDFDOC
 PDF_FILES  = $(SGML_FILES:%.sgml=%.pdf)
-endif
+endif BUILD_PDFDOC
+
 HTML_FILES = $(SGML_FILES:%.sgml=%.html)
 
 SUFFIXES = .sgml .txt .html .ps .pdf
@@ -49,10 +52,9 @@ SUFFIXES = .sgml .txt .html .ps .pdf
 
 noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES)
 CLEANFILES = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES)
-endif
+endif BUILD_LINUXDOC
 
 if HAVE_DOXYGEN
-
 DOXYGEN_SRC=doxygen.head doxygen.foot doxygen.css doxygen.conf
 
 all-local: html/annotated.html
@@ -64,7 +66,9 @@ html/annotated.html: $(DOXYGEN_SRC)
 
 maintainer-clean-local:
 	rm -rf html/
-endif
+
+endif HAVE_DOXYGEN
+endif ENABLE_DEVEL_DOCS
 
 EXTRA_DIST = \
 	$(SGML_FILES) \
diff --git a/hw/xfree86/doc/Makefile.am b/hw/xfree86/doc/Makefile.am
index 5809fa0..55a02e0 100644
--- a/hw/xfree86/doc/Makefile.am
+++ b/hw/xfree86/doc/Makefile.am
@@ -1,8 +1,4 @@
-if BUILDDOCS
 SUBDIRS = devel man sgml
-else
-SUBDIRS = man
-endif
 
 EXTRA_DIST = \
 	README.DRI \
diff --git a/hw/xfree86/doc/sgml/Makefile.am b/hw/xfree86/doc/sgml/Makefile.am
index 09b64f7..87a6be2 100644
--- a/hw/xfree86/doc/sgml/Makefile.am
+++ b/hw/xfree86/doc/sgml/Makefile.am
@@ -21,12 +21,15 @@
 
 SGML_FILES = DESIGN.sgml
 
+if ENABLE_DEVEL_DOCS
 if BUILD_LINUXDOC
 TXT_FILES  = $(SGML_FILES:%.sgml=%.txt)
 PS_FILES   = $(SGML_FILES:%.sgml=%.ps)
+
 if BUILD_PDFDOC
 PDF_FILES  = $(SGML_FILES:%.sgml=%.pdf)
-endif
+endif BUILD_PDFDOC
+
 HTML_FILES = $(SGML_FILES:%.sgml=%.html)
 
 SUFFIXES = .sgml .txt .html .ps .pdf
@@ -49,6 +52,7 @@ SUFFIXES = .sgml .txt .html .ps .pdf
 
 noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES)
 CLEANFILES = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES)
-endif
+endif BUILD_LINUXDOC
+endif ENABLE_DEVEL_DOCS
 
 EXTRA_DIST = $(SGML_FILES)
-- 
1.6.0.4



More information about the xorg-devel mailing list