[PATCH xserver] config: replace custom code with reusable macro XORG_WITH_DOXYGEN

Gaetan Nadon memsize at videotron.ca
Thu Jan 21 11:21:07 PST 2010


XORG_WITH_DOXYGEN provides additional functions like a configure
option which allow platform builders to control the usage of
the doxygen program.

This is a requirement from platforms that do not have such doc tool.
A platform with a back level doxygen may use --without-doxygen
to get the rest of the documentation built.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac           |   13 +++----------
 hw/dmx/doc/Makefile.am |    2 +-
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c1085b..1f5c343 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,9 +34,10 @@ AM_MAINTAINER_MODE
 
 # Require xorg-macros: XORG_DEFAULT_OPTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.5 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.5)
 XORG_DEFAULT_OPTIONS
+XORG_WITH_DOXYGEN
 
 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)
@@ -1943,8 +1944,6 @@ fi
 AC_MSG_RESULT([$DMX])
 AM_CONDITIONAL(DMX, [test "x$DMX" = xyes])
 
-DOXYGEN="not_found"
-
 if test "x$DMX" = xyes; then
 	if test "x$have_dmx" = xno; then
 		AC_MSG_ERROR([Xdmx build explicitly requested, but required
@@ -1980,12 +1979,6 @@ dnl Linux sources in DMX require <linux/keyboard.h>
 	AC_SUBST(X11EXAMPLES_DEP_LIBS)
 
 fi
-AC_PATH_PROG(DOXYGEN,doxygen,[not_found])
-if test "x$DOXYGEN" = "xnot_found" ; then
-    AC_MSG_WARN([doxygen not found in $PATH. Cannot build dmx documentation])
-fi
-AC_SUBST(DOXYGEN)
-AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "xnot_found"])
 AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes])
 AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes])
 
diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am
index 0fb6e89..c6fc1c9 100644
--- a/hw/dmx/doc/Makefile.am
+++ b/hw/dmx/doc/Makefile.am
@@ -62,7 +62,7 @@ dist-local: html/annotated.html
 html/annotated.html: $(DOXYGEN_SRC)
 	$(DOXYGEN) $(srcdir)/doxygen.conf
 
-clean-local:
+maintainer-clean-local:
 	rm -rf html/
 endif
 
-- 
1.6.0.4

Initial post for review
util-macros 1.5.0 has been released

Tested with all permutations of enable-builddocs and with-doxygen options
both from git and tarballs.

No change in the way doc targets get built.
As expected, make dist fails from git when doxygen is missing so 
we don't create a tarball with no html files.



More information about the xorg-devel mailing list