Don't distribute dbus-daemon.1 in the tarball
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 7 Feb 2011 12:00:31 +0000 (12:00 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 17 Feb 2011 16:31:44 +0000 (16:31 +0000)
It's generated by configure.

Also use a more normal way to distribute man pages that are actually
source, and use man1_MANS rather than auto-detecting the section from
the man page, which is best-practice and slightly faster.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34292

configure.in
doc/Makefile.am

index 50a0a14..2b1929e 100644 (file)
@@ -121,7 +121,7 @@ AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes)
 AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes)
 AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes)
 
-AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
+AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code in the library and binaries]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
 AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
 AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
 AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
@@ -153,11 +153,25 @@ AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Di
 
 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
 dnl and also some stuff in the test/ subdir
+dnl
+dnl In principle we could have separate switches for the embedded
+dnl test code in the libraries (which cause bloat and possible security holes)
+dnl and the standalone GLib regression tests, but not right now.
 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
 if test x$enable_tests = xyes; then
     AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
 fi
 
+AC_ARG_ENABLE([standalone-tests],
+    AS_HELP_STRING([--enable-standalone-tests],
+        [enable standalone regression tests (GLib 2.16 required)]),
+    [], [enable_standalone_tests=yes])
+
+if test x$enable_standalone_tests = xyes; then
+    PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16],
+        [], [AC_MSG_ERROR([The standalone regression tests require GLib])])
+fi
+
 if test x$enable_verbose_mode = xyes; then
     AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
 fi
index bc349f8..7fe0dc1 100644 (file)
@@ -1,11 +1,17 @@
-man_MANS = \
+# automake normally assumes that man pages are generated files;
+# these ones aren't, so we need the dist_ prefix to say that they're
+# their own source code
+dist_man1_MANS = \
        dbus-cleanup-sockets.1 \
-       dbus-daemon.1 \
        dbus-launch.1 \
        dbus-monitor.1 \
        dbus-send.1 \
        dbus-uuidgen.1
 
+# on the other hand, this one is generated
+man1_MANS = \
+       dbus-daemon.1
+
 MAN_IN_FILES = dbus-daemon.1.in
 
 MAN_HTML_FILES = \
@@ -35,7 +41,7 @@ STATIC_DOCS = \
 EXTRA_DIST = \
        file-boilerplate.c \
        $(STATIC_DOCS) \
-       $(MAN_IN_FILES) $(man_MANS)
+       $(MAN_IN_FILES)
 
 HTML_FILES=                                    \
        dbus-faq.html                           \