On 2024-12-02 I wrote: > This patch syncs the 'gettext' module with gettext 0.23.
But I forgot to update gnulib-tool accordingly. Done like this: 2024-12-06 Bruno Haible <br...@clisp.org> Update build-aux/po/Makefile.in.in. Reported by Assaf Gordon in <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html> and by Reuben Thomas <r...@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00020.html>. * build-aux/po/Makefile.in.in: Sync from GNU gettext 0.23. Fixes: - Don't fail when 'make' is used with option -j. - Pass the option --quiet to 'msgmerge'. - Simplify by assuming that 'sed' groks comments. * build-aux/po/remove-potcdate.sed: Renamed from build-aux/po/remove-potcdate.sin. * doc/gnulib.texi (Developer tools): Update file list. * gnulib-tool.sh (func_import): Copy remove-potcdate.sed instead of remove-potcdate.sin. * pygnulib/GLImport.py (GLImport.execute): Likewise. diff --git a/build-aux/po/Makefile.in.in b/build-aux/po/Makefile.in.in index 4b966931e9..acff1e1bee 100644 --- a/build-aux/po/Makefile.in.in +++ b/build-aux/po/Makefile.in.in @@ -1,14 +1,14 @@ # Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-2000 Ulrich Drepper <drep...@gnu.ai.mit.edu> -# Copyright (C) 2000-2020, 2024 Free Software Foundation, Inc. +# Copyright (C) 2000-2024 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # -# Origin: gettext-0.21 -GETTEXT_MACRO_VERSION = 0.20 +# Origin: gettext-0.23 +GETTEXT_MACRO_VERSION = 0.22 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -68,7 +68,7 @@ POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ -DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +DISTFILES.common = Makefile.in.in remove-potcdate.sed \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ @@ -94,7 +94,7 @@ all: all-@USE_NLS@ .SUFFIXES: -.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update +.SUFFIXES: .po .gmo .sed .nop .po-create .po-update # The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. # The GNU Coding Standards say in @@ -113,6 +113,7 @@ all: all-@USE_NLS@ $(GMOFILES): $(srcdir)/$(DOMAIN).pot .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ cd $(srcdir) && \ @@ -122,10 +123,6 @@ $(GMOFILES): $(srcdir)/$(DOMAIN).pot mv t-$${lang}.gmo $${lang}.gmo && \ rm -f $${lang}.1po -.sin.sed: - sed -e '/^#/d' $< > t-$@ - mv t-$@ $@ - all-yes: $(srcdir)/stamp-po all-no: @@ -170,7 +167,7 @@ $(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ @@ -222,8 +219,8 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed || exit 1; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ - sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ - sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + sed -f $(srcdir)/remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f $(srcdir)/remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ @@ -247,16 +244,19 @@ $(POFILES): $(POFILESDEPS) @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + 0.1[1-5] | 0.1[1-5].*) \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ @@ -394,7 +394,6 @@ info dvi ps pdf html tags TAGS ctags CTAGS ID: install-dvi install-ps install-pdf install-html: mostlyclean: - rm -f remove-potcdate.sed rm -f $(srcdir)/stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o @@ -464,15 +463,17 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + 0.1[1-5] | 0.1[1-5].*) \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ @@ -508,3 +509,9 @@ force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# This Makefile contains rules which don't work with parallel make, +# namely dist2. +# See <https://lists.gnu.org/archive/html/bug-gettext/2022-06/msg00022.html>. +# So, turn off parallel execution in this Makefile. +.NOTPARALLEL: diff --git a/build-aux/po/remove-potcdate.sin b/build-aux/po/remove-potcdate.sed similarity index 91% rename from build-aux/po/remove-potcdate.sin rename to build-aux/po/remove-potcdate.sed index 1fed90e9dc..8c70dfbf14 100644 --- a/build-aux/po/remove-potcdate.sin +++ b/build-aux/po/remove-potcdate.sed @@ -1,7 +1,7 @@ # Sed script that removes the POT-Creation-Date line in the header entry # from a POT file. # -# Copyright (C) 2002, 2020-2024 Free Software Foundation, Inc. +# Copyright (C) 2002 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, diff --git a/doc/gnulib.texi b/doc/gnulib.texi index 75b4df60c6..b7a6110b55 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -8365,7 +8365,7 @@ top-level directory of your package, you need to customize it. @item build-aux/po/Makefile.in.in -@itemx build-aux/po/remove-potcdate.sin +@itemx build-aux/po/remove-potcdate.sed These are auxiliary files used by @code{bootstrap}. You don't have to copy them yourself; @code{bootstrap} will do that. @end table diff --git a/gnulib-tool.sh b/gnulib-tool.sh index d4f8792898..2a5949f584 100755 --- a/gnulib-tool.sh +++ b/gnulib-tool.sh @@ -5798,7 +5798,7 @@ s,//*$,/,' # Create po/ directory. if test -n "$pobase"; then # Create po makefile and auxiliary files. - for file in Makefile.in.in remove-potcdate.sin; do + for file in Makefile.in.in remove-potcdate.sed; do func_dest_tmpfilename $pobase/$file func_lookup_file build-aux/po/$file cat "$lookedup_file" > "$tmpfile" diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 5d60bd908d..7747761900 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -1081,7 +1081,7 @@ def execute(self, filetable: GLFileTable, transformers: dict[str, tuple[re.Patte filesystem = GLFileSystem(self.config) if pobase: # Create po makefile and auxiliary files. - for file in ['Makefile.in.in', 'remove-potcdate.sin']: + for file in ['Makefile.in.in', 'remove-potcdate.sed']: tmpfile = assistant.tmpfilename(joinpath(pobase, file)) path = joinpath('build-aux', 'po', file) lookedup, flag = filesystem.lookup(path)