In perl.git, the branch smoke-me/nicholas/vms-filespec has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fb29512154f7b12ca535e3ca09930210572315c4?hp=21339399ecf6ae3a636f01859c6fd863bfac6933>

- Log -----------------------------------------------------------------
commit fb29512154f7b12ca535e3ca09930210572315c4
Author: Nicholas Clark <n...@ccl4.org>
Date:   Mon Jun 17 15:52:30 2013 +0200

    Remove defunct DESCRIP.MMS cleanup rules.
    
    Rules to remove C and object files from vms/ext were made redundant when
    commit 26dd53a231877708 in Sep 2009 moved the XS extensions from there to
    ext/
    
    The wildcard rule to remove t/lib/vms*.t, which has been in
    vms/descrip_mms.template since the file was added by commit 97abc6adffcd3efc
    in June 1998 was effectively made redundant when it was duplicated by 4
    specific rules for the 4 files it matched added by commit 493ba88a837f5a6b
    in June 2001.
    
    The rule to delete t/lib/vmsish.t was made redundant when vms/ext/vmsish.*
    were moved to lib/ by commit 9f84c00564fd021b in Nov 2001.

M       vms/descrip_mms.template

commit f2481d0c67d08928c0f47df59ebe552936e137fc
Author: Nicholas Clark <n...@ccl4.org>
Date:   Mon Jun 17 11:49:39 2013 +0200

    Move VMS::Filespec from vms/ext to ext/
    
    This simplifies the VMS Makefile. It would have simplified the VMS Makefile
    further if it had had the correct rules to delete [.lib.VMS]Filespec.pm
    which are now no longer needed. (The generated ext/VMS-Filespec/DESCRIP.MMS
    will now take care of this.)

M       Configure
M       MANIFEST
M       Porting/Maintainers.pl
M       Porting/corelist.pl
A       ext/VMS-Filespec/lib/VMS/Filespec.pm
A       ext/VMS-Filespec/t/filespec.t
M       vms/descrip_mms.template
D       vms/ext/Filespec.pm
D       vms/ext/filespec.t
M       win32/FindExt.pm
M       write_buildcustomize.pl

commit 3f2930ac4c45a943293de120681350aa26531b5b
Author: Nicholas Clark <n...@ccl4.org>
Date:   Mon Jun 17 10:37:50 2013 +0100

    vms/ext/filespec.t does not need to be +x
    
    The mode of this file has rattled back and forth between +x and -x since it
    was first added. It makes no difference which it is, so remove -x and hence
    1 special case.

M       Porting/exec-bit.txt
M       vms/ext/filespec.t

commit 2a652aaf5493ce81e0181404063d0510288929c8
Author: Nicholas Clark <n...@ccl4.org>
Date:   Mon Jun 17 11:27:16 2013 +0200

    Refactor FindExt, merging scan_ext() and find_ext().
    
    The return value of FindExt::scan_ext() has never been used, since FindExt
    was first added by commit 8e2329934bcca9c5 in April 2001. The call to
    FindExt::extensions() has no side effects, so it can be eliminated. Hence
    FindExt::scan_ext() is a trivial wrapper around FindExt::find_ext(), and the
    two can be merged.
    
    Also, simplify the logic for "known" extensions. The complexity of checking
    the hash first was needed when extension directories were nested. It should
    have been removed as part of commit 1f8a0b38638b171c in Feb 2009.

M       win32/FindExt.pm

commit 9c62558eeb4ec588c65a9b2198d51cb7d02d507f
Author: Nicholas Clark <n...@ccl4.org>
Date:   Mon Jun 17 10:50:33 2013 +0200

    Skip most of FindExt's tests for troublesome configurations.
    
    There are various various things that break the test's assumptions.
    1) If Encode is a static extension, then Configure has special case logic
       to add Encode/* as static extensions
    2) -Uusedl causes Encode to be a static extension, and drops building
        XS::APItest and XS::Typemap
    3) Any use of -Dnoextensions to choose not to build a extension is not known
       by the test
    
    If any of these are true, FindExt::extensions() and $Config{extensions} will
    differ, and most of the tests are going to fail. Moreover, failure doesn't
    tell us anything interesting. So don't run those tests.

M       t/porting/FindExt.t

commit 808bd4de1bc674b83a2d42646116481076a88912
Author: Nicholas Clark <n...@ccl4.org>
Date:   Mon Jun 17 10:19:48 2013 +0200

    In FindExt.t, move the main loop's comparison logic into a subroutine.

M       t/porting/FindExt.t

commit 7a8e18044e944fa94c007e02a4f97f7e2dbfa598
Author: Nicholas Clark <n...@ccl4.org>
Date:   Fri Jun 14 11:28:31 2013 +0200

    Minor refactors to FindExt's test, removing code duplication.
    
    Use a ternary instead of if/unless on the same $^O test.
    Use a loop to call FindExt::scan_ext()
    As FindExt exports nothing, we can require it rather than using it.

M       t/porting/FindExt.t

commit 649962a36d1efd24eff574c244317c29799c8ab4
Author: Nicholas Clark <n...@ccl4.org>
Date:   Wed Jun 5 21:19:12 2013 +0200

    Thanks to FindExt::apply_config() we're now able to test dynamic extensions.
    
    FindExt::apply_config() mimic's Configure's logic, which means that 
FindExt's
    idea of which extensions should be built is consistent with Configure's.

M       t/porting/FindExt.t

commit 5bd61fa64bec56ea8fc2a2e150c1c92d2b5701d8
Author: Nicholas Clark <n...@ccl4.org>
Date:   Wed Jun 5 20:15:12 2013 +0200

    Correct a type in FindExt::apply_config in the "I18N-Langinfo" code.
    
    Commit 557ab4cb986767c7 (Feb 2011) which added this routine had
    $config->{i_nl_langinfo} not $config->{d_nl_langinfo} ('i' should be 'd').
    
    The logic for I18N::Langinfo should now be correct.

M       win32/FindExt.pm

commit babf05136078ded6ea53a835a64ffc8b9941e9af
Author: Nicholas Clark <n...@ccl4.org>
Date:   Fri Jun 14 17:10:31 2013 +0200

    In FindExt, eliminate _ext_ne() and make extensions() a simple subroutine.
    
    Previously _ext_ne() was a generator function, and extensions() and
    known_extensions() were generated by it. Now that known_extensions() has a
    different implementation, extensions() was the last user of _ext_ne(), so
    there's no saving by keeping the complexity.

M       win32/FindExt.pm

commit 1be2db7f28bfbcd36a26bc53dae72bd0d34532fa
Author: Nicholas Clark <n...@ccl4.org>
Date:   Fri Jun 14 16:56:28 2013 +0200

    Add non-XS extensions to known_extensions.
    
    Previously "known_extensions" was misnamed, as it only contained known XS
    extensions. grep.cpan.me suggests that there are only 10 mentions of it
    outside the core, and none of them rely on this existing behaviour.
    
    These changes need replicating into configure.com.

M       Configure
M       win32/FindExt.pm

commit 1f88fe13256dca6db824c171c2c88d3f38a6e199
Author: Nicholas Clark <n...@ccl4.org>
Date:   Fri Jun 14 16:19:06 2013 +0200

    Remove Configure code that supported the old-style nested layout for ext/
    
    5.10.1 switched to the new layout, so this code would only be useful for
    backporting to maint-5.8. That isn't going happen, so it can go.

M       Configure
-----------------------------------------------------------------------

Summary of changes:
 Configure                                         | 98 +++++++++--------------
 MANIFEST                                          |  4 +-
 Porting/Maintainers.pl                            |  6 ++
 Porting/corelist.pl                               |  2 -
 Porting/exec-bit.txt                              |  1 -
 {vms/ext => ext/VMS-Filespec/lib/VMS}/Filespec.pm |  0
 {vms/ext => ext/VMS-Filespec/t}/filespec.t        |  0
 t/porting/FindExt.t                               | 89 +++++++++++---------
 vms/descrip_mms.template                          | 28 ++-----
 win32/FindExt.pm                                  | 32 +++-----
 write_buildcustomize.pl                           |  7 +-
 11 files changed, 118 insertions(+), 149 deletions(-)
 rename {vms/ext => ext/VMS-Filespec/lib/VMS}/Filespec.pm (100%)
 rename {vms/ext => ext/VMS-Filespec/t}/filespec.t (100%)
 mode change 100755 => 100644

diff --git a/Configure b/Configure
index f8982cf..8ffaf49 100755
--- a/Configure
+++ b/Configure
@@ -22353,10 +22353,10 @@ esac
 : Check extensions
 echo " "
 echo "Looking for extensions..." >&4
-: If we are using the old config.sh, known_extensions may contain
-: old or inaccurate or duplicate values.
-known_extensions=''
+: If we are using the old config.sh, nonxs_extensions and xs_extensions may
+: contain old or inaccurate or duplicate values.
 nonxs_extensions=''
+xs_extensions=''
 : We do not use find because it might not be available.
 : We do not just use MANIFEST because the user may have dropped
 : some additional extensions into the source tree and expect them
@@ -22372,51 +22372,34 @@ find_extensions='
            DynaLoader|dynaload) ;;
            *)
            this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
-           leaf=`echo $xxx | $sed -e s/.*-//`;
-           if $test -d File; then
-               if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then
-                   known_extensions="$known_extensions $1$this_ext";
-               elif $test -f $xxx/Makefile.PL; then
-                   nonxs_extensions="$nonxs_extensions $1$this_ext";
-               else
-                   if $test -d $xxx -a $# -lt 10; then
-                       set $1$xxx/ $*;
-                       cd "$xxx";
-                       eval $find_extensions;
-                       cd ..;
-                       shift;
-                   fi;
-               fi;
-           else
-               echo " $known_extensions $nonxs_extensions" > $$.tmp;
-               if $contains " $this_ext " $$.tmp; then
-                   echo >&4;
-                   echo "Duplicate directories detected for extension $xxx" 
>&4;
-                   echo "Configure cannot correctly recover from this - shall 
I abort?" >&4;
-                   case "$knowitall" in
-                   "") dflt=y;;
-                   *) dflt=n;;
-                   esac;
-                   . ../UU/myread;
-                   case "$ans" in
-                   n*|N*) ;;
-                   *) echo >&4;
-                      echo "Ok.  Stopping Configure." >&4;
-                      echo "Please remove the duplicate directory (e.g. using 
git clean) and then re-run Configure" >&4;
-                       exit 1;;
-                   esac;
-                   echo "Ok.  You will need to correct config.sh before 
running make." >&4;
-               fi;
-               $ls -1 $xxx > $$.tmp;
-               if   $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
-                   known_extensions="$known_extensions $this_ext";
-               elif $contains "\.c$"  $$.tmp > /dev/null 2>&1; then
-                   known_extensions="$known_extensions $this_ext";
-               elif $test -d $xxx; then
-                   nonxs_extensions="$nonxs_extensions $this_ext";
-               fi;
-               $rm -f $$.tmp;
-           fi
+           echo " $xs_extensions $nonxs_extensions" > $$.tmp;
+           if $contains " $this_ext " $$.tmp; then
+               echo >&4;
+               echo "Duplicate directories detected for extension $xxx" >&4;
+               echo "Configure cannot correctly recover from this - shall I 
abort?" >&4;
+               case "$knowitall" in
+               "") dflt=y;;
+               *) dflt=n;;
+               esac;
+               . ../UU/myread;
+               case "$ans" in
+               n*|N*) ;;
+               *) echo >&4;
+                   echo "Ok.  Stopping Configure." >&4;
+                   echo "Please remove the duplicate directory (e.g. using git 
clean) and then re-run Configure" >&4;
+                   exit 1;;
+               esac;
+               echo "Ok.  You will need to correct config.sh before running 
make." >&4;
+           fi;
+           $ls -1 $xxx > $$.tmp;
+           if   $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
+               xs_extensions="$xs_extensions $this_ext";
+           elif $contains "\.c$"  $$.tmp > /dev/null 2>&1; then
+               xs_extensions="$xs_extensions $this_ext";
+           elif $test -d $xxx; then
+               nonxs_extensions="$nonxs_extensions $this_ext";
+           fi;
+           $rm -f $$.tmp;
            ;;
        esac;
     done'
@@ -22433,27 +22416,18 @@ cd "$rsrc/ext"
 set X
 shift
 eval $find_extensions
-if $test -d File-Glob; then
-    : All ext/ flattened
-else
-    # Special case:  Add in modules that nest beyond the first level.
-    # Currently threads/shared and Hash/Util/FieldHash, since they are
-    # not picked up by the recursive find above (and adding in general
-    # recursive finding breaks SDBM_File/sdbm).
-    # A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash)
-    known_extensions="$known_extensions threads/shared Hash/Util/FieldHash"
-fi
-set X $known_extensions
+set X $xs_extensions
 shift
-known_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
+xs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
 set X $nonxs_extensions
 shift
 nonxs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
 cd "$tdir"
+known_extensions=`echo $nonxs_extensions $xs_extensions  | tr ' ' $trnl | 
$sort | tr $trnl ' '`
 
 : Now see which are supported on this system.
 avail_ext=''
-for xxx in $known_extensions ; do
+for xxx in $xs_extensions ; do
        case "$xxx" in
        DB_File|db_file)
                case "$i_db" in
@@ -22618,6 +22592,8 @@ esac
 nonxs_ext=''
 for xxx in $nonxs_extensions ; do
        case "$xxx" in
+       VMS*)
+               ;;
        *)      nonxs_ext="$nonxs_ext $xxx"
                ;;
        esac
diff --git a/MANIFEST b/MANIFEST
index ee2ba1d..734064b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3798,6 +3798,8 @@ ext/VMS-DCLsym/DCLsym.pm  Perl access to CLI symbols
 ext/VMS-DCLsym/DCLsym.xs       Perl access to CLI symbols
 ext/VMS-DCLsym/Makefile.PL     MakeMaker driver for VMS::DCLsym
 ext/VMS-DCLsym/t/vms_dclsym.t  regression tests for VMS::DCLsym
+ext/VMS-Filespec/lib/VMS/Filespec.pm   VMS-Unix file syntax interconversion
+ext/VMS-Filespec/t/filespec.t          See if VMS::Filespec functions work
 ext/VMS-Stdio/0README.txt      ReadMe file for VMS::Stdio
 ext/VMS-Stdio/Makefile.PL      MakeMaker driver for VMS::Stdio
 ext/VMS-Stdio/Stdio.pm         VMS options to stdio routines
@@ -5443,8 +5445,6 @@ utils/splain.PL                   Stand-alone version of 
diagnostics.pm
 utils/xsubpp.PL                        External subroutine preprocessor
 utils/zipdetails.PL                    display the internal structure of zip 
files
 vms/descrip_mms.template       Template MM[SK] description file for build
-vms/ext/Filespec.pm            VMS-Unix file syntax interconversion
-vms/ext/filespec.t             See if VMS::Filespec functions work
 vms/genopt.com                 hack to write options files in case of broken 
makes
 vms/gen_shrfls.pl              generate options files and glue for shareable 
image
 vms/make_command.com           record MM[SK] command used to build Perl
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index bfd6f11..2cf8987 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1945,6 +1945,12 @@ use File::Glob qw(:case);
         'UPSTREAM'   => undef,
     },
 
+    'VMS::Filespec' => {
+        'MAINTAINER' => 'p5p',
+        'FILES'      => q[ext/VMS-Filespec],
+        'UPSTREAM'   => undef,
+    },
+
     'VMS::Stdio' => {
         'MAINTAINER' => 'craig',
         'FILES'      => q[ext/VMS-Stdio],
diff --git a/Porting/corelist.pl b/Porting/corelist.pl
index 9a90fbb..c60b5df 100755
--- a/Porting/corelist.pl
+++ b/Porting/corelist.pl
@@ -106,7 +106,6 @@ find(
             $module =~ s{^Sys-Syslog/win32}{Sys-Syslog},
             $module =~ s{^Time-Piece/Seconds}{Time/Seconds},
             );
-        $module =~ s{^vms/ext}{VMS};
                $module =~ s{^lib/}{}g;
         $module =~ s{/}{::}g;
         $module =~ s{-}{::}g;
@@ -115,7 +114,6 @@ find(
         $lines{$module}          = $version;
         $module_to_file{$module} = $File::Find::name;
     },
-    'vms/ext',
     'symbian/ext',
     'lib',
     'ext',
diff --git a/Porting/exec-bit.txt b/Porting/exec-bit.txt
index 8489dda..e3e7f3c 100644
--- a/Porting/exec-bit.txt
+++ b/Porting/exec-bit.txt
@@ -26,7 +26,6 @@ regen/regcharclass.pl
 regen/uconfig_h.pl
 runtests.SH
 t/TEST
-vms/ext/filespec.t
 x2p/Makefile.SH
 Porting/Maintainers.pl
 Porting/add-package.pl
diff --git a/vms/ext/Filespec.pm b/ext/VMS-Filespec/lib/VMS/Filespec.pm
similarity index 100%
rename from vms/ext/Filespec.pm
rename to ext/VMS-Filespec/lib/VMS/Filespec.pm
diff --git a/vms/ext/filespec.t b/ext/VMS-Filespec/t/filespec.t
old mode 100755
new mode 100644
similarity index 100%
rename from vms/ext/filespec.t
rename to ext/VMS-Filespec/t/filespec.t
diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t
index 165ae14..93446d6 100644
--- a/t/porting/FindExt.t
+++ b/t/porting/FindExt.t
@@ -11,54 +11,69 @@ use Config;
 
 # Test that Win32/FindExt.pm is consistent with Configure in determining the
 # types of extensions.
-# It's not possible to check the list of built dynamic extensions, as that
-# varies based on which headers are present, and which options ./Configure was
-# invoked with.
 
 if ($^O eq "MSWin32" && !defined $ENV{PERL_STATIC_EXT}) {
     skip_all "PERL_STATIC_EXT must be set to the list of static extensions";
 }
 
-unless (defined $Config{usedl}) {
-    skip_all "FindExt just plain broken for static perl.";
+require FindExt;
+
+FindExt::apply_config(\%Config);
+FindExt::scan_ext("../$_")
+    foreach qw(cpan dist ext);
+FindExt::set_static_extensions(split ' ', $^O eq 'MSWin32'
+                               ? $ENV{PERL_STATIC_EXT} : $Config{static_ext});
+
+sub compare {
+    my ($desc, $want, @have) = @_;
+    $want = [sort split ' ', $want]
+        unless ref $want eq 'ARRAY';
+    local $::Level = $::Level + 1;
+    is(scalar @have, scalar @$want, "We find the same number of $desc");
+    is("@have", "@$want", "We find the same list of $desc");
 }
 
-plan tests => 10;
-use FindExt;
+unless (join (' ', sort split ' ', $Config{extensions})
+        eq join(' ', FindExt::extensions())) {
+    # There are various things that break our assumptions.
+    # If Encode is a static extension, then Configure has special case logic
+    # to add Encode/* as static extensions
+    # -Uusedl causes Encode to be a static extension, and drops building
+    # XS::APItest and XS::Typemap
+    # Any use of -Dnoextensions to choose not to build a extension
 
-FindExt::apply_config(\%Config);
-FindExt::scan_ext('../cpan');
-FindExt::scan_ext('../dist');
-FindExt::scan_ext('../ext');
-FindExt::set_static_extensions(split ' ', $ENV{PERL_STATIC_EXT}) if $^O eq 
"MSWin32";
-FindExt::set_static_extensions(split ' ', $Config{static_ext}) unless $^O eq 
"MSWin32";
+    plan(tests => 2);
+    note("configured extension list doesn't match, so only minimal testing is 
possible");
+    compare('known_extensions', $Config{known_extensions}, 
+            FindExt::known_extensions());
+} else {
+    # dynamic linking, and all possible extensions for this system were built,
+    # so can test everything.
+    plan(tests => 12);
+
+    compare('known_extensions', $Config{known_extensions}, 
+            FindExt::known_extensions());
+
+    # Config.pm and FindExt.pm make different choices about what should be 
built
+    my @config_built;
+    my @found_built;
 
-# Config.pm and FindExt.pm make different choices about what should be built
-my @config_built;
-my @found_built;
-{
     foreach my $type (qw(static dynamic nonxs)) {
-       push @found_built, eval "FindExt::${type}_ext()";
+        my @this_found = eval "FindExt::${type}_ext()";
+        push @found_built, @this_found;
        push @config_built, split ' ', $Config{"${type}_ext"};
+        compare("${type}_ext", $Config{"${type}_ext"}, @this_found);
     }
-}
-@config_built = sort @config_built;
-@found_built = sort @found_built;
 
-foreach (['static_ext',
-         [FindExt::static_ext()], $Config{static_ext}],
-        ['nonxs_ext',
-         [FindExt::nonxs_ext()], $Config{nonxs_ext}],
-        ['known_extensions',
-         [FindExt::known_extensions()], $Config{known_extensions}],
-        ['"config" dynamic + static + nonxs',
-         \@config_built, $Config{extensions}],
-        ['"found" dynamic + static + nonxs', 
-         \@found_built, join " ", FindExt::extensions()],
-       ) {
-    my ($type, $found, $config) = @$_;
-    my @config = sort split ' ', $config;
-    is (scalar @$found, scalar @config,
-       "We find the same number of $type");
-    is ("@$found", "@config", "We find the same list of $type");
+    compare('"config" dynamic + static + nonxs', $Config{extensions},
+            sort @config_built);
+    compare('"found" dynamic + static + nonxs', [FindExt::extensions()],
+            sort @found_built);
 }
+
+# Local variables:
+# cperl-indent-level: 4
+# indent-tabs-mode: nil
+# End:
+#
+# ex: set ts=8 sts=4 sw=4 et:
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template
index 16773aa..904198b 100644
--- a/vms/descrip_mms.template
+++ b/vms/descrip_mms.template
@@ -280,7 +280,7 @@ CRTLOPTS =,$(CRTL)/Options
 unidatadirs = lib/unicore/To lib/unicore/lib
 
 # Modules which must be installed before we can build extensions
-LIBPREREQ = $(ARCHDIR)Config.pm $(ARCHDIR)Config_heavy.pl 
[.lib.VMS]Filespec.pm $(ARCHDIR)vmspipe.com [.lib]buildcustomize.pl
+LIBPREREQ = $(ARCHDIR)Config.pm $(ARCHDIR)Config_heavy.pl
 
 utils1 = [.utils]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com 
[.utils]h2ph.com 
 utils2 = [.utils]h2xs.com [.utils]libnetcfg.com [.lib]perlbug.com 
[.utils]json_pp.com
@@ -349,7 +349,7 @@ vmspipe.com : [.vms]vmspipe.com
 miniperl : $(DBG)miniperl$(E)  vmspipe.com
        @ Continue
 
-[.lib]buildcustomize.pl :  miniperlmain$(O), $(DBG)libperlmini$(OLB) $(CRTL) 
write_buildcustomize.pl [.lib.VMS]Filespec.pm
+[.lib]buildcustomize.pl :  miniperlmain$(O), $(DBG)libperlmini$(OLB) $(CRTL) 
write_buildcustomize.pl
        Link 
$(LINKFLAGS)/NoDebug/Trace/NoMap/NoFull/NoCross/Exe=$(MINIPERL_EXE) 
miniperlmain$(O), $(DBG)libperlmini$(OLB)/Library/Include=globals $(CRTLOPTS)
        $(MINIPERL) "-f" write_buildcustomize.pl
 
@@ -439,7 +439,7 @@ unidatafiles.ts : $(MINIPERL_EXE) [.lib]Config.pm 
[.lib.unicore]mktables nonxsex
        @ If F$Search("$(MMS$TARGET)").nes."" Then Delete/NoLog/NoConfirm 
$(MMS$TARGET);*
        @ Copy/NoConfirm _NLA0: $(MMS$TARGET)
  
-DynaLoader$(O) : [.lib]buildcustomize.pl $(ARCHDIR)Config.pm $(MINIPERL_EXE) 
[.lib.VMS]Filespec.pm 
+DynaLoader$(O) : [.lib]buildcustomize.pl $(ARCHDIR)Config.pm $(MINIPERL_EXE)
        $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "DynaLoader"
 
 dynext : $(LIBPREREQ) $(DBG)perlshr$(E) unidatafiles.ts DynaLoader$(O) 
preplibrary makeppport $(MINIPERL_EXE)
@@ -448,10 +448,6 @@ dynext : $(LIBPREREQ) $(DBG)perlshr$(E) unidatafiles.ts 
DynaLoader$(O) preplibra
 nonxsext : $(LIBPREREQ) preplibrary $(MINIPERL_EXE) [.pod]perlfunc.pod
        $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "--nonxs"
 
-[.lib.VMS]Filespec.pm : [.vms.ext]Filespec.pm
-       @ If F$Search("[.lib]VMS.Dir").eqs."" Then Create/Directory [.lib.VMS]
-       Copy/NoConfirm/Log $(MMS$SOURCE) [.lib.VMS]
-
 [.utils]perldoc.com : [.utils]perldoc.PL $(ARCHDIR)Config.pm
        $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE)
 
@@ -602,25 +598,20 @@ regen_headers :
 perly$(O) : perly.c, perly.h, $(h)
 .endif
 
-VMSFSPEC_T = [.t.lib]vmsfspec.t
-
-$(VMSFSPEC_T) : [.vms.ext]filespec.t
-       Copy/NoConfirm/Log $(MMS$SOURCE) $(VMSFSPEC_T)
-
 check : test
        @ Continue
 
-test : all [.t.lib]vmsfspec.t
+test : all
        @ PERL_TEST_DRIVER == "TEST."
        - @[.vms]test.com "$(E)" "$(__DEBUG__)"
        @ $(MINIPERL) -e "print ""Ran tests"";" > [.t]rantests.
 
-test_harness : all [.t.lib]vmsfspec.t
+test_harness : all
        @ PERL_TEST_DRIVER == "harness."
        - @[.vms]test.com "$(E)" "$(__DEBUG__)"
        @ $(MINIPERL) -e "print ""Ran tests"";" > [.t]rantests.
 
-minitest : $(MINITEST_EXE) [.lib.VMS]Filespec.pm unidatafiles.ts
+minitest : $(MINITEST_EXE) unidatafiles.ts
        @ PERL_TEST_DRIVER == "minitest"
        - @[.vms]test.com "$(E)" "$(__DEBUG__)"
 
@@ -822,8 +813,6 @@ tidy : cleanlis
        - If F$Search("mg_data.h;-1")   .nes."" Then Purge/NoConfirm/Log 
mg_data.h
        - If F$Search("Perlshr_Gbl*.Mar;-1")   .nes."" Then Purge/NoConfirm/Log 
Perlshr_Gbl*.Mar
        - If F$Search("[.ext.Opcode...];-1").nes."" Then Purge/NoConfirm/Log 
[.ext.Opcode]
-       - If F$Search("[.vms.ext...]*.C;-1").nes."" Then Purge/NoConfirm/Log 
[.vms.ext...]*.C
-       - If F$Search("[.vms.ext...]*$(O);-1").nes."" Then Purge/NoConfirm/Log 
[.vms.ext...]*$(O)
        - If F$Search("[.lib.auto...]*.al;-1").nes."" Then Purge/NoConfirm/Log 
[.lib.auto...]*.al
        - If F$Search("[.lib.auto...]autosplit.ix;-1").nes."" Then 
Purge/NoConfirm/Log [.lib.auto...]autosplit.ix
        - If F$Search("[.lib]Config.pm;-1").nes."" Then Purge/NoConfirm/Log 
[.lib]Config.pm
@@ -852,8 +841,6 @@ clean : tidy cleantest
        - If F$Search("mg_data.h")   .nes."" Then Delete/NoConfirm/Log 
mg_data.h;*
        - If F$Search("Perlshr_Gbl*.Mar")   .nes."" Then Delete/NoConfirm/Log 
Perlshr_Gbl*.Mar;*
        - If F$Search("*.TS").nes."" Then Delete/NoConfirm/Log *.TS;*
-       - If F$Search("[.vms.ext...]*.C").nes."" Then Delete/NoConfirm/Log 
[.vms.ext...]*.C;*
-       - If F$Search("[.vms.ext...]*$(O)").nes."" Then Delete/NoConfirm/Log 
[.vms.ext...]*$(O);*
        - If F$Search("[.pod]*.com").nes."" Then Delete/NoConfirm/Log 
[.pod]*.com;*
        - If F$Search("[.pod]roffitall").nes."" Then Delete/NoConfirm/Log 
[.pod]roffitall;*
        - If F$Search("$(PERLDELTA_CURRENT)").nes."" Then Delete/NoConfirm/Log 
$(PERLDELTA_CURRENT);*
@@ -894,13 +881,10 @@ realclean : clean
        - If F$Search("[.lib.ExtUtils]Miniperl.pm").nes."" Then 
Delete/NoConfirm/Log [.lib.ExtUtils]Miniperl.pm;*
        - If F$Search("[.utils]perldoc.com").nes."" Then Delete/NoConfirm/Log 
[.utils]perldoc.com;*
        - If F$Search("[.utils]perlivp.com").nes."" Then Delete/NoConfirm/Log 
[.utils]perlivp.com;*
-       - If F$Search("[.t.lib]vms*.t").nes."" Then Delete/NoConfirm/Log 
[.t.lib]vms*.t;*
        - If F$Search("[...]*$(E)").nes."" Then Delete/NoConfirm/Log 
[...]*$(E);*
        - If F$Search("Perl_Setup.Com").nes."" Then Delete/NoConfirm/Log 
Perl_Setup.Com;*
        - If F$Search("[.t]rantests.").nes."" Then Delete/NoConfirm/Log 
[.t]rantests.;*
        - If F$Search("[.t]test_state.").nes."" Then Delete/NoConfirm/Log 
[.t]test_state.;*
-       - If F$Search("[.t.lib]vmsfspec.t").nes."" Then Delete/NoConfirm/Log 
[.t.lib]vmsfspec.t;*
-       - If F$Search("[.t.lib]vmsish.t").nes."" Then Delete/NoConfirm/Log 
[.t.lib]vmsish.t;*
        - If F$Search("vmspipe.com").nes."" Then Delete/NoConfirm/Log 
vmspipe.com;*
        - If F$Search("[.lib]buildcustomize.pl").nes."" Then 
Delete/NoConfirm/Log [.lib]buildcustomize.pl;*
        - If F$Search("[.lib]config.pod").nes."" Then Delete/NoConfirm/Log 
[.lib]config.pod;*
diff --git a/win32/FindExt.pm b/win32/FindExt.pm
index c7e52ae..221082e 100644
--- a/win32/FindExt.pm
+++ b/win32/FindExt.pm
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 
 my $no = join('|',qw(GDBM_File ODBM_File NDBM_File DB_File
-                     VMS VMS-DCLsym VMS-Stdio Sys-Syslog IPC-SysV 
I18N-Langinfo));
+                     VMS.* Sys-Syslog IPC-SysV I18N-Langinfo));
 $no = qr/^(?:$no)$/i;
 
 sub apply_config {
@@ -18,7 +18,7 @@ sub apply_config {
     # duplicates logic from Configure (mostly)
     push @no, "DB_File" unless $config->{i_db};
     push @no, "GDBM_File" unless $config->{i_gdbm};
-    push @no, "I18N-Langinfo" unless $config->{i_langinfo} && 
$config->{i_nl_langinfo};
+    push @no, "I18N-Langinfo" unless $config->{i_langinfo} && 
$config->{d_nl_langinfo};
     push @no, "IPC-SysV" unless $config->{d_msg} || $config->{d_sem} || 
$config->{d_shm};
     push @no, "NDBM_File" unless $config->{d_ndbm};
     push @no, "ODBM_File"
@@ -64,13 +64,6 @@ sub set_static_extensions {
     }
 }
 
-sub scan_ext
-{
-    my $dir  = shift;
-    find_ext("$dir/");
-    extensions();
-}
-
 sub _ext_eq {
     my $key = shift;
     sub {
@@ -82,16 +75,13 @@ sub _ext_eq {
 *static_ext = _ext_eq('static');
 *nonxs_ext = _ext_eq('nonxs');
 
-sub _ext_ne {
-    my $key = shift;
-    sub {
-        sort grep $ext{$_} ne $key, keys %ext;
-    }
+sub extensions {
+    sort grep $ext{$_} ne 'known', keys %ext;
 }
 
-*extensions = _ext_ne('known');
-# faithfully copy Configure in not including nonxs extensions for the nonce
-*known_extensions = _ext_ne('nonxs');
+sub known_extensions {
+    sort keys %ext;
+}
 
 sub is_static
 {
@@ -109,14 +99,14 @@ sub has_xs_or_c {
 }
 
 # Function to find available extensions, ignoring DynaLoader
-sub find_ext
+sub scan_ext
 {
     my $ext_dir = shift;
     opendir my $dh, "$ext_dir";
     while (defined (my $item = readdir $dh)) {
         next if $item =~ /^\.\.?$/;
         next if $item eq "DynaLoader";
-        next unless -d "$ext_dir$item";
+        next unless -d "$ext_dir/$item";
         my $this_ext = $item;
         my $leaf = $item;
 
@@ -126,12 +116,12 @@ sub find_ext
        # Temporary hack to cope with smokers that are not clearing directories:
         next if $ext{$this_ext};
 
-        if (has_xs_or_c("$ext_dir$item")) {
+        if (has_xs_or_c("$ext_dir/$item")) {
             $ext{$this_ext} = $static{$this_ext} ? 'static' : 'dynamic';
         } else {
             $ext{$this_ext} = 'nonxs';
         }
-        $ext{$this_ext} = 'known' if $ext{$this_ext} && $item =~ $no;
+        $ext{$this_ext} = 'known' if $item =~ $no;
     }
 }
 
diff --git a/write_buildcustomize.pl b/write_buildcustomize.pl
index 92c75de..576fe5c 100644
--- a/write_buildcustomize.pl
+++ b/write_buildcustomize.pl
@@ -7,9 +7,6 @@ if (@ARGV) {
     unshift @INC, 'lib';
 }
 
-unshift @INC, ('dist/Cwd', 'dist/Cwd/lib');
-require File::Spec::Functions;
-
 my $file = 'lib/buildcustomize.pl';
 
 # To clarify, this isn't the entire suite of modules considered "toolchain"
@@ -35,6 +32,10 @@ my @toolchain = qw(cpan/AutoLoader/lib
 
 # Used only in ExtUtils::Liblist::Kid::_win32_ext()
 push @toolchain, 'cpan/Text-ParseWords/lib' if $^O eq 'MSWin32';
+push @toolchain, 'ext/VMS-Filespec/lib' if $^O eq 'VMS';
+
+unshift @INC, @toolchain;
+require File::Spec::Functions;
 
 # lib must be last, as the toolchain modules write themselves into it
 # as they build, and it's important that @INC order ensures that the partially

--
Perl5 Master Repository

Reply via email to