aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-03-29 13:57:03 +0000
committerJunio C Hamano <gitster@pobox.com>2017-03-29 09:48:13 -0700
commitc59c4939c2ecef21f5dd913698552bd0fffe5ebb (patch)
tree667fa01aa22b42d20f8dbab5c6b2ea8f244667ef
parent3b9e3c2cede15057af3ff8076c45ad5f33829436 (diff)
downloadgit-c59c4939c2ecef21f5dd913698552bd0fffe5ebb.tar.gz
git-c59c4939c2ecef21f5dd913698552bd0fffe5ebb.tar.xz
perl: regenerate perl.mak if perl -V changes
Change the perl/perl.mak build process so that the file is regenerated if the output of "perl -V" changes. Before this change updating e.g. /usr/bin/perl to a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run. Now the logic added in commit ee9be06770 ("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regenerate perl/perl.mak if there's any change to "perl -V". This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 76267262c..af51044fe 100644
--- a/Makefile
+++ b/Makefile
@@ -1837,6 +1837,7 @@ perl/perl.mak: perl/PM.stamp
perl/PM.stamp: FORCE
@$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
+ $(PERL_PATH) -V >>$@+ && \
{ cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
$(RM) $@+