* man/local.mk (distclean-local): Remove $(ALL_MANS) when doing
a VPATH build. If it's not done, generated manpages can be left
around in the build directory after a "make distclean", causing
failures in "make distcheck".
# the manpages must be generated before the distdir is created and filled.
$(EXTRA_MANS): $(all_programs)
+# This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
+# Without this, "make distcheck" might fail.
+distclean-local:
+ test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
+
# Dependencies common to all man pages. Updated below.
mandeps =