summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2002-06-19 16:13:16 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-19 23:16:37 +0000
commita884ca7cc4e7a429bb7c3666c1a38cb5c2939f80 (patch)
tree1bf16617f96f1d81d2de815dc31722f2f8a86824
parent11c6125cf24f3329a0ad93cef69068d611ef27fa (diff)
downloadperl-a884ca7cc4e7a429bb7c3666c1a38cb5c2939f80.tar.gz
ExtUtils::MakeMaker 6.02 -> 6.03
Message-id: <20020620001316.GY1232@ool-18b93024.dyn.optonline.net> p4raw-id: //depot/perl@17314
-rw-r--r--lib/ExtUtils/Changes7
-rw-r--r--lib/ExtUtils/MM_Cygwin.pm6
-rw-r--r--lib/ExtUtils/MakeMaker.pm47
-rw-r--r--lib/ExtUtils/t/writemakefile_args.t45
4 files changed, 70 insertions, 35 deletions
diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes
index 268065ae30..39bd0c8555 100644
--- a/lib/ExtUtils/Changes
+++ b/lib/ExtUtils/Changes
@@ -1,3 +1,10 @@
+6.03 Wed Jun 19 17:06:14 EDT 2002
+ - Documented that we're clamping down on cargo-cult MakeMaker
+ programming.
+ - Eased up the parameter verification to leave errant values alone.
+ - Doug MacEachern documented LDDLFLAGS and added to known parameters.
+ - Possible fix for XS compiles on Cygwin for pre 5.8 perls.
+
6.02 Sat Jun 15 19:46:06 EDT 2002
- ExtUtils::Installed->modules() was broken in scalar context
- Sync bleadperl 16922: Netware updates from Ananth Kesari.
diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm
index 09dd692b58..3c37ffd9f7 100644
--- a/lib/ExtUtils/MM_Cygwin.pm
+++ b/lib/ExtUtils/MM_Cygwin.pm
@@ -10,7 +10,7 @@ require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
@ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-$VERSION = 1.03;
+$VERSION = 1.04;
sub cflags {
my($self,$libperl)=@_;
@@ -79,7 +79,9 @@ q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
sub perl_archive {
if ($Config{useshrplib} eq 'true') {
my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
- $libperl =~ s/a$/dll.a/;
+ if( $] >= 5.007 ) {
+ $libperl =~ s/a$/dll.a/;
+ }
return $libperl;
} else {
return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm
index 91cc91ccce..901bd139fc 100644
--- a/lib/ExtUtils/MakeMaker.pm
+++ b/lib/ExtUtils/MakeMaker.pm
@@ -2,10 +2,10 @@ package ExtUtils::MakeMaker;
BEGIN {require 5.005_03;}
-$VERSION = "6.02";
+$VERSION = "6.03";
$Version_OK = "5.49"; # Makefiles older than $Version_OK will die
# (Will be checked from MakeMaker version 4.13 onwards)
-($Revision = substr(q$Revision: 1.61 $, 10)) =~ s/\s+$//;
+($Revision = substr(q$Revision: 1.63 $, 10)) =~ s/\s+$//;
require Exporter;
use Config;
@@ -107,6 +107,7 @@ my %Att_Sigs =
INST_MAN3DIR => '',
INST_SCRIPT => '',
_KEEP_AFTER_FLUSH => '',
+ LDDLFLAGS => '',
LDFROM => '',
LIB => '',
LIBPERL_A => '',
@@ -171,12 +172,6 @@ my %Att_Sigs =
tool_autosplit => 'hash',
);
-my %Default_Att = (
- '' => '',
- hash => {},
- array => [],
- code => sub {},
- );
sub _verify_att {
my($att) = @_;
@@ -198,7 +193,6 @@ sub _verify_att {
: "string/number";
warn "WARNING: $key takes a $takes not a $has.\n".
" Please inform the author.\n";
- $att->{$key} = $Default_Att{$sigs[0]};
}
}
}
@@ -1290,8 +1284,8 @@ recommends it (or you know what you're doing).
=head2 Using Attributes and Parameters
-The following attributes can be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line:
+The following attributes may be specified as arguments to WriteMakefile()
+or as NAME=VALUE pairs on the command line.
=over 2
@@ -1582,6 +1576,14 @@ Directory, where executable files should be installed during
testing. make install will copy the files in INST_SCRIPT to
INSTALLSCRIPT.
+=item LDDLFLAGS
+
+Any special flags that might need to be passed to ld to create a
+shared library suitable for dynamic loading. It is up to the makefile
+to use it. (See L<Config/lddlflags>)
+
+Defaults to $Config{lddlflags}.
+
=item LDFROM
Defaults to "$(OBJECT)" and is used in the ld command to specify
@@ -1975,7 +1977,7 @@ MakeMaker object. The following lines will be parsed o.k.:
$VERSION = '1.00';
*VERSION = \'1.01';
- ( $VERSION ) = '$Revision: 1.61 $ ' =~ /\$Revision:\s+([^\s]+)/;
+ ( $VERSION ) = '$Revision: 1.63 $ ' =~ /\$Revision:\s+([^\s]+)/;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
@@ -2133,6 +2135,27 @@ Makefile:
MAKE_FRAG
}
+=head2 The End Of Cargo Cult Programming
+
+WriteMakefile() now does some basic sanity checks on its parameters to
+protect against typos and malformatted values. This means some things
+which happened to work in the past will now throw warnings and
+possibly produce internal errors.
+
+Some of the most common mistakes:
+
+=over 2
+
+=item C<<MAN3PODS => ' '>>
+
+This is commonly used to supress the creation of man pages. MAN3PODS
+takes a hash ref not a string, but the above worked by accident in old
+versions of MakeMaker.
+
+The correct code is C<<MAN3PODS => { }>>.
+
+=back
+
=head2 Hintsfile support
diff --git a/lib/ExtUtils/t/writemakefile_args.t b/lib/ExtUtils/t/writemakefile_args.t
index 2160f08255..f4b4daf6e3 100644
--- a/lib/ExtUtils/t/writemakefile_args.t
+++ b/lib/ExtUtils/t/writemakefile_args.t
@@ -14,7 +14,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 16;
+use Test::More tests => 13;
use TieOut;
use MakeMaker::Test::Utils;
@@ -35,33 +35,35 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
$warnings .= join '', @_;
};
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- MAN3PODS => ' ', # common mistake
- );
+ my $mm;
+
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ MAN3PODS => ' ', # common mistake
+ );
+ };
is( $warnings, <<VERIFY );
WARNING: MAN3PODS takes a hash reference not a string/number.
Please inform the author.
VERIFY
- is_deeply( $mm->{MAN3PODS}, {}, 'Wrong argument type corrected' );
$warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- AUTHOR => sub {},
- );
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ AUTHOR => sub {},
+ );
+ };
is( $warnings, <<VERIFY );
WARNING: AUTHOR takes a string/number not a code reference.
Please inform the author.
VERIFY
- is_deeply( $mm->{AUTHOR}, '' );
-
-
# LIBS accepts *both* a string or an array ref. The first cut of
# our verification did not take this into account.
$warnings = '';
@@ -87,15 +89,16 @@ VERIFY
is_deeply( $mm->{LIBS}, ['-lwibble', '-lwobble'] );
$warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- LIBS => { wibble => "wobble" },
- );
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ LIBS => { wibble => "wobble" },
+ );
+ };
# We'll get warnings about the bogus libs, that's ok.
like( $warnings, qr{^WARNING: LIBS takes a array reference or string/number not a hash reference}m );
- is_deeply( $mm->{LIBS}, [] );
$warnings = '';