From: Daiki Ueno Date: Thu, 1 May 2014 09:26:33 +0000 (+0900) Subject: Makefile.in.in: Add an option to claim the package as GNU/non-GNU X-Git-Tag: v0.19~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0575dc58b71c383481eb4cd8a344e4923d10146;p=thirdparty%2Fgettext.git Makefile.in.in: Add an option to claim the package as GNU/non-GNU Reporeted by David Shea at: . * Makevars (PACKAGE_GNU): New variable. * Makefile.in.in ($(DOMAIN).pot-update): Don't search for "GNU packagename" if $(PACKAGE_GNU) is set. --- diff --git a/gettext-runtime/po/ChangeLog b/gettext-runtime/po/ChangeLog index f5af2af5b..2faf90b1a 100644 --- a/gettext-runtime/po/ChangeLog +++ b/gettext-runtime/po/ChangeLog @@ -1,3 +1,12 @@ +2014-05-01 Daiki Ueno + + Makefile.in.in: Add an option to mark the package GNU/non-GNU + Reporeted by David Shea at: + . + * 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 Makefile.in.in: Make dependencies of a PO file and 'dist' customizable diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 5ac3f4c88..a70fcf664 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 146ee3518..f4d21fcc5 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