develooper Front page | perl.perl5.porters | Postings from April 2003

[PATCH Makefile.PL] Re: 5.8.1@19053: ext/*/blib directories

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
April 4, 2003 03:00
Subject:
[PATCH Makefile.PL] Re: 5.8.1@19053: ext/*/blib directories
Message ID:
20030404122344.337bf99f.rgarciasuarez@free.fr
Ilya Zakharevich wrote:
> I see that many extensions in ./ext/ tree create blib/ subdirectories
> and put files into them.  Is it an intended behaviour?

No, it's not, so here's a patch against bleadperl that adds the
necessary (and non-critical) changes to the Makefile.PLs. I'm sending
this the module authors to integrate these changes in the next versions
of their modules. The trick is to detect PERL_CORE=1 on the command-line
(or $ENV{PERL_CORE}). I'll apply the changes to XS::APItest and
Devel::PPPort directly, as they're not on CPAN. Unless objections, of
course...


Index: ext/Encode/Makefile.PL
===================================================================
--- ext/Encode/Makefile.PL	(revision 1068)
+++ ext/Encode/Makefile.PL	(working copy)
@@ -15,7 +15,9 @@
 	       ]
      );
 
-my @exe_files = qw(bin/enc2xs
+my @exe_files = $ENV{PERL_CORE}
+	      ? ()
+	      : qw(bin/enc2xs
 		   bin/piconv
 		   );
 my @more_exe_files = qw(
Index: ext/Unicode/Normalize/Makefile.PL
===================================================================
--- ext/Unicode/Normalize/Makefile.PL	(revision 1068)
+++ ext/Unicode/Normalize/Makefile.PL	(working copy)
@@ -5,6 +5,17 @@
 
 do "mkheader";
 
+unless($ENV{PERL_CORE}) {
+    $ENV{PERL_CORE} = 1 if grep { $_ eq 'PERL_CORE=1' } @ARGV;
+}
+if ($ENV{PERL_CORE}) {
+    # Pods will be built by installman.
+    @coreopts = ( MAN3PODS => {} );
+}
+else {
+    @coreopts = ();
+}
+
 WriteMakefile(
     'NAME'		=> 'Unicode::Normalize',
     'VERSION_FROM'	=> 'Normalize.pm', # finds $VERSION
@@ -12,4 +23,5 @@
       (ABSTRACT_FROM => 'Normalize.pm', # retrieve abstract from module
        AUTHOR     => 'SADAHIRO Tomoyuki <SADAHIRO@cpan.org>') : ()),
     clean => {FILES=> 'unfcan.h unfcmb.h unfcmp.h unfcpt.h unfexc.h'},
+    @coreopts,
 );
Index: ext/MIME/Base64/Makefile.PL
===================================================================
--- ext/MIME/Base64/Makefile.PL	(revision 1068)
+++ ext/MIME/Base64/Makefile.PL	(working copy)
@@ -1,8 +1,20 @@
 require 5.002;
 use ExtUtils::MakeMaker;
 
+unless($ENV{PERL_CORE}) {
+    $ENV{PERL_CORE} = 1 if grep { $_ eq 'PERL_CORE=1' } @ARGV;
+}
+if ($ENV{PERL_CORE}) {
+    # Pods will be built by installman.
+    @coreopts = ( MAN3PODS => {} );
+}
+else {
+    @coreopts = ();
+}
+
 WriteMakefile(
     NAME	 => 'MIME::Base64',
     VERSION_FROM => 'Base64.pm',
     dist         => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    @coreopts,
 );
Index: ext/XS/APItest/Makefile.PL
===================================================================
--- ext/XS/APItest/Makefile.PL	(revision 1068)
+++ ext/XS/APItest/Makefile.PL	(working copy)
@@ -14,6 +14,7 @@
     'INC'		=> '-I.', # e.g., '-I. -I/usr/include/other'
 	# Un-comment this if you add C files to link with later:
     # 'OBJECT'		=> '$(O_FILES)', # link all the C files too
+    MAN3PODS		=> {},  # Pods will be built by installman.
 );
 
 sub MY::install { "install ::\n"  };
Index: ext/Time/HiRes/Makefile.PL
===================================================================
--- ext/Time/HiRes/Makefile.PL	(revision 1068)
+++ ext/Time/HiRes/Makefile.PL	(working copy)
@@ -408,6 +408,10 @@
         realclean => {FILES=> 'const-c.inc const-xs.inc'},
     );
 
+    if ($ENV{PERL_CORE}) {
+	push @makefileopts, MAN3PODS => {};
+    }
+
     WriteMakefile(@makefileopts);
 }
 
Index: ext/Devel/PPPort/Makefile.PL
===================================================================
--- ext/Devel/PPPort/Makefile.PL	(revision 1068)
+++ ext/Devel/PPPort/Makefile.PL	(working copy)
@@ -12,5 +12,6 @@
     OBJECT	=> '$(BASEEXT)$(OBJ_EXT) $(O_FILES)',
     XSPROTOARG	=> '-noprototypes',
     'dist'	=> { COMPRESS=>"gzip", SUFFIX=>"gz" },
-    'clean'	=> { FILES => qw($(H_FILES))}
+    'clean'	=> { FILES => qw($(H_FILES))},
+    MAN3PODS	=> {},
 );
End of patch.
-- 
Unanimous is not *NIX

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About