]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po: Make $(POFILES) target more robust.
authorBruno Haible <bruno@clisp.org>
Tue, 23 Oct 2018 22:19:53 +0000 (00:19 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Oct 2018 22:19:53 +0000 (00:19 +0200)
It was introduced on 2014-05-01.

* gettext-runtime/po/Makefile.in.in ($(POFILES)): Create POT file also when the
PO file does not yet exist. Fail if creation of the POT file fails.

gettext-runtime/po/Makefile.in.in

index ad3706cb202e49d7c29a58fcc3189025b81b5b71..acbb3d1ceb20ad4facfbe4befb4fdc53f887b71a 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for PO directory in any package using GNU gettext.
 # Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
-# Copyright (C) 2000-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2018 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -229,9 +229,9 @@ $(srcdir)/$(DOMAIN).pot:
 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
 # Note that a PO file is not touched if it doesn't need to be changed.
 $(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 \
-         test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
          echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
          cd $(srcdir) \