[2/2] *: suppress xgettext 0.22 charset name error
Commit Message
bfd.po: warning: Charset "CHARSET" is not a portable encoding name.
Message conversion to user's charset might not work.
/usr/bin/xgettext: present charset "CHARSET" is not a portable encoding name
As Bruno Haible <bruno@clisp.org> suggested:
> > Perhaps it'd be good to use -o to suppress this warning anyway
>
> Yes, regardless of gettext version, you profit of the .pot suffix handling by
> replacing
>
> --default-domain=$(PACKAGE)
>
> with
>
> -o $(PACKAGE)-tmp.pot
>
> (twice) and
>
> < $(PACKAGE).po > $@-t
>
> with
>
> < $(PACKAGE)-tmp.pot > $@-t
bfd/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file, to suppress xgettext checking charset names.
binutils/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file to suppress xgettext checking charset names.
gas/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file to suppress xgettext checking charset names.
gold/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file to suppress xgettext checking charset names.
gprof/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file to suppress xgettext checking charset names.
ld/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file to suppress xgettext checking charset names.
libctf/ChangeLog:
* po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
temporary file to suppress xgettext checking charset names.
---
bfd/po/Make-in | 8 +++++---
binutils/po/Make-in | 5 +++--
gas/po/Make-in | 5 +++--
gdbsupport/Makefile.am | 1 +
gold/po/Make-in | 5 +++--
gprof/po/Make-in | 5 +++--
ld/po/Make-in | 8 +++++---
libctf/Makefile.am | 2 ++
opcodes/po/Make-in | 5 +++--
9 files changed, 28 insertions(+), 16 deletions(-)
Comments
On Sep 25 2023, Arsen Arsenović via Binutils wrote:
> libctf/ChangeLog:
>
> * po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
> temporary file to suppress xgettext checking charset names.
There is no po/Make-in in libctf.
> diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am
> index 00524e9a566..43aa670faf4 100644
> --- a/gdbsupport/Makefile.am
> +++ b/gdbsupport/Makefile.am
> @@ -19,6 +19,7 @@
>
> AUTOMAKE_OPTIONS = no-dist foreign
> ACLOCAL_AMFLAGS = -I . -I ../config
> +SUBDIRS =
>
> AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \
> -I../gnulib/import -I$(srcdir)/../gnulib/import \
Spurious change.
> diff --git a/libctf/Makefile.am b/libctf/Makefile.am
> index b1dbc2f6ba4..8c9f623f58c 100644
> --- a/libctf/Makefile.am
> +++ b/libctf/Makefile.am
> @@ -17,6 +17,8 @@
> # <http://www.gnu.org/licenses/>.
> #
>
> +SUBDIRS =
> +
> ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
>
> AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex
Likewise.
Andreas Schwab <schwab@suse.de> writes:
> On Sep 25 2023, Arsen Arsenović via Binutils wrote:
>
>> libctf/ChangeLog:
>>
>> * po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot
>> temporary file to suppress xgettext checking charset names.
>
> There is no po/Make-in in libctf.
Seems to have been an error when I was filling the changelog entries.
The libctf changelog should be:
* Makefile.am (SUBDIRS): Define to empty to suppress Automake
stating 'configure.ac: error: AM_GNU_GETTEXT used but SUBDIRS not
defined'
... which also covers your latter comment.
>
>> diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am
>> index 00524e9a566..43aa670faf4 100644
>> --- a/gdbsupport/Makefile.am
>> +++ b/gdbsupport/Makefile.am
>> @@ -19,6 +19,7 @@
>>
>> AUTOMAKE_OPTIONS = no-dist foreign
>> ACLOCAL_AMFLAGS = -I . -I ../config
>> +SUBDIRS =
>>
>> AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \
>> -I../gnulib/import -I$(srcdir)/../gnulib/import \
>
> Spurious change.
This has the same rationale as the libctf change above.
>> diff --git a/libctf/Makefile.am b/libctf/Makefile.am
>> index b1dbc2f6ba4..8c9f623f58c 100644
>> --- a/libctf/Makefile.am
>> +++ b/libctf/Makefile.am
>> @@ -17,6 +17,8 @@
>> # <http://www.gnu.org/licenses/>.
>> #
>>
>> +SUBDIRS =
>> +
>> ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
>>
>> AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex
>
> Likewise.
These directories utilize ZW_GNU_GETTEXT_SISTER_DIR to get information
about where gettext is despite never having any translations of their
own, leading to the Automake warning above.
Apologies for the ChangeLog confusion, it must've been late when I was
splitting and merging commits, and so I mislabeled and mismerged some
changes. I can split this patch into two if you agree, and fix the
libctf ChangeLog entry.
Thanks, have a lovely day.
@@ -93,19 +93,21 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot \
+ --default-domain=$(PACKAGE) \
--directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/SRC-POTFILES.in
- $(XGETTEXT) --default-domain=$(PACKAGE) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot \
+ --default-domain=$(PACKAGE) \
--directory=.. \
--directory=. \
--add-comments --keyword=_ --keyword=N_ \
--join-existing \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/BLD-POTFILES.in
- sed -e '/^#:/s,$(top_srcdir)/,,g' < $(PACKAGE).po > $@-t
+ sed -e '/^#:/s,$(top_srcdir)/,,g' < $(PACKAGE)-tmp.pot > $@-t
mv -f $@-t $@
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
@@ -87,12 +87,13 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=$(top_srcdir) \
+ --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE)-tmp.pot $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
@@ -87,12 +87,13 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=$(top_srcdir) \
+ --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE)-tmp.pot $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
@@ -19,6 +19,7 @@
AUTOMAKE_OPTIONS = no-dist foreign
ACLOCAL_AMFLAGS = -I . -I ../config
+SUBDIRS =
AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \
-I../gnulib/import -I$(srcdir)/../gnulib/import \
@@ -87,12 +87,13 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=$(top_srcdir) \
+ --default-domain=$(PACKAGE) \
--add-comments -C --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE)-tmp.pot $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
@@ -87,12 +87,13 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=$(top_srcdir) \
+ --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE)-tmp.pot $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
@@ -89,17 +89,19 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=$(top_srcdir) \
+ --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/SRC-POTFILES.in
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=.. \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=.. \
+ --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ \
--join-existing \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/BLD-POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE)-tmp.pot $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
@@ -17,6 +17,8 @@
# <http://www.gnu.org/licenses/>.
#
+SUBDIRS =
+
ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex
@@ -87,12 +87,13 @@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ $(XGETTEXT) -o $(PACKAGE)-tmp.pot --directory=$(top_srcdir) \
+ --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ \
--msgid-bugs-address=https://sourceware.org/bugzilla/ \
--files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE)-tmp.pot $(srcdir)/$(PACKAGE).pot
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot