[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: don't try to generate docs when cross-compiling
From: |
Aaro Koskinen |
Subject: |
Re: [PATCH] build: don't try to generate docs when cross-compiling |
Date: |
Wed, 7 Jan 2015 20:30:04 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi,
On Mon, Jan 05, 2015 at 01:07:27PM +0100, Akim Demaille wrote:
> Once validated by the build-farm, I plan to install the following
> commit, based on your proposal. Does that suit you?
That seems to look fine, many thanks.
A.
> commit a16074bb09740ac84c1d27bbf6733f4a054100ba
> Author: Akim Demaille <address@hidden>
> Date: Sat Aug 30 00:36:20 2014 +0300
>
> build: don't try to generate docs when cross-compiling
>
> 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.
>
> diff --git a/THANKS b/THANKS
> index 096e5ed..2436f00 100644
> --- 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 address@hidden
> Аскар Сафин address@hidden
> Airy Andre address@hidden
> Akim Demaille address@hidden
> diff --git a/configure.ac b/configure.ac
> index 7abe35c..559b505 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -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])
> diff --git a/doc/local.mk b/doc/local.mk
> index c55f941..e92ea71 100644
> --- a/doc/local.mk
> +++ b/doc/local.mk
> @@ -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 \
> address@hidden src/bison$(EXEEXT)
>