mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
13
doc/local.mk
13
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 $@; } >$@~
|
||||
$(AM_V_at)test ! -f $@.tmp || rm -f $@.tmp
|
||||
$(AM_V_at)src/bison$(EXEEXT) --help | \
|
||||
$(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
|
||||
$(AM_V_at)$(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l \
|
||||
<$(top_srcdir)/doc/bison.help >$@.tmp
|
||||
$(AM_V_at)diff -u $@~ $@.tmp || true
|
||||
$(AM_V_at)mv $@.tmp $@
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user