bison-patches
[Top][All Lists]
Advanced

[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: "
>                 "<http://www.gnu.org/gethelp/>.\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 "
>                   "<http://translationproject.org/team/>.\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 bison.help (given to help2man
to get bison.1) in the tarballs I make.

But if the user is on a glibc system, then bison.help 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.

Cheers!



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 bison.help
    
    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 bison.help 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/local.mk (doc/bison.help): Remove the possible doc about
    translation bugs.
    Pass LC_ALL=C, as reported in src/getargs.c's usage().
    (doc/cross-options.texi): Use bison.help instead of calling bison
    --help.

diff --git a/doc/local.mk b/doc/local.mk
index 29955a53..fc3b66f8 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -42,8 +42,8 @@ $(CROSS_OPTIONS_TEXI): doc/bison.help $(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 
>address@hidden
+       $(AM_V_at)$(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l \
+         <$(top_srcdir)/doc/bison.help >address@hidden
        $(AM_V_at)diff -u address@hidden address@hidden || true
        $(AM_V_at)mv address@hidden $@
 MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
@@ -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/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_GEN)LC_ALL=C src/bison$(EXEEXT) --version >doc/bison.help.tmp
+       $(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/bison.help.tmp
        $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
 endif ! CROSS_COMPILING
 




reply via email to

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