From: Bruno Haible Date: Tue, 23 Oct 2018 22:42:20 +0000 (+0200) Subject: examples: Add an option to claim the package as GNU/non-GNU. X-Git-Tag: v0.20~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e46ff4e02752008e79590dcc3b042a096b5d263e;p=thirdparty%2Fgettext.git examples: Add an option to claim the package as GNU/non-GNU. This mirrors the Makefile.in.in and Makevars change from 2014-05-01. Reported by David Shea at . * gettext-runtime/po/Makefile.in.in ($(DOMAIN).pot-update): Tweak whitespace. * gettext-tools/examples/hello-*/po/Makefile.am (PACKAGE_GNU): New variable. ($(DOMAIN).pot-update): Don't search for "GNU packagename" if $(PACKAGE_GNU) is set. * gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile: Likewise. --- diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 49140f490..d278c10e5 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -160,11 +160,9 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ - -size -10000000c -exec grep 'GNU @PACKAGE@' \ - /dev/null '{}' ';' 2>/dev/null; \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ else \ - LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ + LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ diff --git a/gettext-tools/examples/hello-c++-qt/po/Makefile.am b/gettext-tools/examples/hello-c++-qt/po/Makefile.am index 5e888de08..be33ac8b3 100644 --- a/gettext-tools/examples/hello-c++-qt/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-qt/po/Makefile.am @@ -30,6 +30,13 @@ XGETTEXT_OPTIONS = \ # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -125,15 +132,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -152,7 +167,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am index f38f0fd9d..465c151b1 100644 --- a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am @@ -29,6 +29,13 @@ XGETTEXT_OPTIONS = \ # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -132,15 +139,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -159,7 +174,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-clisp/po/Makefile.am b/gettext-tools/examples/hello-clisp/po/Makefile.am index 018cab0ba..738d3450b 100644 --- a/gettext-tools/examples/hello-clisp/po/Makefile.am +++ b/gettext-tools/examples/hello-clisp/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = --keyword=_ --flag=_:1:pass-lisp-format # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am index 29356c961..12151c07e 100644 --- a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -114,15 +121,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -141,7 +156,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-csharp/po/Makefile.am b/gettext-tools/examples/hello-csharp/po/Makefile.am index 29356c961..12151c07e 100644 --- a/gettext-tools/examples/hello-csharp/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -114,15 +121,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -141,7 +156,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-gawk/po/Makefile.am b/gettext-tools/examples/hello-gawk/po/Makefile.am index c4afbdcf0..212cda105 100644 --- a/gettext-tools/examples/hello-gawk/po/Makefile.am +++ b/gettext-tools/examples/hello-gawk/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-guile/po/Makefile.am b/gettext-tools/examples/hello-guile/po/Makefile.am index 49632ccba..d62b9402d 100644 --- a/gettext-tools/examples/hello-guile/po/Makefile.am +++ b/gettext-tools/examples/hello-guile/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = --keyword=_ --flag=_:1:pass-scheme-format # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-java-awt/po/Makefile.am b/gettext-tools/examples/hello-java-awt/po/Makefile.am index 4bd40a3db..160d0c273 100644 --- a/gettext-tools/examples/hello-java-awt/po/Makefile.am +++ b/gettext-tools/examples/hello-java-awt/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -112,15 +119,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -139,7 +154,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am index 4bd40a3db..160d0c273 100644 --- a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am +++ b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -112,15 +119,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -139,7 +154,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-java-swing/po/Makefile.am b/gettext-tools/examples/hello-java-swing/po/Makefile.am index 4bd40a3db..160d0c273 100644 --- a/gettext-tools/examples/hello-java-swing/po/Makefile.am +++ b/gettext-tools/examples/hello-java-swing/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -112,15 +119,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -139,7 +154,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-java/po/Makefile.am b/gettext-tools/examples/hello-java/po/Makefile.am index 4bd40a3db..160d0c273 100644 --- a/gettext-tools/examples/hello-java/po/Makefile.am +++ b/gettext-tools/examples/hello-java/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -112,15 +119,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -139,7 +154,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-librep/po/Makefile.am b/gettext-tools/examples/hello-librep/po/Makefile.am index 2278db051..98a638b8a 100644 --- a/gettext-tools/examples/hello-librep/po/Makefile.am +++ b/gettext-tools/examples/hello-librep/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile b/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile index da4be355f..880bcd33d 100644 --- a/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile +++ b/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile @@ -26,6 +26,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -100,15 +107,23 @@ all-local-no: # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE_NAME)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE_NAME)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE_NAME)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE_NAME)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ @@ -123,7 +138,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE_NAME)" \ + --package-name="$${package_prefix}$(PACKAGE_NAME)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-pascal/po/Makefile.am b/gettext-tools/examples/hello-pascal/po/Makefile.am index e9c64d583..203a889d7 100644 --- a/gettext-tools/examples/hello-pascal/po/Makefile.am +++ b/gettext-tools/examples/hello-pascal/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-perl/po/Makefile.am b/gettext-tools/examples/hello-perl/po/Makefile.am index 20133250e..824a7d61d 100644 --- a/gettext-tools/examples/hello-perl/po/Makefile.am +++ b/gettext-tools/examples/hello-perl/po/Makefile.am @@ -33,6 +33,13 @@ XGETTEXT_OPTIONS = \ # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -136,15 +143,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -163,7 +178,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-php/po/Makefile.am b/gettext-tools/examples/hello-php/po/Makefile.am index 1c9ebf924..7ba241c23 100644 --- a/gettext-tools/examples/hello-php/po/Makefile.am +++ b/gettext-tools/examples/hello-php/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-python/po/Makefile.am b/gettext-tools/examples/hello-python/po/Makefile.am index 27c50aea5..ffd1e3068 100644 --- a/gettext-tools/examples/hello-python/po/Makefile.am +++ b/gettext-tools/examples/hello-python/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-sh/po/Makefile.am b/gettext-tools/examples/hello-sh/po/Makefile.am index 18cfda678..6a8b8c4be 100644 --- a/gettext-tools/examples/hello-sh/po/Makefile.am +++ b/gettext-tools/examples/hello-sh/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-smalltalk/po/Makefile.am b/gettext-tools/examples/hello-smalltalk/po/Makefile.am index 3a6a8916b..57059bcf1 100644 --- a/gettext-tools/examples/hello-smalltalk/po/Makefile.am +++ b/gettext-tools/examples/hello-smalltalk/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am index d882e8c41..19ebca686 100644 --- a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = --keyword=_ --flag=_:1:pass-tcl-format # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -112,15 +119,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -139,7 +154,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-tcl/po/Makefile.am b/gettext-tools/examples/hello-tcl/po/Makefile.am index d882e8c41..19ebca686 100644 --- a/gettext-tools/examples/hello-tcl/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = --keyword=_ --flag=_:1:pass-tcl-format # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -112,15 +119,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -139,7 +154,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \ diff --git a/gettext-tools/examples/hello-ycp/po/Makefile.am b/gettext-tools/examples/hello-ycp/po/Makefile.am index 222d0e352..20bf44790 100644 --- a/gettext-tools/examples/hello-ycp/po/Makefile.am +++ b/gettext-tools/examples/hello-ycp/po/Makefile.am @@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = # their copyright. COPYRIGHT_HOLDER = Yoyodyne, Inc. +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines @@ -126,15 +133,23 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # 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_DEPS) remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU $(PACKAGE)' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -153,7 +168,7 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}$(PACKAGE)" \ + --package-name="$${package_prefix}$(PACKAGE)" \ --package-version='$(VERSION)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(POTFILES) \