bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* build-aux/po/Makefile.in.in needs updating
@ 2023-02-04 23:37 Reuben Thomas
  2023-02-05  2:26 ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Reuben Thomas @ 2023-02-04 23:37 UTC (permalink / raw)
  To: bug-gnulib

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

Bruno pointed out to me that there's a bug fixed in the Makfile.in.in from
gettext 0.20.2, which postdates the 0.20 version found in gnulib. (The bug
is that the Makefile.in.in has prerequisites on suffix rules, which are
ignored.)

-- 
https://rrt.sc3d.org

[-- Attachment #2: Type: text/html, Size: 654 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: build-aux/po/Makefile.in.in needs updating
  2023-02-04 23:37 build-aux/po/Makefile.in.in needs updating Reuben Thomas
@ 2023-02-05  2:26 ` Paul Eggert
  2023-02-05 16:24   ` Bruno Haible
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2023-02-05  2:26 UTC (permalink / raw)
  To: Reuben Thomas, bug-gnulib

On 2023-02-04 15:37, Reuben Thomas wrote:
> Bruno pointed out to me that there's a bug fixed in the Makfile.in.in from
> gettext 0.20.2, which postdates the 0.20 version found in gnulib. (The bug
> is that the Makefile.in.in has prerequisites on suffix rules, which are
> ignored.)

In Gnulib I'd normally run 'config/srclist-update <config/srclist.txt' 
to propagate stuff from other projects into Gnulib, but Bruno typically 
does Gettext-related stuff by hand so srclist-update doesn't do that.

I took a quick look at the differences between bleeding-edge Gettext 
Makefile.in.in and bleeding-edge Gnulib Makefile.in.in and decided that 
Bruno was a better judge for this sort of thing....


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: build-aux/po/Makefile.in.in needs updating
  2023-02-05  2:26 ` Paul Eggert
@ 2023-02-05 16:24   ` Bruno Haible
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Haible @ 2023-02-05 16:24 UTC (permalink / raw)
  To: Reuben Thomas, bug-gnulib; +Cc: Paul Eggert

Reuben Thomas wrote:
> > Bruno pointed out to me that there's a bug fixed in the Makfile.in.in from
> > gettext 0.20.2, which postdates the 0.20 version found in gnulib. (The bug
> > is that the Makefile.in.in has prerequisites on suffix rules, which are
> > ignored.)

Done. See below.

Paul Eggert wrote:
> In Gnulib I'd normally run 'config/srclist-update <config/srclist.txt' 
> to propagate stuff from other projects into Gnulib, but Bruno typically 
> does Gettext-related stuff by hand so srclist-update doesn't do that.

I do it by hand because it should be synced with the latest GNU gettext
release that is compatible with the current 'gettext' module. Syncing
with the contents of the git repo would bear major risks.


2023-02-05  Bruno Haible  <bruno@clisp.org>

	Update build-aux/po/Makefile.in.in.
	Reported 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.21.1.
	Fixes:
	- In the .po -> .gmo rules, consider the newest changes to the POT file.
	- Emit a warning when creating a tarball without POT file.

diff --git a/build-aux/po/Makefile.in.in b/build-aux/po/Makefile.in.in
index c2cf0491b9..6b25f0d916 100644
--- a/build-aux/po/Makefile.in.in
+++ b/build-aux/po/Makefile.in.in
@@ -1,13 +1,13 @@
 # Makefile for PO directory in any package using GNU gettext.
 # Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
-# Copyright (C) 2000-2023 Free Software Foundation, Inc.
+# Copyright (C) 2000-2020 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.20
+# Origin: gettext-0.21
 GETTEXT_MACRO_VERSION = 0.20
 
 PACKAGE = @PACKAGE@
@@ -90,6 +90,9 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
 
 # Makevars gets inserted here. (Don't remove this line!)
 
+all: all-@USE_NLS@
+
+
 .SUFFIXES:
 .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
 
@@ -107,7 +110,8 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
 # the .pot file. This eliminates the need to update the .po files when the
 # .pot file has changed, which would be troublesome if the .po files are put
 # under version control.
-.po.gmo: $(srcdir)/$(DOMAIN).pot
+$(GMOFILES): $(srcdir)/$(DOMAIN).pot
+.po.gmo:
 	@lang=`echo $* | sed -e 's,.*/,,'`; \
 	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"; \
@@ -123,8 +127,6 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
 	mv t-$@ $@
 
 
-all: all-@USE_NLS@
-
 all-yes: $(srcdir)/stamp-po
 all-no:
 
@@ -413,12 +415,17 @@ dist distdir:
 	@$(MAKE) dist2
 # This is a separate target because 'update-po' must be executed before.
 dist2: $(srcdir)/stamp-po $(DISTFILES)
-	dists="$(DISTFILES)"; \
+	@dists="$(DISTFILES)"; \
 	if test "$(PACKAGE)" = "gettext-tools"; then \
 	  dists="$$dists Makevars.template"; \
 	fi; \
 	if test -f $(srcdir)/$(DOMAIN).pot; then \
 	  dists="$$dists $(DOMAIN).pot stamp-po"; \
+	else \
+	  case $(XGETTEXT) in \
+	    :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
+	    *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
+	  esac; \
 	fi; \
 	if test -f $(srcdir)/ChangeLog; then \
 	  dists="$$dists ChangeLog"; \





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-05 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-04 23:37 build-aux/po/Makefile.in.in needs updating Reuben Thomas
2023-02-05  2:26 ` Paul Eggert
2023-02-05 16:24   ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).