From: Bruno Haible Date: Sat, 11 Apr 2020 21:00:21 +0000 (+0200) Subject: po: Emit a warning when creating a tarball without POT file. X-Git-Tag: v0.21~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c941abf37236b2772ac5291e46b040f60d7dc134;p=thirdparty%2Fgettext.git po: Emit a warning when creating a tarball without POT file. * gettext-runtime/po/Makefile.in.in (dist2): Emit a warning when the POT file does not exist. * gettext-tools/examples/hello-*/po/Makefile.am (distdir1): Likewise. --- diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index de980e040..baa8e707f 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -415,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"; \ diff --git a/gettext-tools/examples/hello-c++-qt/po/Makefile.am b/gettext-tools/examples/hello-c++-qt/po/Makefile.am index 12ed7f846..5481307ce 100644 --- a/gettext-tools/examples/hello-c++-qt/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-qt/po/Makefile.am @@ -294,11 +294,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(QMFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am index aaf933b3a..dd5c9f7bc 100644 --- a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am @@ -359,11 +359,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-clisp/po/Makefile.am b/gettext-tools/examples/hello-clisp/po/Makefile.am index 3b5ad6b6a..89110a52c 100644 --- a/gettext-tools/examples/hello-clisp/po/Makefile.am +++ b/gettext-tools/examples/hello-clisp/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am index 061508d05..e5575aa0c 100644 --- a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am @@ -284,11 +284,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(RESOURCESDLLFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-csharp/po/Makefile.am b/gettext-tools/examples/hello-csharp/po/Makefile.am index 061508d05..e5575aa0c 100644 --- a/gettext-tools/examples/hello-csharp/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp/po/Makefile.am @@ -284,11 +284,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(RESOURCESDLLFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-gawk/po/Makefile.am b/gettext-tools/examples/hello-gawk/po/Makefile.am index 15f3a8e43..42da1e71a 100644 --- a/gettext-tools/examples/hello-gawk/po/Makefile.am +++ b/gettext-tools/examples/hello-gawk/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-guile/po/Makefile.am b/gettext-tools/examples/hello-guile/po/Makefile.am index a3ab72123..e8426223a 100644 --- a/gettext-tools/examples/hello-guile/po/Makefile.am +++ b/gettext-tools/examples/hello-guile/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-java-awt/po/Makefile.am b/gettext-tools/examples/hello-java-awt/po/Makefile.am index c9b83488c..6f500d522 100644 --- a/gettext-tools/examples/hello-java-awt/po/Makefile.am +++ b/gettext-tools/examples/hello-java-awt/po/Makefile.am @@ -246,11 +246,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPE distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am index c9b83488c..6f500d522 100644 --- a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am +++ b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am @@ -246,11 +246,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPE distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-java-swing/po/Makefile.am b/gettext-tools/examples/hello-java-swing/po/Makefile.am index c9b83488c..6f500d522 100644 --- a/gettext-tools/examples/hello-java-swing/po/Makefile.am +++ b/gettext-tools/examples/hello-java-swing/po/Makefile.am @@ -246,11 +246,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPE distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-java/po/Makefile.am b/gettext-tools/examples/hello-java/po/Makefile.am index c9b83488c..6f500d522 100644 --- a/gettext-tools/examples/hello-java/po/Makefile.am +++ b/gettext-tools/examples/hello-java/po/Makefile.am @@ -246,11 +246,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPE distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-librep/po/Makefile.am b/gettext-tools/examples/hello-librep/po/Makefile.am index bdcecbc27..cdfe4986e 100644 --- a/gettext-tools/examples/hello-librep/po/Makefile.am +++ b/gettext-tools/examples/hello-librep/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-pascal/po/Makefile.am b/gettext-tools/examples/hello-pascal/po/Makefile.am index ffd3e5f4b..fc71ab532 100644 --- a/gettext-tools/examples/hello-pascal/po/Makefile.am +++ b/gettext-tools/examples/hello-pascal/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-perl/po/Makefile.am b/gettext-tools/examples/hello-perl/po/Makefile.am index fab93963d..fd4871384 100644 --- a/gettext-tools/examples/hello-perl/po/Makefile.am +++ b/gettext-tools/examples/hello-perl/po/Makefile.am @@ -363,11 +363,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-php/po/Makefile.am b/gettext-tools/examples/hello-php/po/Makefile.am index 268db7c9a..c0787d6cb 100644 --- a/gettext-tools/examples/hello-php/po/Makefile.am +++ b/gettext-tools/examples/hello-php/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-python/po/Makefile.am b/gettext-tools/examples/hello-python/po/Makefile.am index fd0dbca8f..7272c5567 100644 --- a/gettext-tools/examples/hello-python/po/Makefile.am +++ b/gettext-tools/examples/hello-python/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-sh/po/Makefile.am b/gettext-tools/examples/hello-sh/po/Makefile.am index 6b661478c..1a7c1d5e2 100644 --- a/gettext-tools/examples/hello-sh/po/Makefile.am +++ b/gettext-tools/examples/hello-sh/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-smalltalk/po/Makefile.am b/gettext-tools/examples/hello-smalltalk/po/Makefile.am index cc1e23e6e..0faf3d82a 100644 --- a/gettext-tools/examples/hello-smalltalk/po/Makefile.am +++ b/gettext-tools/examples/hello-smalltalk/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am index e6cc705df..d98c4ec91 100644 --- a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am @@ -271,11 +271,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(MSGFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-tcl/po/Makefile.am b/gettext-tools/examples/hello-tcl/po/Makefile.am index e6cc705df..d98c4ec91 100644 --- a/gettext-tools/examples/hello-tcl/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl/po/Makefile.am @@ -271,11 +271,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(MSGFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile diff --git a/gettext-tools/examples/hello-ycp/po/Makefile.am b/gettext-tools/examples/hello-ycp/po/Makefile.am index 90b13d652..94f256320 100644 --- a/gettext-tools/examples/hello-ycp/po/Makefile.am +++ b/gettext-tools/examples/hello-ycp/po/Makefile.am @@ -353,11 +353,16 @@ EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) distdir1: $(MAKE) update-po $(MAKE) $(srcdir)/stamp-po - if test -f $(srcdir)/$(DOMAIN).pot; then \ + @if test -f $(srcdir)/$(DOMAIN).pot; then \ for file in $(DOMAIN).pot stamp-po; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ cp -p $$d/$$file $(distdir)/$$file || exit 1; \ done; \ + 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 POTFILES and the XGETTEXT_OPTIONS in the Makefile.am file." 1>&2;; \ + esac; \ fi update-po: Makefile