From: Jan Dubois Date: Sat, 1 May 1999 23:45:47 +0000 (+0200) Subject: Add POLLUTE=1 option to MakeMaker X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2aea4d4064eddefd1fbe7babfc1d07fc273740b9;p=p5sagit%2Fp5-mst-13.2.git Add POLLUTE=1 option to MakeMaker Message-ID: <373373fb.59284266@smtp1.ibm.net> p4raw-id: //depot/perl@3366 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 8d09668..40a8256 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -384,6 +384,11 @@ sub cflags { $self->{OPTIMIZE} =~ s/-TP(\s|$)//; } } + + if ($self->{POLLUTE}) { + $self->{CCFLAGS} .= ' -DPERL_POLLUTE '; + } + return $self->{CFLAGS} = qq{ CCFLAGS = $self->{CCFLAGS} OPTIMIZE = $self->{OPTIMIZE} diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 95477fa..a8ea73e 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -249,7 +249,7 @@ sub full_setup { LINKTYPE MAKEAPERL MAKEFILE MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC PERL_ARCHLIB PERL_LIB PERL_SRC PERM_RW PERM_RWX - PL_FILES PM PMLIBDIRS PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX + PL_FILES PM PMLIBDIRS POLLUTE PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit @@ -445,11 +445,13 @@ sub ExtUtils::MakeMaker::new { } if ($self->{PARENT}) { $self->{PARENT}->{CHILDREN}->{$newclass} = $self; - if (exists $self->{PARENT}->{CAPI} - and not exists $self->{CAPI}) - { - # inherit, but only if already unspecified - $self->{CAPI} = $self->{PARENT}->{CAPI}; + foreach my $opt (qw(CAPI POLLUTE)) { + if (exists $self->{PARENT}->{$opt} + and not exists $self->{$opt}) + { + # inherit, but only if already unspecified + $self->{$opt} = $self->{PARENT}->{$opt}; + } } } } else { @@ -1617,6 +1619,18 @@ they contain will be installed in the corresponding location in the library. A libscan() method can be used to alter the behaviour. Defining PM in the Makefile.PL will override PMLIBDIRS. +=item POLLUTE + +Release 5.005 grandfathered old global symbol names by providing preprocessor +macros for extension source compatibility. As of release 5.006, these +preprocessor definitions are not available by default. The POLLUTE flag +specifies that the old names should still be defined: + + perl Makefile.PL POLLUTE=1 + +Please inform the module author if this is necessary to successfully install +a module under 5.006 or later. + =item PPM_INSTALL_EXEC Name of the executable used to run C below. (e.g. perl) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 9fb0819..6840923 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -21,7 +21,11 @@ None known at this time. Release 5.005 grandfathered old global symbol names by providing preprocessor macros for extension source compatibility. As of release 5.006, these preprocessor definitions are not available by default. You need to explicitly -compile perl with C<-DPERL_POLLUTE> in order to get these definitions. +compile perl with C<-DPERL_POLLUTE> in order to get these definitions. For +extensions that are still using the old symbols, this option can be +specified via MakeMaker: + + perl Makefile.PL POLLUTE=1 =item C