]> Savannah Git Hosting - gnulib.git/commitdiff
Update build-aux/po/Makefile.in.in.
authorBruno Haible <bruno@clisp.org>
Fri, 6 Dec 2024 08:16:37 +0000 (09:16 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 6 Dec 2024 08:16:37 +0000 (09:16 +0100)
Reported by Assaf Gordon in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html>
and by Reuben Thomas <rrt@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.

ChangeLog
build-aux/po/Makefile.in.in
build-aux/po/remove-potcdate.sed [new file with mode: 0644]
build-aux/po/remove-potcdate.sin [deleted file]
doc/gnulib.texi
gnulib-tool.sh
pygnulib/GLImport.py

index 800faf5fe0e220990b33d7eb91b614d94226694c..82de766091960f50162e9a8139464c0c55c9fb3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2024-12-06  Bruno Haible  <bruno@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 <rrt@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.
+
 2024-12-05  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.py: Fix invalid use of cache.
index 4b966931e967bd10c3383a1574363ee6e1cac33b..acff1e1beebf1c263987dd0c41ffd52e73525e6f 100644 (file)
@@ -1,14 +1,14 @@
 # Makefile for PO directory in any package using GNU gettext.
 # Copyright (C) 1995-2000 Ulrich Drepper <drepper@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.sed b/build-aux/po/remove-potcdate.sed
new file mode 100644 (file)
index 0000000..8c70dfb
--- /dev/null
@@ -0,0 +1,25 @@
+# Sed script that removes the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# 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,
+# without any warranty.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/build-aux/po/remove-potcdate.sin b/build-aux/po/remove-potcdate.sin
deleted file mode 100644 (file)
index 1fed90e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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.
-# 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.
-#
-# The distinction between the first and the following occurrences of the
-# pattern is achieved by looking at the hold space.
-/^"POT-Creation-Date: .*"$/{
-x
-# Test if the hold space is empty.
-s/P/P/
-ta
-# Yes it was empty. First occurrence. Remove the line.
-g
-d
-bb
-:a
-# The hold space was nonempty. Following occurrences. Do nothing.
-x
-:b
-}
index 75b4df60c648dd60df625736f59117bf3c5d37a7..b7a6110b55519ac72d565153ed577aa781010e2c 100644 (file)
@@ -8365,7 +8365,7 @@ This is the template configuration file.  After copying it into the
 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
index d4f879289847ba46432536c5c4388883651dd35e..2a5949f5844b140a0c221e241cdd8e251a2de0ea 100755 (executable)
@@ -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"
index 5d60bd908d59ccceabbcbcab1fcfd5fd50234e14..7747761900bb1882d061f9f2376c345a2c3bdcb6 100644 (file)
@@ -1081,7 +1081,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         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)