summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2018-10-07 08:25:21 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-04-23 19:28:08 +0200
commita4d33cdf48511a81a3311f4c2f618099d861c746 (patch)
tree4d5b9d0a976f46aaf03f663839ff8b8bf192a317
parenta992a3cb9e5687a303ca3eba2b3f7afaea91ec5b (diff)
downloadbison-a4d33cdf48511a81a3311f4c2f618099d861c746.tar.gz
gnulib: let it use its own PO domain
See https://www.gnu.org/software/gnulib/manual/html_node/Localization.html. * bootstrap.conf: Create gnulib-po. * Makefile.am, configure.ac: Use it. * po/POTFILES.in: Remove files now in gnulib. * src/main.c: Open the bison-gnulib domain.
-rw-r--r--Makefile.am2
-rw-r--r--TODO8
-rw-r--r--bootstrap.conf2
-rw-r--r--configure.ac1
m---------gnulib0
-rw-r--r--po/POTFILES.in12
-rw-r--r--src/main.c7
7 files changed, 7 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am
index 673501ee..3c4c8765 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = po runtime-po .
+SUBDIRS = po runtime-po gnulib-po .
# Files installed for use by Automake.
aclocaldir = @aclocaldir@
diff --git a/TODO b/TODO
index f7766862..2264c8f7 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,5 @@
* Bison 3.4
** use gettext-h in gnulib instead of gettext
-** use gnulib-po
-For some reason, according to syntax-check, we have to keep getopt.c in
-POTIFILES.in, but not bitset/stats.c, although both come from gnulib. But
-bitset/stats.c is a symlink, not getopt.c. This is fishy and should be
-fixed.
-
-Meanwhile, bitset/stats.c is removed from the set of translations, which is
-not too much of a problem as users are not expected to see this.
** bad diagnostics
%token <val> NUM
diff --git a/bootstrap.conf b/bootstrap.conf
index c32acb59..6d1f9a44 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -85,7 +85,7 @@ excluded_files='
m4/visibility.m4
'
-gnulib_tool_option_extras='--symlink --conditional-dependencies --makefile-name=gnulib.mk'
+gnulib_tool_option_extras='--symlink --conditional-dependencies --makefile-name=gnulib.mk --po-base=gnulib-po --po-domain=bison'
bootstrap_post_import_hook()
{
diff --git a/configure.ac b/configure.ac
index 507e6f64..7520ab38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,6 +251,7 @@ AM_WITH_DMALLOC
AM_GNU_GETTEXT([external], [need-ngettext])
AM_GNU_GETTEXT_VERSION([0.18])
BISON_I18N
+AC_CONFIG_FILES([gnulib-po/Makefile.in])
# Internationalized parsers.
AC_CONFIG_FILES([runtime-po/Makefile.in])
diff --git a/gnulib b/gnulib
-Subproject d6af24178ca4b952327226ad64a4daad8e19109
+Subproject 14a920195eee84550cfdd7a161896363d4796a2
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5028e179..97f2473c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,15 +17,3 @@ src/scan-code.l
src/scan-gram.l
src/scan-skel.l
src/symtab.c
-
-lib/argmatch.c
-lib/closeout.c
-lib/error.c
-lib/getopt.c
-lib/obstack.c
-lib/spawn-pipe.c
-lib/quotearg.c
-lib/timevar.c
-lib/w32spawn.h
-lib/wait-process.c
-lib/xalloc-die.c
diff --git a/src/main.c b/src/main.c
index 8b48ad27..3c51eafe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -66,11 +66,12 @@ main (int argc, char *argv[])
{
char *cp = NULL;
char const *localedir = relocate2 (LOCALEDIR, &cp);
- (void) bindtextdomain (PACKAGE, localedir);
- (void) bindtextdomain ("bison-runtime", localedir);
+ bindtextdomain ("bison", localedir);
+ bindtextdomain ("bison-gnulib", localedir);
+ bindtextdomain ("bison-runtime", localedir);
free (cp);
}
- (void) textdomain (PACKAGE);
+ textdomain ("bison");
{
char const *cp = getenv ("LC_CTYPE");