1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-07 23:16:08 +02:00

perl: avoid *.pmc and fix Error.pm further

The previous round tried to use *.pmc files but it confused RPM
dependency analysis on some distros.  Install them as plain
vanilla *.pm files instead.

Also "local @_" construct did not properly work when goto &sub
is used until recent versions of Perl.  Avoid it (and we do not
need to localize it here anyway).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2017-12-22 11:07:21 -08:00 committed by Junio C Hamano
parent 20d2a30f8f
commit 805a378649
2 changed files with 5 additions and 5 deletions

View File

@ -2274,14 +2274,14 @@ endif
po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
$(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
PMFILES := $(wildcard perl/*.pm perl/*/*.pm perl/*/*/*.pm perl/*/*/*/*.pm)
PMCFILES := $(patsubst perl/%.pm,perl/build/lib/%.pmc,$(PMFILES))
LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
ifndef NO_PERL
all:: $(PMCFILES)
all:: $(LIB_PERL_GEN)
endif
perl/build/lib/%.pmc: perl/%.pm
perl/build/lib/%.pm: perl/%.pm
$(QUIET_GEN)mkdir -p $(dir $@) && \
sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@

View File

@ -39,7 +39,7 @@ sub import {
require Error;
};
local @_ = ($caller, @_);
unshift @_, $caller;
goto &Error::import;
}