From: Mathieu A. <ma...@ma...> - 2003-05-13 18:44:51
|
--Le 13/05/2003 11:29 -0700, Mike Schilli =E9crivait : | On Tue, 13 May 2003, Mathieu Arnold wrote: |=20 |> 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. |=20 | I'd rather avoid creating a maintenance trap for well-behaving perl | versions. How about that: Well, you'd rather do it for every perl version. If you really want to do it this way, no need to let MakeMaker do it afterwards. btw, perl 5.6.1 does not do it right, and it's version string is 5.006001, only 5.8.0 does it right. It looks good though. | Index: Makefile.PL | = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D | 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' =3D> '$(O_FILES)', # link all the C files too | 'clean' =3D> {FILES =3D> "*.tar.gz *.ppd pod2htm*"}, | + get_man3pods(), | ); | + | +########################################## | +sub get_man3pods { | +########################################## | + # Only done for 5.6.0, 5.005 etc. | + return () if $] >=3D 5.0061; | + | + print <<EOT; | +################################################## | +# Detected buggy MakeMaker version, creating man # | +# pages manually # | +################################################## | +EOT | + require File::Find; | + | + my @pms =3D (); | + | + File::Find::find(sub { | + push @pms, $File::Find::name if /\.pm$/ | + }, "lib"); | + | + return('MAN3PODS', { | + map { my @comps =3D split /\//, $_; | + shift @comps; | + my $csep =3D join '::', @comps; | + $csep =3D~ s/\.pm$//; | + ($_, "\$(INST_MAN3DIR)/$csep.\$(MAN3EXT)"); | + } @pms | + }); | +} |=20 | -- Mike |=20 | Mike Schilli | log...@pe... | http://perlmeister.com | http://log4perl.sourceforge.net --=20 Mathieu Arnold |