On Sun Apr 11 12:44:12 2010, PJCJ wrote:
Show quoted text> Hello,
>
> It seems to me that this is a bug in dmake or something to do with
> strawberry perl. Unfortunately am not in a position to reproduce it at
> the moment. I know that strawberry is a fairly fast moving target.
> Could you please check whether this is still a problem?
>
> I'm loathe to make such a change unless it is really necessary and at the
> moment it's not clear to me at all why having .gitignore in the MANIFEST
> is causing such a problem.
>
> Thanks,
I'll pop in and help, if I may, and say that we aren't THAT fast-moving
a target! The version of dmake has been the same for at least a year.
(We're changing it now for the 5.12.x versions, but it should be stable
that long again.)
The error is because a line like this is generated in the Makefile by
the MY::postamble that's in Devel::Cover's Makefile.PL:
.gitignore BUGS CHANGES Cover.xs ...
$(SET_VERSION) .gitignore BUGS CHANGES Cover.xs ...
Apparently, dmake is interpreting the "." in front of ".gitignore" as a
signal for a special target type that dmake has that other make programs
do not, (what it is, I don't know, I'm not a make expert of any type!)
and since "gitignore" is not one of those special targets, it's spewing
a syntax error. (Make compatibility - aka weird bugs like this happening
when trying to add to Makefiles - is one reason why a lot of people are
moving away from EU::MM, but that's a whole other side issue.)
Since you shouldn't need to change a version number in .gitignore, I
don't think, my recommendation for a fix to this problem would be to
patch Makefile.PL, line 31 this way:
my @files = sort keys %{maniread()}, "lib/Devel/Cover/Inc.pm";
-my @versions = grep { $_ ne "README" && $_ ne "Makefile.PL" } @files;
+my @versions = grep { $_ ne 'README' && $_ ne 'Makefile.PL' && $_ ne
'.gitignore' } @files;
(ok, there's a style change, there, too [why ask for interpolation when
you don't need it], but you see the point.)
This would make the lines generated be this:
BUGS CHANGES Cover.xs ...
$(SET_VERSION) BUGS CHANGES Cover.xs ...
That way, you would not have the .gitignore file first thing in that
line, and then the makefile would then be syntactically correct for
dmake, in addition to any other make program that Devel::Cover's
Makefile.PL IS currently working with. AND you wouldn't have to change
the MANIFEST.
Would that fix the problem to your satisfaction?
(And considering that Devel::Cover is a prerequisite for something
that's in the forthcoming Strawberry Perl Professional, I'd like to see
this fix in the next version of Devel::Cover, please.)