In perl.git, the branch smoke-me/perlmodlib has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/87b38a596d16173e9c291d9b4d61e5833698674a?hp=730c15e1bf81c0756abe6ced655e8e5699dd5249>

- Log -----------------------------------------------------------------
commit 87b38a596d16173e9c291d9b4d61e5833698674a
Author: Nicholas Clark <[email protected]>
Date:   Tue Apr 24 22:48:38 2012 +0200

    On Win32 run autodoc.pl and pod/perlmodlib.PL using miniperl, not perl.
    
    *nix and VMS both use miniperl to run these two build scripts. This makes
    Win32 consistent.

M       win32/Makefile
M       win32/makefile.mk

commit 0a46ffe6cdb435d37b8c9e34746baf3f2e46dd08
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 b1a29696645f555c662e6e6d83ae2d2ae0f69489
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 69e17420cc155db3a4d9e224e7ee7a6287f68ae5
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.
    
    In win32/makefile.mk, move the invocation of $(PL2BAT) after the invocations
    for autodoc.pl and pod/perlmodlib.PL to make the order consistent with that
    of win32/Makefile.

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..f946377 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 ..
+       miniperl.exe -Ilib autodoc.pl
+       miniperl.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..faaccfb 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1262,9 +1262,9 @@ utils: $(PERLEXE) $(X2P)
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
        copy ..\pod\perldelta.pod ..\pod\perl51510delta.pod
+       cd .. && miniperl.exe -Ilib autodoc.pl
+       cd .. && miniperl.exe pod\perlmodlib.pl -q
        $(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

--
Perl5 Master Repository

Reply via email to