root/make_build_perl5

Revision 11788, 1.0 kB (checked in by markstos, 2 years ago)

Solve the need-GHC-just-to-play-with-v6 problem.

See http://use.perl.org/~clkao/journal/30407 for a description and
the specific problem I posted in a comment there.

The solution:

Instead of:

perl Makefile.PL && make build_perl5 # Requires GHC!

Just:

./make_build_perl5

There is room for refinement:

  • This script is dumb about finding a good "make" to use.
  • perhaps it makes sense to roll in "util/src_to_blib.pl" ?
  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2
3# Use this script as an alternative to "perl Makefile.PL && make build_perl" if you don't have GHC installed.
4
5=pod
6
7  ./make_build_perl5;
8  perl util/src_to_blib.pl;
9  util/prove6 t/01-sanity
10
11There might be a few modules missing, install them from CPAN. You will see the
12tc files after you run the tests.
13
14This script is dumb about finding the right 'make' to use.
15You may need to edit it to provide the correct value.
16
17=cut 
18
19$MAKE = 'make';
20
21my @cmds = for_perl5("cd __DIR__ && perl Makefile.PL && $MAKE");
22
23for (@cmds) {
24    system($_);
25}
26
27####
28
29sub for_perl5 {
30    my $cmd = shift;
31    $cmd =~ s{\n}{}g;
32    my @cmds;
33    foreach my $dir (grep { -d } glob('perl5/*')) {
34        -e "$dir/Makefile.PL" or next;
35
36        # Skip XS modules for now
37        next if glob("$dir/*.xs") or glob("$dir/*.i");
38
39        my $this = $cmd;
40        $this =~ s{__DIR__}{$dir}g;
41        push @cmds, $this;
42    }
43    # Changed from Makefile.PL to just return the commands
44    return @cmds;
45}
46
47# vim:ft=perl
Note: See TracBrowser for help on using the browser.