On 7/30/2003 6:50 AM, Michael G Schwern wrote:
On Wed, Jul 30, 2003 at 06:34:13AM +0100, Alan Burlison wrote:
https://rt.cpan.org/NoAuth/Bug.html?id=3081
A little help on this one. I don't have a VC++ compiler and I wouldn't be much good at fixing a recursive XS build problem on Windows anyway.
AFAIK it doesn't work properly on *any* platform. I submitted a patch for this against 5.6.1, but it got dropped as it broke Tk. DEFINE and INC don't get propagated ISTR.
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-07/msg00150.html
I don't mean to throw a firebomb here, but Tk is a bit too chummy with MakeMaker to use it as a yardstick for backwards compatibility. I'd be curious as to what changes could be necessary to Tk to make this work again and if it causes problems with any other modules.
Nick's response to the above message gives a good account of why the patch is wrong, atleast for INC. Adding DEFINE to that 1st set of assignments in MM_Unix::pasthru() does fix the OP's problem.
I.e. change:
foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE)) {
to:
foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE DEFINE)) {The next assignments in pasthru() don't make much sense as I can't find where PASTHRU_INC & PASTHRU_DEFINE are ever given a value:
foreach $key (qw(DEFINE INC)) {
push @pasthru, "PASTHRU_$key=\"\$(PASTHRU_$key)\"";
}I'm not real familiar with MM's internals, so I'll defer to someone else for the proper fix (and tests).
Randy.
--
A little learning is a dang'rous thing;
Drink deep, or taste not the Pierian spring;
There shallow draughts intoxicate the brain;
And drinking largely sobers us again.
- Alexander Pope
diff -ur ExtUtils-MakeMaker-6.11_orig/lib/ExtUtils/MM_Win32.pm
ExtUtils-MakeMaker-6.11/lib/ExtUtils/MM_Win32.pm
--- ExtUtils-MakeMaker-6.11_orig/lib/ExtUtils/MM_Win32.pm 2003-07-05
19:13:06.000000000 -0400
+++ ExtUtils-MakeMaker-6.11/lib/ExtUtils/MM_Win32.pm 2003-07-30 19:24:43.000000000
-0400
@@ -185,6 +185,11 @@
$self->{LD} ||= $Config{ld} || 'link';
$self->{AR} ||= $Config{ar} || 'lib';
+ if ($NMAKE) {
+ $self->{MAKE} = '$(MAKE) -nologo';
+ push @{$self->{CONFIG}}, 'make';
+ }
+
$self->SUPER::init_others;
# Setting SHELL from $Config{sh} can break dmake. Its ok without it.
@@ -420,20 +425,6 @@
return ''
}
-
-=item pasthru (o)
-
-All we send is -nologo to nmake to prevent it from printing its damned
-banner.
-
-=cut
-
-sub pasthru {
- my($self) = shift;
- return "PASTHRU = " . ($NMAKE ? "-nologo" : "");
-}
-
-
=item oneliner (o)
These are based on what command.com does on Win98. They may be wrong
Only in ExtUtils-MakeMaker-6.11/t: Big-Dummy
diff -ur ExtUtils-MakeMaker-6.11_orig/t/MM_Win32.t ExtUtils-MakeMaker-6.11/t/MM_Win32.t
--- ExtUtils-MakeMaker-6.11_orig/t/MM_Win32.t 2003-07-23 05:07:14.000000000 -0400
+++ ExtUtils-MakeMaker-6.11/t/MM_Win32.t 2003-07-30 20:47:19.000000000 -0400
@@ -253,7 +253,8 @@
# dist_core() should look into that
# pasthru()
-{
+TODO: {
+ local $TODO = 'Needs better pasthru() test.';
my $pastru = "PASTHRU = " . ($Config{make} =~ /^nmake/i ? "-nologo" : "");
is( $MM->pasthru(), $pastru, 'pasthru()' );
}
