Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 68878
Status: rejected
Worked: 15 min
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: ETJ [...] cpan.org
Requestors: jim.cromie [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 6.10_01



Subject: 0001-Makefile-should-depend-upon-VERSION_FROM.patch
When make testing new pulls of bleadperl, I typically just do make test, skipping the git clean -dxf or similar. When a recent commit has bumped a module's VERSION, I get errors during test, like: cpan/Unicode-Normalize/t/tie................................... \ Unicode::Normalize object version 1.10 does not match \ bootstrap parameter 1.12 at ../../lib/DynaLoader.pm line 213. I usually just find and delete the Makefile, and let Makefile.PL && ExtUtils-MakeMaker rebuild it. Typically tests will then pass. to-be-attached patch fixes this by patching MM_Unix.pm to add $(VERSION_FROM) dependency to $(FIRST_MAKEFILE) Ive kludged t/pm_to_blib.t to run make 2x after touching Dummy.pm, 1st make errors out (which is intended, perhaps to compensate for a lack of some dependencies), 2nd succeeds, and returns its exit code. Note: this doesnt fix all variety of errors in incremental makes, but does address a prevalent mode of failure. tested on [jimc@groucho ExtUtils-MakeMaker]$ git describe v6.57_11-2-g49dd39f and on perl [jimc@groucho perl]$ git describe v5.14.0-618-gec39a4a which is a merge on top of ecb7327 perldelta for breakpoints by file name
Subject: 0001-Makefile-should-depend-upon-VERSION_FROM.patch
From 49dd39fa65ebd0105d937275fba7dcd2871077ff Mon Sep 17 00:00:00 2001 From: Jim Cromie <jim.cromie@gmail.com> Date: Thu, 16 Jun 2011 13:21:47 -0600 Subject: [PATCH] Makefile should depend upon $VERSION_FROM RFC: has minor kludge in test file. MM_Unix.pm: add $(VERSION_FROM) to $(FIRST_MAKEFILE) dependencies. This cause regeneration of Makefile when the VERSION is updated in the source-file. Going forward, the dependency fixes problems like following, when perl source is pulled, and incremental make test is done: cpan/Unicode-Normalize/t/tie................................... \ Unicode::Normalize object version 1.10 does not match \ bootstrap parameter 1.12 at ../../lib/DynaLoader.pm line 213. Also patches t/pm_to_blib.t, to run make 2x after lib/Big/Dummy.pm is updated. 1st make regenerates Makefile (as intended), but it returns failure (also intended, unclear why). 2nd make covers that failure by returning its success, so test passes. NOTE: "$make 2>/dev/null ; $make" is not portable, if the concept has merit, a portable way can be found. --- lib/ExtUtils/MM_Unix.pm | 2 +- t/pm_to_blib.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index a3b7e9d..082a962 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -2524,7 +2524,7 @@ $(OBJECT) : $(FIRST_MAKEFILE) $m .= sprintf <<'MAKE_FRAG', $newer_than_target, $mpl_args; # We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. -$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) +$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) $(VERSION_FROM) $(NOECHO) $(ECHO) "Makefile out-of-date with respect to %s" $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." -$(NOECHO) $(RM_F) $(MAKEFILE_OLD) diff --git a/t/pm_to_blib.t b/t/pm_to_blib.t index 66ef879..8035af6 100644 --- a/t/pm_to_blib.t +++ b/t/pm_to_blib.t @@ -54,7 +54,7 @@ my $make = make_run(); print $fh "Something else\n"; close $fh; - run_ok($make); + run_ok("$make 2>/dev/null;$make"); like slurp("blib/lib/Big/Dummy.pm"), qr/Something else\n$/; } -- 1.7.4.4
This was tried, and removed in 2003. Here is part of the Changes for 6.10_01, dated Sun Apr 6 19:31:42 PDT 2003: - Removing $(VERSION_FROM) from Makefile dependency. It was too annoying to rebuild the Makefile every time the module changed. Mentioned it in the FAQ instead. Rejecting (but thanks for the report and patch!).