develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33429 - trunk/languages/perl6/tools

From:
particle
Date:
December 1, 2008 12:48
Subject:
[svn:parrot] r33429 - trunk/languages/perl6/tools
Message ID:
20081201204822.08E0ECB9AF@x12.develooper.com
Author: particle
Date: Mon Dec  1 12:48:20 2008
New Revision: 33429

Modified:
   trunk/languages/perl6/tools/rebase-rakudo.pl

Log:
[rakudo] take advantage of parrot's config to make rebase tool more portable

Modified: trunk/languages/perl6/tools/rebase-rakudo.pl
==============================================================================
--- trunk/languages/perl6/tools/rebase-rakudo.pl	(original)
+++ trunk/languages/perl6/tools/rebase-rakudo.pl	Mon Dec  1 12:48:20 2008
@@ -5,6 +5,9 @@
 use Cwd;
 use File::Spec;
 use Getopt::Long;
+use lib qw| lib ../lib ../../lib |;
+use Parrot::Config;
+
 
 my $help      = 0;
 my $verbose   = 0;
@@ -13,6 +16,8 @@
 my $test      = 0;
 my $codetest  = 0;
 my $spectest  = 0;
+my $make      = $PConfig{make};
+
 
 GetOptions('help!'      => \$help,
            'verbose!'   => \$verbose,
@@ -29,10 +34,10 @@
   -h|--help        print this usage info
   -v|--verbose     show verbose output
   -j|--jit         enable JIT during configuration
-  -t|--test        run 'make test'      after build
-  -c|--codetest    run 'make codetest'  after build
-  -s|--spectest    run 'make spectest'  after build
-  -r|--realclean   run 'make realclean' before rebase, and configure after
+  -t|--test        run '$make test'      after build
+  -c|--codetest    run '$make codetest'  after build
+  -s|--spectest    run '$make spectest'  after build
+  -r|--realclean   run '$make realclean' before rebase, and configure after
                    (default on; use --no-realclean to turn it off)
 
 For extra golfing goodness, try creating a shell alias
@@ -47,7 +52,7 @@
 
 if ($realclean && -e 'Makefile') {
     print "Cleaning old build ...\n";
-    run_command(qw( make realclean ));
+    run_command( $make, 'realclean' );
 }
 
 print "Rebasing Parrot ...\n";
@@ -64,25 +69,25 @@
 }
 
 print "Making Parrot ...\n";
-run_command(qw( make ));
+run_command( $make );
 
 print "Making Rakudo ...\n";
-run_command(qw( make perl6 ));
+run_command( $make, 'perl6' );
 
 if ($test) {
     print "Running standard Parrot tests ...\n";
-    run_command(qw( make test ));
+    run_command( $make, 'test' );
 }
 
 if ($codetest) {
     print "Running coding standard compliance tests ...\n";
-    run_command(qw( make codetest ));
+    run_command( $make, 'codetest' );
 }
 
 if ($spectest) {
     print "Running Perl 6 spec tests ...\n";
     chdir 'languages/perl6';
-    run_command(qw( make spectest ));
+    run_command( $make, 'spectest' );
 }
 
 print "Done.\n";



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About