|
From: Mike S. <log...@pe...> - 2003-05-13 18:05:30
|
On Tue, 13 May 2003, Mathieu Arnold wrote:
> Well, finding them dinamically adds time when perl Makefile.PL, a static
> list needs to be changed only when you add or delete modules. Unless you
> often add and delete modules from it, I think it depends on what you
> believe deeply in yourself of what "the right thing is". I do believe that
> a static list is good enough.
I'd rather avoid creating a maintenance trap for well-behaving perl versions.
How about that:
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/log4perl/Log-Log4perl/Makefile.PL,v
retrieving revision 1.7
diff -a -u -r1.7 Makefile.PL
--- Makefile.PL 27 Nov 2002 06:34:58 -0000 1.7
+++ Makefile.PL 13 May 2003 18:03:21 -0000
@@ -49,4 +49,35 @@
# Un-comment this if you add C files to link with later:
# 'OBJECT' => '$(O_FILES)', # link all the C files too
'clean' => {FILES => "*.tar.gz *.ppd pod2htm*"},
+ get_man3pods(),
);
+
+##########################################
+sub get_man3pods {
+##########################################
+ # Only done for 5.6.0, 5.005 etc.
+ return () if $] >= 5.0061;
+
+ print <<EOT;
+##################################################
+# Detected buggy MakeMaker version, creating man #
+# pages manually #
+##################################################
+EOT
+ require File::Find;
+
+ my @pms = ();
+
+ File::Find::find(sub {
+ push @pms, $File::Find::name if /\.pm$/
+ }, "lib");
+
+ return('MAN3PODS', {
+ map { my @comps = split /\//, $_;
+ shift @comps;
+ my $csep = join '::', @comps;
+ $csep =~ s/\.pm$//;
+ ($_, "\$(INST_MAN3DIR)/$csep.\$(MAN3EXT)");
+ } @pms
+ });
+}
-- Mike
Mike Schilli
log...@pe...
http://perlmeister.com
http://log4perl.sourceforge.net
|