[gnome-session] build: Add --disable-man option



commit 2cc0b7023b78e3bd9e111c8b0a719c4d10dde5cf
Author: Colin Walters <walters verbum org>
Date:   Tue Nov 13 13:05:55 2012 -0500

    build: Add --disable-man option
    
    1) For embedded systems, it makes no sense to include documentation
       of this kind on each image.  So we might as well not even build
       it.
    2) For people bootstrapping systems from source code, documentation
       is the source of many cyclical build loops.  Allowing it to
        be disabled helps cut these loops.
    3) The Docbook stylesheets and build system have no sane upstream,
       and so at the moment aren't included in gnome-ostree.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688271

 configure.ac    |   14 +++++++++++++-
 doc/Makefile.am |    6 +++++-
 2 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bbba272..0ccbee6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,17 @@ if test x$enable_docbook_docs = xyes; then
 fi
 AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
 AC_MSG_RESULT($enable_docbook_docs)
+AC_ARG_ENABLE(man,
+              [AS_HELP_STRING([--enable-man],
+                              [generate man pages [default=yes]])],,
+              enable_man=yes)
+if test "$enable_man" != no; then
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  if test -z "$XSLTPROC"; then
+    AC_MSG_ERROR([xsltproc is required for --enable-man])
+  fi
+fi
+AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
 
 dnl ====================================================================
 dnl Check for xsltproc
@@ -379,6 +390,7 @@ echo "
         XRender support:          ${have_xrender}
         XSync support:            ${have_xsync}
         XTest support:            ${have_xtest}
-        Build documentation:      ${enable_docbook_docs}
+        Build Docbook:            ${enable_docbook_docs}
+        Build manpages:           ${enable_man}
 
 "
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 04f4e97..1129c41 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,3 +1,7 @@
-SUBDIRS = dbus man
+SUBDIRS = dbus
+
+if ENABLE_MAN
+SUBDIRS += man
+endif
 
 -include $(top_srcdir)/git.mk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]