Add POLLUTE=1 option to MakeMaker
authorJan Dubois <jand@activestate.com>
Sat, 1 May 1999 23:45:47 +0000 (01:45 +0200)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 10 May 1999 09:45:58 +0000 (09:45 +0000)
Message-ID: <373373fb.59284266@smtp1.ibm.net>

p4raw-id: //depot/perl@3366

lib/ExtUtils/MM_Unix.pm
lib/ExtUtils/MakeMaker.pm
pod/perldelta.pod

index 8d09668..40a8256 100644 (file)
@@ -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}
index 95477fa..a8ea73e 100644 (file)
@@ -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<PPM_INSTALL_SCRIPT> below. (e.g. perl)
index 9fb0819..6840923 100644 (file)
@@ -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<PERL_POLLUTE_MALLOC>