Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/perl/Git
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-20 02:54:58 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-20 02:54:58 +0300
commit2e2ed74be03993706d467e4b8e785afeb5f173d9 (patch)
tree6bb2cef2924956cd07ea76719e8065c1b5c131a2 /perl/Git
parentbf949ade81106fbda068c1fdb2c6fd1cb1babe7e (diff)
parent8c55753c68e9c3e56f7a0d96301d2211d9e4ae35 (diff)
Merge branch 'ab/perl-makefile-cleanup'
Build procedure clean-up. * ab/perl-makefile-cleanup: Makefile: make PERL_DEFINES recursively expanded perl: use mock i18n functions under NO_GETTEXT=Y Makefile: regenerate *.pm on NO_PERL_CPAN_FALLBACKS change Makefile: regenerate perl/build/* if GIT-PERL-DEFINES changes Makefile: don't re-define PERL_DEFINES
Diffstat (limited to 'perl/Git')
-rw-r--r--perl/Git/I18N.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 2037f387c8..895e759c57 100644
--- a/perl/Git/I18N.pm
+++ b/perl/Git/I18N.pm
@@ -16,9 +16,19 @@ BEGIN {
our @EXPORT = qw(__ __n N__);
our @EXPORT_OK = @EXPORT;
+# See Git::LoadCPAN's NO_PERL_CPAN_FALLBACKS_STR for a description of
+# this "'@@' [...] '@@'" pattern.
+use constant NO_GETTEXT_STR => '@@' . 'NO_GETTEXT' . '@@';
+use constant NO_GETTEXT => (
+ q[@@NO_GETTEXT@@] ne ''
+ and
+ q[@@NO_GETTEXT@@] ne NO_GETTEXT_STR
+);
+
sub __bootstrap_locale_messages {
our $TEXTDOMAIN = 'git';
our $TEXTDOMAINDIR ||= $ENV{GIT_TEXTDOMAINDIR} || '@@LOCALEDIR@@';
+ die "NO_GETTEXT=" . NO_GETTEXT_STR if NO_GETTEXT;
require POSIX;
POSIX->import(qw(setlocale));