diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-05-01 18:26:33 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-05-01 18:29:50 +0900 |
commit | b0575dc58b71c383481eb4cd8a344e4923d10146 (patch) | |
tree | 6f3e58d41efacbda3f8490231f8717d6abf5811e /gettext-runtime/po | |
parent | 82f0951f725828edb2c5f258de25e3ef119e945e (diff) | |
download | external_gettext-b0575dc58b71c383481eb4cd8a344e4923d10146.zip external_gettext-b0575dc58b71c383481eb4cd8a344e4923d10146.tar.gz external_gettext-b0575dc58b71c383481eb4cd8a344e4923d10146.tar.bz2 |
Makefile.in.in: Add an option to claim the package as 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.
Diffstat (limited to 'gettext-runtime/po')
-rw-r--r-- | gettext-runtime/po/ChangeLog | 9 | ||||
-rw-r--r-- | gettext-runtime/po/Makefile.in.in | 28 | ||||
-rw-r--r-- | gettext-runtime/po/Makevars | 7 |
3 files changed, 35 insertions, 9 deletions
diff --git a/gettext-runtime/po/ChangeLog b/gettext-runtime/po/ChangeLog index f5af2af..2faf90b 100644 --- a/gettext-runtime/po/ChangeLog +++ b/gettext-runtime/po/ChangeLog @@ -1,5 +1,14 @@ 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 * Makevars (POFILESDEPS): New variable. (DISTFILESDEPS): New variable. diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 5ac3f4c..a70fcf6 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -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" \ ;; \ diff --git a/gettext-runtime/po/Makevars b/gettext-runtime/po/Makevars index 146ee35..f4d21fc 100644 --- a/gettext-runtime/po/Makevars +++ b/gettext-runtime/po/Makevars @@ -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 |