Subject: | fix MakeMaker build (cygwin, mingw only) |
Attached patch fixes the cygwin build, which failed due to the pm_to_blib => pm_to_blib.ts default target change in MakeMaker.
Affected are only APIFile and APIRegistry, which failed to copy the .cp file to blib.
--- APIFile/Makefile.PL.orig 2002-07-09 01:15:51.000000000 +0100
+++ APIFile/Makefile.PL 2005-02-14 22:06:30.187500000 +0100
@@ -74,7 +74,7 @@
# If requested extra work to generate Perl instead of XS code:
if( $bin ) {
my @path= split /::/, $module;
- my $_final= $final;
+ my $_final = $final;
$_final =~ s/\W/_/g;
# How to compile F<$outfile> and then run it to produce F<$final>:
@@ -96,11 +96,10 @@
## join("/",@path,$final), qq{">.\n};
# Install F<$final> whenever regular pm_to_blib target is built:
push @m, "
-pm_to_blib: ${_final}_to_blib
+pm_to_blib.ts :: ${_final}_to_blib
-${_final}_to_blib: $final
- " . '@$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \\
- "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \\
+${_final}_to_blib : $final
+ " . '$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install \\
-e "pm_to_blib({ ',neatvalue($final),',',
neatvalue($self->catfile('$(INST_ARCHLIB)',@path,$final)), ' },',
neatvalue($self->catfile(qw[$(INST_LIB) auto])), ')"
@@ -125,3 +124,14 @@
$self->{RM_F} @realclean\n" if @realclean;
return join('',@m);
}
+
+# Allow adding ${_final}_to_blib to pm_to_blib.ts targets
+sub ExtUtils::MM_Cygwin::pm_to_blib {
+ my $self = shift;
+ package ExtUtils::MM_Cygwin; # the only way to override this piece
+ my $inherited = $self->SUPER::pm_to_blib();
+ $inherited =~ s/pm_to_blib: /pm_to_blib :: /;
+ $inherited =~ s/pm_to_blib.ts: /pm_to_blib.ts :: /;
+ $inherited;
+}
+ExtUtils::MM_Win32::pm_to_blib = &ExtUtils::MM_Cygwin::pm_to_blib;
--- APIRegistry/Makefile.PL.orig 2002-07-09 01:15:51.000000000 +0100
+++ APIRegistry/Makefile.PL 2005-02-14 21:25:36.640625000 +0100
@@ -96,7 +96,7 @@
## join("/",@path,$final), qq{">.\n};
# Install F<$final> whenever regular pm_to_blib target is built:
push @m, "
-pm_to_blib: ${_final}_to_blib
+pm_to_blib :: ${_final}_to_blib
${_final}_to_blib: $final
" . '@$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \\
@@ -125,3 +125,13 @@
$self->{RM_F} @realclean\n" if @realclean;
return join('',@m);
}
+
+# Allow adding ${_final}_to_blib to pm_to_blib.ts targets
+sub ExtUtils::MM_Cygwin::pm_to_blib {
+ my $self = shift;
+ package ExtUtils::MM_Cygwin; # the only way to override this piece
+ my $inherited = $self->SUPER::pm_to_blib();
+ $inherited =~ s/pm_to_blib: /pm_to_blib :: /;
+ $inherited =~ s/pm_to_blib.ts: /pm_to_blib.ts :: /;
+ $inherited;
+}