mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
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
This commit is contained in:
commit
2e2ed74be0
13
Makefile
13
Makefile
|
@ -1987,6 +1987,7 @@ ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG))
|
||||||
ETC_GITATTRIBUTES_SQ = $(subst ','\'',$(ETC_GITATTRIBUTES))
|
ETC_GITATTRIBUTES_SQ = $(subst ','\'',$(ETC_GITATTRIBUTES))
|
||||||
|
|
||||||
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
|
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
|
||||||
|
NO_GETTEXT_SQ = $(subst ','\'',$(NO_GETTEXT))
|
||||||
bindir_SQ = $(subst ','\'',$(bindir))
|
bindir_SQ = $(subst ','\'',$(bindir))
|
||||||
bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
|
bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
|
||||||
mandir_SQ = $(subst ','\'',$(mandir))
|
mandir_SQ = $(subst ','\'',$(mandir))
|
||||||
|
@ -2271,10 +2272,13 @@ perl_localedir_SQ = $(localedir_SQ)
|
||||||
|
|
||||||
ifndef NO_PERL
|
ifndef NO_PERL
|
||||||
PERL_HEADER_TEMPLATE = perl/header_templates/fixed_prefix.template.pl
|
PERL_HEADER_TEMPLATE = perl/header_templates/fixed_prefix.template.pl
|
||||||
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
|
PERL_DEFINES =
|
||||||
|
PERL_DEFINES += $(PERL_PATH_SQ)
|
||||||
PERL_DEFINES := $(PERL_PATH_SQ) $(PERLLIB_EXTRA_SQ) $(perllibdir_SQ)
|
PERL_DEFINES += $(PERLLIB_EXTRA_SQ)
|
||||||
|
PERL_DEFINES += $(perllibdir_SQ)
|
||||||
PERL_DEFINES += $(RUNTIME_PREFIX)
|
PERL_DEFINES += $(RUNTIME_PREFIX)
|
||||||
|
PERL_DEFINES += $(NO_PERL_CPAN_FALLBACKS)
|
||||||
|
PERL_DEFINES += $(NO_GETTEXT)
|
||||||
|
|
||||||
# Support Perl runtime prefix. In this mode, a different header is installed
|
# Support Perl runtime prefix. In this mode, a different header is installed
|
||||||
# into Perl scripts.
|
# into Perl scripts.
|
||||||
|
@ -2676,9 +2680,10 @@ endif
|
||||||
NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS))
|
NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
perl/build/lib/%.pm: perl/%.pm
|
perl/build/lib/%.pm: perl/%.pm GIT-PERL-DEFINES
|
||||||
$(QUIET_GEN)mkdir -p $(dir $@) && \
|
$(QUIET_GEN)mkdir -p $(dir $@) && \
|
||||||
sed -e 's|@@LOCALEDIR@@|$(perl_localedir_SQ)|g' \
|
sed -e 's|@@LOCALEDIR@@|$(perl_localedir_SQ)|g' \
|
||||||
|
-e 's|@@NO_GETTEXT@@|$(NO_GETTEXT_SQ)|g' \
|
||||||
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|$(NO_PERL_CPAN_FALLBACKS_SQ)|g' \
|
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|$(NO_PERL_CPAN_FALLBACKS_SQ)|g' \
|
||||||
< $< > $@
|
< $< > $@
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,19 @@ BEGIN
|
||||||
our @EXPORT = qw(__ __n N__);
|
our @EXPORT = qw(__ __n N__);
|
||||||
our @EXPORT_OK = @EXPORT;
|
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 {
|
sub __bootstrap_locale_messages {
|
||||||
our $TEXTDOMAIN = 'git';
|
our $TEXTDOMAIN = 'git';
|
||||||
our $TEXTDOMAINDIR ||= $ENV{GIT_TEXTDOMAINDIR} || '@@LOCALEDIR@@';
|
our $TEXTDOMAINDIR ||= $ENV{GIT_TEXTDOMAINDIR} || '@@LOCALEDIR@@';
|
||||||
|
die "NO_GETTEXT=" . NO_GETTEXT_STR if NO_GETTEXT;
|
||||||
|
|
||||||
require POSIX;
|
require POSIX;
|
||||||
POSIX->import(qw(setlocale));
|
POSIX->import(qw(setlocale));
|
||||||
|
|
Loading…
Reference in a new issue