Resolving circular dependency between ExtUtils::MakeMaker and Test::Harness
Compiling a more recent (2.17 Q2 2018, almost 3 years later) version of Git might prove easier, since the build procedure for perl
/ part has been greatly simplified by weaning Git off of MakeMaker
.
See commit 7a7bfc7 (02 Jan 2018) by Jonathan Nieder (artagnon
).
See commit 805a378 (22 Dec 2017), and commit 20d2a30 (10 Dec 2017) by Ævar Arnfjörð Bjarmason (avar
).
(Merged by Junio C Hamano -- gitster
-- in commit ed1b87e, 13 Feb 2018)
Ævar explains:
Replace the
perl/Makefile.PL
and the fallbackperl/Makefile
used underNO_PERL_MAKEMAKER=NoThanks
with a much simpler implementation heavily inspired by how the i18n infrastructure's build process works.
See commit 5e9637c from Git v1.7.9-rc0, Nov. 2011.The reason for having the
Makefile.PL
in the first place is that it was initially building a Perl C binding to interface withlibgit
(commit b1edc53d0, Git v1.4.3-rc1, June 2006), this functionality, that was removed (commit 18b0fc1, Git v1.4.3-rc1, Sept. 2006) beforeGit.pm
ever made it to themaster
branch.We've since since started maintaining a fallback
perl/Makefile
, asMakeMaker
wouldn't work on some platforms (commit f848718, Git v1.5.0-rc0, Dec. 2006).
That's just the tip of the iceberg. We have thePM.stamp
hack in the top-levelMakefile
(commit ee9be06, Git v1.7.12-rc1, Jul. 2012) to detect whether we need to regenerate theperl/perl.mak
, which I fixed just recently to deal with issues like theperl
version changing from under us (commit c59c4939, Git v2.13.0-rc0, March 2017).There is absolutely no reason for why this needs to be so complex anymore.
All we're getting out of this elaborate Rube Goldberg machine was copyingperl/*
toperl/blib/*
as we do a string-replacement on the*.pm
files to hard-code@@LOCALEDIR@@
in the source, as well as pod2man-ingGit.pm
& friends.So replace the whole thing with something that's pretty much a copy of how we generate
po/build/**.mo
frompo/*.po
, just with a smallsed(1)
command instead ofmsgfmt
.
As that's being done, rename the files from*.pm
to*.pmc
just to indicate that they're generated (see "perldoc -f require
").
With Git 2.32 (Q2 2021), build procedure gets cleaned-up.
See commit 8c55753 (12 May 2021), and commit 256c2dc, commit 368a50d, commit 3d49f72, commit 4070c9e (05 May 2021) by Ævar Arnfjörð Bjarmason (avar
).
(Merged by Junio C Hamano -- gitster
-- in commit 2e2ed74, 20 May 2021)
perl
: use mock i18n functions underNO_GETTEXT=Y
Signed-off-by: Ævar Arnfjörð Bjarmason
Change the logic of the i18n functions I added in 5e9637c ("
i18n
: add infrastructure for translating Git with gettext", 2011-11-18, Git v1.7.9-rc0 -- merge) to use pass-through functions whenNO_GETTEXT
is defined.This speeds up the compilation time of commands that use this library when
NO_GETTEXT=Y
is in effect.
Loading it andPOSIX.pm
is around 20ms on my machine, whereas it takes 2ms to just instantiate Perl itself.