[Top][All Lists]

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

[PATCH RESEND] build: don't try to generate docs when cross-compiling

From: Aaro Koskinen
Subject: [PATCH RESEND] build: don't try to generate docs when cross-compiling
Date: Sat, 30 Aug 2014 00:36:20 +0300

We usually cannot run the just created binaries when cross-compiling,
so in that case ignore the documentation dependencies. The use case
for this are GNU distributions, who just want to build the vanilla
release tar ball for multiple architectures. In such cases relying
on the pre-generated documentation should be fine.

* add automake conditional for cross-compiling
* doc/ ignore dependencies when cross-compiling
--- |  5 +++++
 doc/ | 16 ++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ b/
index 2658d73..05aeb5b 100644
--- a/
+++ b/
@@ -237,6 +237,11 @@ case $VALGRIND:$host_os in
+AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes)
+if test "$cross_compiling" = "yes"; then
+  AC_MSG_WARN([documentation cannot be generated when cross-compiling])
 AM_MISSING_PROG([AUTOM4TE], [autom4te])
 # Needed by tests/
diff --git a/doc/ b/doc/
index 4fe0859..3a7e127 100644
--- a/doc/
+++ b/doc/
@@ -84,9 +84,15 @@ doc/refcard.pdf: doc/refcard.tex
 # compilations of cross-option.texi and bison.1.  At the cost of
 # repeated builds of
 EXTRA_DIST += $(top_srcdir)/doc/
 MAINTAINERCLEANFILES += $(top_srcdir)/doc/
-$(top_srcdir)/doc/ src/bison$(EXEEXT)
+$(top_srcdir)/doc/ $(HELP_DEPS)
        $(AM_V_GEN)src/bison$(EXEEXT) --version >doc/
        $(AM_V_at) src/bison$(EXEEXT) --help   >>doc/
        $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/ $@
@@ -106,7 +112,13 @@ remove_time_stamp = \
   sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
 # Depend on configure to get version number changes.
-$(top_srcdir)/doc/bison.1: doc/ doc/bison.x $(top_srcdir)/configure
+MAN_DEPS=doc/ doc/bison.x $(top_srcdir)/configure
+$(top_srcdir)/doc/bison.1: $(MAN_DEPS)
        $(AM_V_GEN)$(HELP2MAN)                  \
            --include=$(top_srcdir)/doc/bison.x \
            address@hidden src/bison$(EXEEXT)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]