[Top][All Lists]

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

Re: Patch for Bison 3.1 and VC2015

From: Akim Demaille
Subject: Re: Patch for Bison 3.1 and VC2015
Date: Mon, 29 Oct 2018 20:26:17 +0100

Hi Paul,

> diff --git a/src/getargs.c b/src/getargs.c
> index 5696c35f..95c681b5 100644
> --- a/src/getargs.c
> +++ b/src/getargs.c
> @@ -360,6 +360,8 @@ FEATURE is a list of comma separated words that can 
> include:\n\
>        fputs (_("General help using GNU software: "
>                 "<>.\n"),
>               stdout);
> +
> +#if (defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__
>        /* Don't output this redundant message for English locales.
>           Note we still output for 'C' so that it gets included in the
>           man page.  */
> @@ -372,6 +374,7 @@ FEATURE is a list of comma separated words that can 
> include:\n\
>             email address.  */
>          fputs (_("Report translation bugs to "
>                   "<>.\n"), stdout);
> +#endif
>        fputs (_("For complete documentation, run: info bison.\n"), stdout);
>      }

This has a nasty side effect: I’m not developing on a glibc system, so
this piece of code is disabled for me, so I don’t get this message
in - -help.  So this line doesn’t show in (given to help2man
to get bison.1) in the tarballs I make.

But if the user is on a glibc system, then will differ, and
help2man will be called, although it is not a requirement for Bison.

I was awaiting for more confirmations that Bison 3.2 is ready, and I
don’t want to wait any further, so I have installed this as a workaround
for 3.2.  But if you have better ideas, feel free to change it after
the release.


commit a9d6e16e0a8c581e3192c156918d7f47bff889bd
Author: Akim Demaille <address@hidden>
Date:   Mon Oct 29 19:59:23 2018 +0100

    build: don't depend on the libc to generate
    The "Report translation bugs to..." part of --help is issued only on
    glibc systems.  So if the tarball is not wrapped on such a system, and
    used on such a system (or the converse), then will differ
    on the user's system, and help2man will be called to update bison.1.
    But help2man should not be a requirement.
    Reported by Alexandre Duret-Lutz.
    * doc/ (doc/ Remove the possible doc about
    translation bugs.
    Pass LC_ALL=C, as reported in src/getargs.c's usage().
    (doc/cross-options.texi): Use instead of calling bison

diff --git a/doc/ b/doc/
index 29955a53..fc3b66f8 100644
--- a/doc/
+++ b/doc/
@@ -42,8 +42,8 @@ $(CROSS_OPTIONS_TEXI): doc/ $(CROSS_OPTIONS_PL)
 # diff in the next run.  Note that $@ might not exist yet.
        $(AM_V_GEN){ test ! -f $@ || cat $@; } >address@hidden
        $(AM_V_at)test ! -f address@hidden || rm -f address@hidden
-       $(AM_V_at)src/bison$(EXEEXT) --help |                            \
-         $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l 
+       $(AM_V_at)$(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l \
+         <$(top_srcdir)/doc/ >address@hidden
        $(AM_V_at)diff -u address@hidden address@hidden || true
        $(AM_V_at)mv address@hidden $@
@@ -66,7 +66,7 @@ doc/refcard.pdf: doc/refcard.tex
 # Some of our targets (cross-option.texi, bison.1) use "bison --help".
 # Since we want to ship the generated file to avoid additional
-# requirements over the user environment, we used not depend on
+# requirements over the user environment, we used to not depend on
 # src/bison itself, but on src/getargs.c and other files.  Yet, we
 # need "bison --help" to work to make help2man happy, so we used to
 # include "make src/bison" in the commands.  Then we may have a
@@ -87,8 +87,11 @@ EXTRA_DIST += $(top_srcdir)/doc/
 MAINTAINERCLEANFILES += $(top_srcdir)/doc/
 $(top_srcdir)/doc/ src/bison$(EXEEXT)
-       $(AM_V_GEN)src/bison$(EXEEXT) --version >doc/
-       $(AM_V_at) src/bison$(EXEEXT) --help   >>doc/
+       $(AM_V_GEN)LC_ALL=C src/bison$(EXEEXT) --version >doc/
+       $(AM_V_at) LC_ALL=C src/bison$(EXEEXT) --help | \
+## Avoid variations in the output depending on whether we are
+## on a glibc system.
+         sed '/translation bugs/d'  >>doc/
        $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/ $@

reply via email to

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