3 # Copy all of the source, header, object and intermediate files in `src`
4 # to the blib6 archlib, so that it will all get installed. This is
5 # needed to be able to build Haskell based Perl6 extensions outside of
9 use File
::Copy
qw(copy);
10 use File
::Path
qw(mkpath);
15 # copy_all('src', 'blib6/arch/CORE/pugs');
16 copy_all
("$_/blib/", 'blib6/pugs/perl5') for <perl5
/*>;
17 copy_all
("$_/blib6/", 'blib6/pugs/perl6') for <perl5
/*>;
18 copy_all
("$_/blibjs/", 'blib6/pugs/js') for <perl5
/*>;
21 utime undef, undef, @pmc_files;
23 print "*** Successfully built! Type '$Config{make} install' to install.\n";
25 # make an educated guess of whether we'll need root permission.
26 print " (You may need to do that as the 'root' user.)\n"
27 unless -w
$Config{sitelib
};
30 my ($src, $dest) = @_;
33 opendir(DIR
, $src) or warn "opendir failed for $src: $!", return;
34 my @nodes = readdir(DIR
);
35 foreach my $node (sort @nodes) {
36 next if $node =~ /^(\.|\.\.|\.svn|t)$/;
37 my $src_path = "$src/$node";
38 my $dest_path = "$dest/$node";
40 copy
($src_path, $dest_path);
43 copy_all
($src_path, $dest_path);
45 push @pmc_files, $dest_path if $node =~ m/\.pmc$/;