Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change search path for Parrot: auto-find it in sibling Rakudo subdir
  • Loading branch information
chrisdolan committed Feb 23, 2009
1 parent dc4fd26 commit fb6400e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
14 changes: 9 additions & 5 deletions Makefile
@@ -1,5 +1,7 @@
PERL = perl
PARROTDIR = ../..

# Look for parrot in sibling Rakudo subdir, or own subdir, or up two (indicating we're in parrot/languages/perk)
PARROTDIR = $(shell $(PERL) -le'print -e "../rakudo/parrot/parrot" ? "../rakudo/parrot" : -e "parrot/parrot" ? "parrot" : "../.."')
PARROT = $(PARROTDIR)/parrot
MERGEPBC = $(PARROTDIR)/pbc_merge
PCTDIR = $(PARROTDIR)/runtime/parrot/library
Expand Down Expand Up @@ -28,14 +30,16 @@ perk.pir: $(PIR) perk.pl $(PERL6PBC)
$(PERL6PBC): $(PERL6DIR)/perl6.pbc Makefile
$(CP) $< $@

TEST_HARNESS = $(ENV) PARROTEXE=$(PARROT) $(PERL) t/harness

test: build
$(ENV) $(PERL) t/harness
$(TEST_HARNESS)
test-parse: build
$(ENV) $(PERL) t/harness --target=parse
$(TEST_HARNESS) --target=parse
test-past: build
$(ENV) $(PERL) t/harness --target=past
$(TEST_HARNESS) --target=past
test-pir: build
$(ENV) $(PERL) t/harness --target=pir
$(TEST_HARNESS) --target=pir

clean:
$(RM) $(PIR) $(PBC) perk.pbc perk.pir perl6.pbc
Expand Down
5 changes: 2 additions & 3 deletions t/harness
Expand Up @@ -7,10 +7,11 @@ use strict;
use warnings;
use 5.008;

use lib qw( . lib ../lib ../../lib ../../lib );
use File::Find qw(find);
use File::Spec;

my $parrot = $ENV{PARROTEXE} || File::Spec->catfile('..', '..', 'parrot');

my @tests;
find({wanted => sub {
return unless m/\.java\z/;
Expand All @@ -25,11 +26,9 @@ find({wanted => sub {
}
}, no_chdir => 1}, 't');

my $parrot = File::Spec->catfile('..', '..', 'parrot');
for my $test (sort @tests) {
print "==== $test ====\n";
my @cmd = ($parrot, 'perk.pbc', @ARGV, $test);
#print " cmd: env PERL6LIB=$ENV{PERL6LIB} @cmd\n";
print " cmd: @cmd\n";
system(@cmd);
}

0 comments on commit fb6400e

Please sign in to comment.