]> git.saurik.com Git - bison.git/commitdiff
build: don't try to generate docs when cross-compiling
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 29 Aug 2014 21:36:20 +0000 (00:36 +0300)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 5 Jan 2015 11:27:27 +0000 (12:27 +0100)
When cross-compiling don't run the generated bison to update the docs.
Reported by Aaro Koskinen.
<http://lists.gnu.org/archive/html/bison-patches/2014-03/msg00000.html>

* configure.ac (CROSS_COMPILING): New.
* doc/local.mk: Use it.

THANKS
configure.ac
doc/local.mk

diff --git a/THANKS b/THANKS
index 096e5edf4a57bef7d5d8424a6b5864d219a87b2c..2436f0048dede0b3f6324750171bd9e4be4a7856 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,6 +1,7 @@
 Bison was originally written by Robert Corbett.  It would not be what
 it is today without the invaluable help of these people:
 
+Aaro Koskinen             aaro.koskinen@iki.fi
 Аскар Сафин               safinaskar@mail.ru
 Airy Andre                Airy.Andre@edf.fr
 Akim Demaille             akim@lrde.epita.fr
index 7abe35c938d74320c4a33ae8ba7af7ab9c7136d6..559b50547d6f6e6a658c21e19884b8f23b5ea073 100644 (file)
@@ -237,6 +237,9 @@ case $VALGRIND:$host_os in
     ;;
 esac
 
+# Whether we cannot run the compiled bison.
+AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
+
 AM_MISSING_PROG([AUTOM4TE], [autom4te])
 # Needed by tests/atlocal.in.
 AC_SUBST([GCC])
index c55f941eb292a83027e5327fbf8eb328a803e137..e92ea71531278db830ee612285cb0ba3c2a9fd48 100644 (file)
@@ -85,11 +85,13 @@ doc/refcard.pdf: doc/refcard.tex
 # repeated builds of bison.help.
 
 EXTRA_DIST += $(top_srcdir)/doc/bison.help
+if ! CROSS_COMPILING
 MAINTAINERCLEANFILES += $(top_srcdir)/doc/bison.help
 $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
        $(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp
        $(AM_V_at) src/bison$(EXEEXT) --help   >>doc/bison.help.tmp
        $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
+endif ! CROSS_COMPILING
 
 
 ## ----------- ##
@@ -106,7 +108,11 @@ remove_time_stamp = \
   sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
 
 # Depend on configure to get version number changes.
-$(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
+if ! CROSS_COMPILING
+MAN_DEPS = doc/bison.help doc/bison.x $(top_srcdir)/configure
+endif
+
+$(top_srcdir)/doc/bison.1: $(MAN_DEPS)
        $(AM_V_GEN)$(HELP2MAN)                  \
            --include=$(top_srcdir)/doc/bison.x \
            --output=$@.t src/bison$(EXEEXT)