Ticket #1927: spaces_in_paths.diff

File spaces_in_paths.diff, 18.5 KB (added by jkeenan, 11 years ago)

diff between spaces_in_path branch and master

  • MANIFEST

    diff --git a/MANIFEST b/MANIFEST
    index 94346e2..941df17 100644
    a b  
    20582058t/tools/install/01-create_directories.t                     [test] 
    20592059t/tools/install/02-install_files.t                          [test] 
    20602060t/tools/install/03-lines_to_files.t                         [test] 
    2061 t/tools/install/dev_overall.t                               [test] 
    2062 t/tools/install/overall.t                                   [test] 
    20632061t/tools/install/testlib/LICENSE                             [test] 
    20642062t/tools/install/testlib/MANIFEST.1defective                 [test] 
    20652063t/tools/install/testlib/README                              []doc 
  • config/gen/makefiles/root.in

    diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in
    index 9d81529..1936789 100644
    a b  
    859859    $(MINIPARROT) 
    860860        $(LINK) @ld_out@$@ \ 
    861861        frontend/parrot/main$(O) src/parrot_config$(O) src/longopt$(O) \ 
    862         @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) 
     862        $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) 
    863863#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    864864 
    865865$(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT) 
     
    885885$(MINIPARROT) : frontend/parrot/main$(O) include/parrot/api.h include/parrot/longopt.h $(LIBPARROT) \ 
    886886    src/null_config$(O) src/longopt$(O) 
    887887        $(LINK) @ld_out@$@ frontend/parrot/main$(O) src/null_config$(O) src/longopt$(O) \ 
    888         @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
     888        $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    889889#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    890890 
    891891$(INSTALLABLEPARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ 
     
    10561056        $(LINK) @ld_out@$@ \ 
    10571057    frontend/parrot_debugger/main$(O) \ 
    10581058    src/parrot_config$(O) \ 
    1059     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
     1059    $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    10601060#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    10611061 
    10621062$(INSTALLABLEPDB) : frontend/parrot_debugger/main$(O) $(LIBPARROT) src/parrot_config$(O) 
     
    10801080        $(LINK) @ld_out@$@ \ 
    10811081    src/pbc_disassemble$(O) \ 
    10821082    src/longopt$(O) \ 
    1083     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
     1083    $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    10841084#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    10851085 
    10861086$(INSTALLABLEDIS) : src/pbc_disassemble$(O) \ 
     
    11011101        $(LINK) @ld_out@$@ \ 
    11021102    frontend/pbc_dump/main$(O) \ 
    11031103    src/longopt$(O) \ 
    1104     frontend/pbc_dump/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
     1104    frontend/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    11051105#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    11061106 
    11071107frontend/pbc_dump/main$(O) : \ 
     
    11341134    frontend/pbc_merge/main$(O) \ 
    11351135    src/parrot_config$(O) \ 
    11361136    src/longopt$(O) \ 
    1137     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS) 
     1137    $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS) 
    11381138#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    11391139 
    11401140$(INSTALLABLEPBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABLECONFIG) 
     
    28722872############################################################################### 
    28732873 
    28742874exec : src/parrot_config$(O) $(LIBPARROT) 
    2875         $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
     2875        $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    28762876 
    28772877###### OS depend targets ########## 
    28782878 
  • config/init/hints/darwin.pm

    diff --git a/config/init/hints/darwin.pm b/config/init/hints/darwin.pm
    index 2f6184f..82820fd 100644
    a b  
    4343    _set_deployment_environment(); 
    4444 
    4545    my $lib_dir = $conf->data->get('build_dir') . "/blib/lib"; 
    46     $flagsref->{ldflags} .= " -L$lib_dir"; 
     46    $flagsref->{ldflags} .= ' -L"' . $lib_dir . '"'; 
    4747 
    4848    if ($ENV{'MACOSX_DEPLOYMENT_TARGET'} eq '10.6') { 
    4949        $flagsref->{ccflags} .= ' -pipe -fno-common '; 
     
    9191        libparrot_shared_alias => "libparrot$share_ext", 
    9292        rpath                  => "-L", 
    9393        libparrot_soname       => "-install_name " 
    94             . $lib_dir 
     94            . '"'. $lib_dir 
    9595            . '/libparrot' 
    96             . $conf->data->get('share_ext') 
     96            . $conf->data->get('share_ext') . '"' 
    9797    ); 
    9898} 
    9999 
  • config/inter/libparrot.pm

    diff --git a/config/inter/libparrot.pm b/config/inter/libparrot.pm
    index ab2f541..03af147 100644
    a b  
    8383    $conf->data->set( rpath_blib => ( ! $disable_rpath 
    8484                                     && $parrot_is_shared 
    8585                                     && $conf->data->get('rpath') ) 
    86         ? $conf->data->get('rpath') 
    87             . '"' . $conf->data->get('build_dir') . '"' 
     86        ? '"' . $conf->data->get('rpath') 
     87            . $conf->data->get('build_dir') 
    8888            . '/' 
    89             . $conf->data->get('blib_dir') 
     89            . $conf->data->get('blib_dir') . '"' 
    9090        : '' 
    9191    ); 
    9292 
  • (a) a/t/tools/install/dev_overall.t vs. (b) /dev/null

    diff --git a/t/tools/install/dev_overall.t b/t/tools/install/dev_overall.t
    deleted file mode 100644
    index 16dd741..0000000
    a b  
    1 #! perl 
    2 # Copyright (C) 2007-2008, Parrot Foundation. 
    3 # dev_overall.t 
    4  
    5 use strict; 
    6 use warnings; 
    7 use Test::More tests =>  4; 
    8 use Carp; 
    9 use Cwd; 
    10 use File::Basename; 
    11 use File::Copy; 
    12 use File::Path qw( mkpath ); 
    13 use File::Spec (); 
    14 use File::Temp qw( tempdir ); 
    15 use lib qw( lib ); 
    16 use Parrot::Config qw( %PConfig ); 
    17 use IO::CaptureOutput qw( capture ); 
    18  
    19 my $DEBUG = 0; 
    20  
    21 my $cwd = cwd(); 
    22 my $installer = File::Spec->catfile( 'tools', 'dev', 'install_dev_files.pl' ); 
    23 my $full_installer = File::Spec->catfile( $cwd, $installer ); 
    24 ok(-f $full_installer, "Able to locate $installer"); 
    25  
    26 my $testlibdir = File::Spec->catdir( qw| t tools install testlib | ); 
    27 my $man_pseudo = File::Spec->catfile( $testlibdir, q|dev_manifest_pseudo| ); 
    28 my $full_man_pseudo = File::Spec->catfile( $cwd, $man_pseudo ); 
    29 my $gen_pseudo = File::Spec->catfile( $testlibdir, q|dev_generated_pseudo| ); 
    30 my $full_gen_pseudo = File::Spec->catfile( $cwd, $gen_pseudo ); 
    31  
    32 { 
    33     my $builddir    = tempdir( CLEANUP => 1 ); 
    34     my $prefixdir   = tempdir( CLEANUP => 1 ); 
    35     if ($DEBUG) { 
    36         print STDERR "$builddir\n$prefixdir\n"; 
    37     } 
    38  
    39     my $includedir = File::Spec->catdir( $prefixdir, 'include' ); 
    40     my $libdir = File::Spec->catdir( $prefixdir, 'lib' ); 
    41     my $docdir = File::Spec->catdir( $prefixdir, 'share', 'doc' ); 
    42     my $srcdir = File::Spec->catdir( $prefixdir, 'src' ); 
    43     my $versiondir = $PConfig{versiondir}; 
    44  
    45     my %testfiles = ( 
    46         'compilers/nqp/bootstrap/actions.pm'                 => { 
    47             start   => File::Spec->catfile( 
    48                         qw| .  compilers nqp bootstrap actions.pm | ), 
    49             end     => File::Spec->catfile( 
    50                         $libdir, $versiondir, 'languages', 'nqp', 'bootstrap', 'actions.pm' ), 
    51         }, 
    52         'lib/Parrot/Configure.pm' => { 
    53             start   => File::Spec->catfile( 
    54                         qw| . lib Parrot Configure.pm | ), 
    55             end     => File::Spec->catfile( 
    56                         $libdir, $versiondir, 'tools', 'lib', 'Parrot', 'Configure.pm' ), 
    57         }, 
    58         'src/ops/ops.num' => { 
    59             start   => File::Spec->catfile( 
    60                         qw| . src ops ops.num | ), 
    61             end     => File::Spec->catfile( 
    62                         $srcdir, $versiondir, 'ops', 'ops.num' ), 
    63         }, 
    64         'tools/build/ops2c.pl' => { 
    65             start   => File::Spec->catfile( 
    66                         qw| . tools build ops2c.pl | ), 
    67             end     => File::Spec->catfile( 
    68                         $libdir, $versiondir, 'tools', 'build', 'ops2c.pl' ), 
    69         }, 
    70         'runtime/parrot/library/TGE.pbc' => { 
    71             start   => File::Spec->catfile( 
    72                         qw| . runtime parrot library TGE.pbc | ), 
    73             end     => File::Spec->catfile( 
    74                         $libdir, $versiondir, 'library', 'TGE.pbc' ), 
    75         }, 
    76         'src/pmc/pmc_object.h' => { 
    77             start   => File::Spec->catfile( 
    78                         qw| . src pmc pmc_object.h | ), 
    79             end     => File::Spec->catfile( 
    80                         $includedir, $versiondir, 'pmc', 'pmc_object.h' ), 
    81         }, 
    82         'vtable.dump' => { 
    83             start   => File::Spec->catfile( 
    84                         qw| . vtable.dump | ), 
    85             end     => File::Spec->catfile( 
    86                         $srcdir, $versiondir, 'vtable.dump' ), 
    87         }, 
    88     ); 
    89     chdir $builddir or croak "Unable to change to tempdir for testing: $!"; 
    90     my $man_quasi = File::Spec->catfile( $builddir, 'MANIFEST' ); 
    91     my $gen_quasi = File::Spec->catfile( $builddir, 'MANIFEST.generated' ); 
    92     copy $full_man_pseudo => $man_quasi 
    93         or croak "Unable to copy $man_pseudo for testing:  $!"; 
    94     copy $full_gen_pseudo => $gen_quasi 
    95         or croak "Unable to copy $gen_pseudo for testing: $!"; 
    96  
    97     my @dirs_needed = qw( 
    98         compilers/nqp/bootstrap 
    99         docs/pct 
    100         lib/Parrot 
    101         src/ops 
    102         tools/build 
    103         runtime/parrot/library 
    104         src/pmc 
    105     ); 
    106     my @created = mkpath( 
    107         [ map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ], 
    108         0, 
    109         0777 
    110     ); 
    111     print STDERR "dirs created:  @created\n" if $DEBUG; 
    112     foreach my $f ( keys %testfiles ) { 
    113         my $src = File::Spec->catfile( $cwd, $testlibdir, $f ); 
    114         my $des = File::Spec->catfile( $builddir, $testfiles{$f}{start} ); 
    115         copy $src, $des or croak "Unable to copy $f for testing: $!"; 
    116     } 
    117     my $addlib = qq{$cwd/lib}; 
    118     my $cmd = qq{$^X -I$addlib $full_installer --prefix=$prefixdir}; 
    119     $cmd .= qq{ --includedir=$includedir}; 
    120     $cmd .= qq{ --libdir=$libdir}; 
    121     $cmd .= qq{ --versiondir=$versiondir}; 
    122     $cmd .= qq{ --docdir=$docdir}; 
    123     $cmd .= qq{ --srcdir=$srcdir}; 
    124 #    $cmd .= qq{ --dry-run=1} if $DEBUG; 
    125     $cmd .= qq{ MANIFEST MANIFEST.generated}; 
    126     print "cmd: $cmd\n" if $DEBUG; 
    127     my ($stdout, $stderr); 
    128     capture( 
    129         sub { 
    130             system( $cmd ) and croak "Unable to execute $installer: $!"; 
    131         }, 
    132         \$stdout, 
    133         \$stderr, 
    134     ); 
    135     like( $stdout, qr/^Installing/, "Got expected standard output" ); 
    136     print STDERR "out:  $stdout\n" if $DEBUG; 
    137     print STDERR "err:  $stderr\n" if $DEBUG; 
    138     my $seen = 0; 
    139     my $expected = scalar keys %testfiles; 
    140     foreach my $f ( keys %testfiles ) { 
    141         my $des = $testfiles{$f}{end}; 
    142         print STDERR "wanted:  $des\n" if $DEBUG; 
    143         $seen++ if -f $des; 
    144     } 
    145     is( $seen, $expected, 
    146         "Got all $expected expected files in installation" ); 
    147  
    148     chdir $cwd 
    149         or croak "Unable to return to top-level directory after testing: $!"; 
    150 } 
    151  
    152 pass("Completed all tests in $0"); 
    153  
    154 ################### DOCUMENTATION ################### 
    155  
    156 =head1 NAME 
    157  
    158 dev_overall.t - test tools/dev/install_dev_files.pl 
    159  
    160 =head1 SYNOPSIS 
    161  
    162     % prove t/tools/install/dev_overall.t 
    163  
    164 =head1 DESCRIPTION 
    165  
    166 This file simulates the operation of F<tools/dev/install_dev_files.pl> and 
    167 sanity-checks the results. 
    168  
    169 =head1 AUTHOR 
    170  
    171 James E Keenan 
    172  
    173 =head1 SEE ALSO 
    174  
    175 F<tools/dev/install_dev_files.pl>. 
    176  
    177 =cut 
    178  
    179 # Local Variables: 
    180 #   mode: cperl 
    181 #   cperl-indent-level: 4 
    182 #   fill-column: 100 
    183 # End: 
    184 # vim: expandtab shiftwidth=4: 
  • (a) a/t/tools/install/overall.t vs. (b) /dev/null

    diff --git a/t/tools/install/overall.t b/t/tools/install/overall.t
    deleted file mode 100644
    index 0c104b5..0000000
    a b  
    1 #! perl 
    2 # Copyright (C) 2007-2008, Parrot Foundation. 
    3 # overall.t 
    4  
    5 use strict; 
    6 use warnings; 
    7 use Test::More tests =>  4; 
    8 use Carp; 
    9 use Cwd; 
    10 use File::Basename; 
    11 use File::Copy; 
    12 use File::Path qw( mkpath ); 
    13 use File::Spec (); 
    14 use File::Temp qw( tempdir ); 
    15 use lib qw( lib ); 
    16 use Parrot::Config qw( %PConfig ); 
    17 use Parrot::Install qw( 
    18     install_files 
    19     create_directories 
    20     lines_to_files 
    21 ); 
    22 use IO::CaptureOutput qw( capture ); 
    23  
    24 my $DEBUG = 0; 
    25  
    26 my $cwd = cwd(); 
    27 my $installer = File::Spec->catfile( 'tools', 'dev', 'install_files.pl' ); 
    28 my $full_installer = File::Spec->catfile( $cwd, $installer ); 
    29 ok(-f $full_installer, "Able to locate $installer"); 
    30  
    31 my $testlibdir = File::Spec->catdir( qw| t tools install testlib | ); 
    32 my $man_pseudo = File::Spec->catfile( $testlibdir, q|manifest_pseudo| ); 
    33 my $full_man_pseudo = File::Spec->catfile( $cwd, $man_pseudo ); 
    34 my $gen_pseudo = File::Spec->catfile( $testlibdir, q|generated_pseudo| ); 
    35 my $full_gen_pseudo = File::Spec->catfile( $cwd, $gen_pseudo ); 
    36  
    37 { 
    38     my $builddir    = tempdir( CLEANUP => 1 ); 
    39     my $prefixdir   = tempdir( CLEANUP => 1 ); 
    40     if ($DEBUG) { 
    41         print STDERR "$builddir\n$prefixdir\n"; 
    42     } 
    43  
    44     my $includedir = File::Spec->catdir( $prefixdir, 'include' ); 
    45     my $libdir = File::Spec->catdir( $prefixdir, 'lib' ); 
    46     my $docdir = File::Spec->catdir( $prefixdir, 'share', 'doc' ); 
    47     my $versiondir = $PConfig{versiondir}; 
    48  
    49     my %testfiles = ( 
    50         'LICENSE'                 => { 
    51             start   => File::Spec->catfile( qw| . LICENSE | ), 
    52             end     => File::Spec->catfile( 
    53                         $docdir, $versiondir, 'LICENSE' ) 
    54         }, 
    55         'include/parrot/charset.h' => { 
    56             start   => File::Spec->catfile( qw| . include parrot charset.h | ), 
    57             end     => File::Spec->catfile( 
    58                         $includedir, $versiondir, 'parrot', 'charset.h' ), 
    59         }, 
    60         'install_config.fpmc'                 => { 
    61             start   => File::Spec->catfile( qw| . install_config.fpmc | ), 
    62             end     => File::Spec->catfile( 
    63                         $libdir, $versiondir, 'include', 'config.fpmc' ), 
    64         }, 
    65         'parrot.pc'                 => { 
    66             start   => File::Spec->catfile( qw| . | ), 
    67             end     => File::Spec->catfile( 
    68                         $libdir, 'pkgconfig', $versiondir, 'parrot.pc' ), 
    69         }, 
    70         'compilers/pge/PGE.pir'                 => { 
    71             start   => File::Spec->catfile( qw| . compilers pge PGE.pir | ), 
    72             end     => File::Spec->catfile( 
    73                         $libdir, $versiondir, 'languages', 'pge', 'PGE.pir' ), 
    74         }, 
    75  
    76     ); 
    77     chdir $builddir or croak "Unable to change to tempdir for testing: $!"; 
    78     my $man_quasi = File::Spec->catfile( $builddir, 'MANIFEST' ); 
    79     my $gen_quasi = File::Spec->catfile( $builddir, 'MANIFEST.generated' ); 
    80     copy $full_man_pseudo => $man_quasi 
    81         or croak "Unable to copy $man_pseudo for testing:  $!"; 
    82     copy $full_gen_pseudo => $gen_quasi 
    83         or croak "Unable to copy $gen_pseudo for testing: $!"; 
    84  
    85     my @dirs_needed = qw( 
    86         src 
    87         docs/resources 
    88         include/parrot 
    89         runtime/parrot/include 
    90         compilers/pge 
    91     ); 
    92     my @created = mkpath( 
    93         [ map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ], 
    94         0, 
    95         0777 
    96     ); 
    97     print STDERR "dirs created:  @created\n" if $DEBUG; 
    98     foreach my $f ( keys %testfiles ) { 
    99         my $src = File::Spec->catfile( $cwd, $testlibdir, $f ); 
    100         my $des = File::Spec->catfile( $builddir, $testfiles{$f}{start} ); 
    101         copy $src, $des or croak "Unable to copy $f for testing: $!"; 
    102     } 
    103     my $addlib = qq{$cwd/lib}; 
    104     my $cmd = qq{$^X -I$addlib $full_installer --prefix=$prefixdir}; 
    105     $cmd .= qq{ --includedir=$includedir}; 
    106     $cmd .= qq{ --libdir=$libdir}; 
    107     $cmd .= qq{ --versiondir=$versiondir}; 
    108     $cmd .= qq{ --docdir=$docdir}; 
    109 #    $cmd .= qq{ --dry-run=1} if $DEBUG; 
    110     $cmd .= qq{ MANIFEST MANIFEST.generated}; 
    111     print "cmd: $cmd\n" if $DEBUG; 
    112     my ($stdout, $stderr); 
    113     capture( 
    114         sub { 
    115             system( $cmd ) and croak "Unable to execute $installer: $!"; 
    116         }, 
    117         \$stdout, 
    118         \$stderr, 
    119     ); 
    120     like( $stdout, qr/^Installing/, "Got expected standard output" ); 
    121     print STDERR "out:  $stdout\n" if $DEBUG; 
    122     print STDERR "err:  $stderr\n" if $DEBUG; 
    123     my $seen = 0; 
    124     my $expected = scalar keys %testfiles; 
    125     foreach my $f ( keys %testfiles ) { 
    126         my $des = $testfiles{$f}{end}; 
    127         $seen++ if -f $des; 
    128     } 
    129     is( $seen, $expected, 
    130         "Got all $expected expected files in installation" ); 
    131  
    132     chdir $cwd 
    133         or croak "Unable to return to top-level directory after testing: $!"; 
    134 } 
    135  
    136 pass("Completed all tests in $0"); 
    137  
    138 ################### DOCUMENTATION ################### 
    139  
    140 =head1 NAME 
    141  
    142 overall.t - test tools/dev/install_files.pl 
    143  
    144 =head1 SYNOPSIS 
    145  
    146     % prove t/tools/install/overall.t 
    147  
    148 =head1 DESCRIPTION 
    149  
    150 This file simulates the operation of F<tools/dev/install_files.pl> and 
    151 sanity-checks the results. 
    152  
    153 =head1 AUTHOR 
    154  
    155 James E Keenan 
    156  
    157 =head1 SEE ALSO 
    158  
    159 F<tools/dev/install_files.pl>. 
    160  
    161 =cut 
    162  
    163 # Local Variables: 
    164 #   mode: cperl 
    165 #   cperl-indent-level: 4 
    166 #   fill-column: 100 
    167 # End: 
    168 # vim: expandtab shiftwidth=4: 
  • t/tools/pmc2cutils/04-dump_pmc.t

    diff --git a/t/tools/pmc2cutils/04-dump_pmc.t b/t/tools/pmc2cutils/04-dump_pmc.t
    index 0a8dc11..ddfe226 100644
    a b  
    44 
    55use strict; 
    66use warnings; 
     7use Carp; 
    78 
    89BEGIN { 
    910    use FindBin qw($Bin); 
     
    4344    my $temppmcdir = qq{$tdir/src/pmc}; 
    4445    ok( ( mkdir $temppmcdir ), "created src/pmc/ under tempdir" ); 
    4546 
    46     my @pmcfiles     = glob("$main::topdir/src/pmc/*.pmc"); 
     47    my @pmcfiles; 
     48    opendir my $DIRH, "$main::topdir/src/pmc" 
     49        or croak "Unable to open directory for reading"; 
     50    @pmcfiles = map { qq|$main::topdir/src/pmc/$_| } grep { ! m/^\./ } readdir $DIRH; 
     51    closedir $DIRH or croak; 
    4752    my $pmcfilecount = scalar(@pmcfiles); 
    4853    my $copycount; 
    4954    foreach my $pmcfile (@pmcfiles) {