In perl.git, the branch smoke-me/perlmodlib has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ebffca21ac3bf0e0ac71d886e7bba1c0b1491eb3?hp=730c15e1bf81c0756abe6ced655e8e5699dd5249>
- Log ----------------------------------------------------------------- commit ebffca21ac3bf0e0ac71d886e7bba1c0b1491eb3 Author: Nicholas Clark <[email protected]> Date: Tue Apr 24 16:28:39 2012 +0200 Tweak pod/perlmodlib.PL to run from the top level instead of pod/ As all callers now invoke it with from the top level directory, remove the code to change directory, as that is now redundant. M pod/perlmodlib.PL commit 7b5e6d8445f22ee23f805248fa0ffe138c497cc5 Author: Nicholas Clark <[email protected]> Date: Tue Apr 24 16:16:35 2012 +0200 Remove from autodoc.pl the code to optionally change directory. It's no longer needed now that all platforms invoke it with the top level of the build tree as the current directory. M autodoc.pl commit 84e1f1b02a3a6bf0d0ff5f9b6bee40ae680cf4d2 Author: Nicholas Clark <[email protected]> Date: Tue Apr 24 15:59:35 2012 +0200 On Win32 run autodoc.pl and pod/perlmodlib.PL from the top level. On *nix and VMS autodoc.pl and pod/perlmodlib.PL are both run from the top level of the build tree. Previously Win32 built both with win32/ as the current directory. M win32/Makefile M win32/makefile.mk ----------------------------------------------------------------------- Summary of changes: autodoc.pl | 6 ------ pod/perlmodlib.PL | 15 ++++++--------- win32/Makefile | 7 ++++--- win32/makefile.mk | 4 ++-- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/autodoc.pl b/autodoc.pl index 3734884..c3e9cfe 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -305,12 +305,6 @@ _EOF_ close $fh or die "Can't close $filename: $!"; } -if (@ARGV) { - my $workdir = shift; - chdir $workdir - or die "Couldn't chdir to '$workdir': $!"; -} - open IN, "embed.fnc" or die $!; while (<IN>) { diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL index 36990f9..5545e6e 100644 --- a/pod/perlmodlib.PL +++ b/pod/perlmodlib.PL @@ -5,20 +5,19 @@ use warnings; $ENV{LC_ALL} = 'C'; -use FindBin; -chdir $FindBin::Bin or die "$0: Can't chdir $FindBin::Bin: $!"; - my $Quiet = @ARGV && $ARGV[0] eq '-q'; -open (OUT, ">perlmodlib.pod") or die $!; +open OUT, '>', 'pod/perlmodlib.pod' + or die "Can't open pod/perlmodlib.pod: $!"; my (@pragma, @mod, @files); # MANIFEST itself is Unix style filenames, so we have to assume that Unix style # filenames will work. -open (MANIFEST, "../MANIFEST") or die $!; +open (MANIFEST, '<', 'MANIFEST') or die $!; @files = grep m#(?:\.pm|\.pod|_pm\.PL)#, map {s/\s.*//s; $_} grep { m#^(lib|ext|dist|cpan)/# && !m#/(?:t|demo)/# } <MANIFEST>; +close MANIFEST or warn "$0: failed to close MANIFEST: $!"; my %exceptions = ( 'abbrev' => 'Text::Abbrev', @@ -32,8 +31,8 @@ my %exceptions = ( ); for my $filename (@files) { - unless (open MOD, '<', "../$filename") { - warn "Couldn't open ../$filename: $!"; + unless (open MOD, '<', $filename) { + warn "Couldn't open $filename: $!"; next; } @@ -1510,6 +1509,4 @@ you're redefining the world and willing to take the consequences. =cut -close MANIFEST or warn "$0: failed to close MANIFEST (../MANIFEST): $!"; close OUT or warn "$0: failed to close OUT (perlmodlib.pod): $!"; - diff --git a/win32/Makefile b/win32/Makefile index d568542..443d65c 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1076,10 +1076,11 @@ utils: $(PERLEXE) $(X2P) copy ..\README.vos ..\pod\perlvos.pod copy ..\README.win32 ..\pod\perlwin32.pod copy ..\pod\perldelta.pod ..\pod\perl51510delta.pod - cd ..\win32 + cd .. + perl.exe -Ilib autodoc.pl + perl.exe -Ilib pod\perlmodlib.pl -q + cd win32 $(PERLEXE) $(PL2BAT) $(UTILS) - $(PERLEXE) $(ICWD) ..\autodoc.pl .. - $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs $(PERLEXE) -f ..\pod\buildtoc -q diff --git a/win32/makefile.mk b/win32/makefile.mk index b3aca56..579cbbc 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1263,8 +1263,8 @@ utils: $(PERLEXE) $(X2P) copy ..\README.win32 ..\pod\perlwin32.pod copy ..\pod\perldelta.pod ..\pod\perl51510delta.pod $(PERLEXE) $(PL2BAT) $(UTILS) - $(PERLEXE) $(ICWD) ..\autodoc.pl .. - $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q + cd .. && perl.exe -Ilib autodoc.pl + cd .. && perl.exe pod\perlmodlib.pl -q ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs $(PERLEXE) -f ..\pod\buildtoc -q -- Perl5 Master Repository
