build: use gettext-h

We were using the gnulib's gettext module with tricks in
bootstrap.conf to avoid useless files.  Instead, use gnulib's
gettext-h module.

* .travis.yml: Force Gettext 0.18.3 on Trusty.
* bootstrap.conf: Use gettext-h instead of gettext.
(excluded_files): Remove.
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.
This commit is contained in:
Akim Demaille
2019-04-24 23:14:23 +02:00
parent 571447afe8
commit f5a4e279bc
6 changed files with 9 additions and 24 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/ABOUT-NLS~
*.eps
*.log
*.o

View File

@@ -290,7 +290,7 @@ matrix:
env:
# No versioned name installed, but beware that Travis installs
# a more modern clang earlier in the default PATH.
- MATRIX_EVAL='CC=/usr/bin/clang && CXX=/usr/bin/clang++'
- MATRIX_EVAL='CC=/usr/bin/clang && CXX=/usr/bin/clang++ && GETTEXT_VERSION=0.18.3'
- name: "Clang 3.3"
os: linux
@@ -302,7 +302,7 @@ matrix:
- clang-3.3
env:
# See comment for 3.4.
- MATRIX_EVAL='CC=/usr/bin/clang && CXX=/usr/bin/clang++'
- MATRIX_EVAL='CC=/usr/bin/clang && CXX=/usr/bin/clang++ && GETTEXT_VERSION=0.18.3'
before_install:
@@ -340,7 +340,10 @@ script:
# with `Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m`, which makes
# the test suite fail.
- unset _JAVA_OPTIONS
- if [[ $GETTEXT_VERSION ]]; then sed -i -re "s/(AM_GNU_GETTEXT_VERSION).*/\1([$GETTEXT_VERSION])/" configure.ac; fi
- ./bootstrap
# For some reason, gnulib-po/Makefile.in.in is about Gettext 0.19, so it will break here. Override it.
- if [[ $GETTEXT_VERSION ]]; then autopoint --force; fi
- if [[ -f ~/.bashrc ]]; then source ~/.bashrc; fi
- ./configure --enable-gcc-warnings CC="$CC" CXX="$CXX" $CONFIGUREFLAGS || { cat config.log && false; }
- make -j2 $MAKE_ARGS

3
TODO
View File

@@ -1,6 +1,4 @@
* Bison 3.4
** use gettext-h in gnulib instead of gettext
** bad diagnostics
%token <val> NUM
%type <val> expr term fact
@@ -33,6 +31,7 @@ considered deprecated: %printer is superior.
** glr.cc
move glr.c into the yy namespace
** improve syntax errors (UTF-8, internationalization)
Bison depends on the current locale. For instance:

View File

@@ -24,7 +24,7 @@ gnulib_modules='
dirname
error extensions fdl fopen-safer
getopt-gnu
gettext git-version-gen gitlog-to-changelog
gettext-h git-version-gen gitlog-to-changelog
gpl-3.0 hash inttypes isnan javacomp-script
javaexec-script
ldexpl
@@ -68,23 +68,6 @@ XGETTEXT_OPTIONS_RUNTIME=$XGETTEXT_OPTIONS'\\\
--keyword=YY_ \\\
'
# Gettext supplies these files, but we don't need them since
# we don't have an intl subdirectory.
excluded_files='
m4/glibc2.m4
m4/intdiv0.m4
m4/intl.m4
m4/intldir.m4
m4/intmax.m4
m4/lcmessage.m4
m4/lock.m4
m4/longdouble.m4
m4/signed.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/visibility.m4
'
gnulib_tool_option_extras='--symlink --conditional-dependencies --makefile-name=gnulib.mk --po-base=gnulib-po --po-domain=bison'
bootstrap_post_import_hook()

View File

@@ -249,7 +249,7 @@ AM_WITH_DMALLOC
# We use gnulib, which is only guaranteed to work properly with the
# latest Gettext.
AM_GNU_GETTEXT([external], [need-ngettext])
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT_VERSION([0.19])
BISON_I18N
AC_CONFIG_FILES([gnulib-po/Makefile.in])

1
m4/.gitignore vendored
View File

@@ -57,7 +57,6 @@
/iconv.m4
/include_next.m4
/intdiv0.m4
/intl-thread-locale.m4
/intl.m4
/intldir.m4
/intlmacosx.m4