[PATCH] perl: regenerate perl.mak if perl -V changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the perl/perl.mak build process so that the file is re-made 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 regeneratio
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@xxxxxxxxx>
---

On Wed, Mar 29, 2017 at 4:18 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Tue, Mar 28, 2017 at 09:03:43PM -0400, Jeffrey Walton wrote:
>[...]

At first I thought Jeffrey was running into this longstanding issue
with the perl Makefile. Looks like not, and he just wasn't passing
PERL_PATH correctly, but fix this related issue while it's fresh in my
mind.

 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index c80fec2920..c0c5510238 100644
--- a/Makefile
+++ b/Makefile
@@ -1850,6 +1850,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) $@+
 
-- 
2.11.0




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]