There's a circular build dependency between texinfo and help2man
now.  Allow operating system builders to manually break the cycle
by disabling man page generation in texinfo.

>From 2fc37f3c696d7ffa9a3dbf6c6f5e1b10f81753a8 Mon Sep 17 00:00:00 2001
From: Colin Walters <[email protected]>
Date: Mon, 9 Jan 2012 13:13:57 -0500
Subject: [PATCH] build: Add --disable-man-pages option

There's a circular build dependency between texinfo and help2man
now.  Allow operating system builders to manually break the cycle
by disabling man page generation in texinfo.
---
 configure.ac    |    8 +++++++-
 doc/Makefile.am |   11 ++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3ca8b64..31f0c7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,13 @@ gl_INIT
 
 # Since we make a helper library.
 AC_PROG_RANLIB
-AM_MISSING_PROG(HELP2MAN, help2man)
+AC_ARG_ENABLE([man-pages],
+  [AS_HELP_STRING([--enable-man-pages],
+     [Build man pages with help2man])],, enable_man_pages=yes)
+AM_CONDITIONAL(ENABLE_MAN_PAGES, test x$enable_man_pages = xyes)
+if test x$enable_man_pages = xyes; then
+   AM_MISSING_PROG(HELP2MAN, help2man)
+fi
 
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 54c490e..7ce2cee 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -14,8 +14,10 @@
 info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
 DISTCLEANFILES = texinfo texinfo-* info*.info*
 
+if ENABLE_MAN_PAGES
 man_MANS = info.1 infokey.1 install-info.1 makeinfo.1 texindex.1  \
            info.5 texinfo.5
+endif
 
 # Use the programs built in our distribution, taking account of possible
 # cross-compiling.
@@ -36,9 +38,14 @@ refcard_files = refcard/Makefile refcard/txicmdcheck \
 # Include our texinfo.tex, not Automake's.
 EXTRA_DIST = epsf.tex texinfo.tex \
              fdl.texi \
-	     $(man_MANS) $(TXI_XLATE)
+	     $(TXI_XLATE)
 	     $(refcard_files)
 
+if ENABLE_MAN_PAGES
+EXTRA_DIST += $(man_MANS)
+endif
+
+
 if INSTALL_WARNINGS
 install-data-local:
 	@echo
@@ -108,7 +115,9 @@ $(srcdir)/texindex.1: $(util_srcdir)/texindex.c $(common_mandeps)
 ## texi2dvi.  ##
 ## ---------- ##
 
+if ENABLE_MAN_PAGES
 man_MANS += texi2dvi.1 texi2pdf.1 pdftexi2dvi.1
+endif
 util_srcdir = $(top_srcdir)/util
 
 # Do not depend on the current user's settings.
-- 
1.7.6.4

Reply via email to