]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Makefile.in.in: Add an option to claim the package as GNU/non-GNU
authorDaiki Ueno <ueno@gnu.org>
Thu, 1 May 2014 09:26:33 +0000 (18:26 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 1 May 2014 09:29:50 +0000 (18:29 +0900)
Reporeted by David Shea at:
<https://savannah.gnu.org/bugs/?40520>.
* Makevars (PACKAGE_GNU): New variable.
* Makefile.in.in ($(DOMAIN).pot-update): Don't search for "GNU
packagename" if $(PACKAGE_GNU) is set.

gettext-runtime/po/ChangeLog
gettext-runtime/po/Makefile.in.in
gettext-runtime/po/Makevars

index f5af2af5b04f777d10f9f81594821d3cd0950412..2faf90b1ab1f8921aa6d5b8c7eb7f4494035587a 100644 (file)
@@ -1,3 +1,12 @@
+2014-05-01  Daiki Ueno  <ueno@gnu.org>
+
+       Makefile.in.in: Add an option to mark the package GNU/non-GNU
+       Reporeted by David Shea at:
+       <https://savannah.gnu.org/bugs/?40520>.
+       * Makevars (PACKAGE_GNU): New variable.
+       * Makefile.in.in ($(DOMAIN).pot-update): Don't search for "GNU
+       packagename" if $(PACKAGE_GNU) is set.
+
 2014-05-01  Daiki Ueno  <ueno@gnu.org>
 
        Makefile.in.in: Make dependencies of a PO file and 'dist' customizable
index 5ac3f4c88a30d8815c844d758e3a81b8ce92566d..a70fcf6647ea273251d7edb8e9c30b835acd6b07 100644 (file)
@@ -143,15 +143,25 @@ 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) $(srcdir)/POTFILES.in 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)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
          msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
@@ -171,7 +181,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
              --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
              --files-from=$(srcdir)/POTFILES.in \
              --copyright-holder='$(COPYRIGHT_HOLDER)' \
-             --package-name="$${package_gnu}@PACKAGE@" \
+             --package-name="$${package_prefix}@PACKAGE@" \
              --package-version='@VERSION@' \
              --msgid-bugs-address="$$msgid_bugs_address" \
            ;; \
index 146ee35181a5042c8d374ea70674102f3786c29a..f4d21fcc56b05eae907ea2385e91e354969e941f 100644 (file)
@@ -23,6 +23,13 @@ XGETTEXT_OPTIONS = \
 # their copyright.
 COPYRIGHT_HOLDER = Free Software Foundation, 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 = yes
+
 # 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