Skip to content

Commit

Permalink
Remember the exe 'parrot_config' used in Configure.pl
Browse files Browse the repository at this point in the history
and use it in Pipp::Test::read_parrot_config().
  • Loading branch information
bschmalhofer committed Mar 8, 2009
1 parent aabbff7 commit c0e01f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Configure.pl
Expand Up @@ -68,7 +68,7 @@ END
}

# Create the Makefile using the information we just got
create_makefiles(
create_files(
\%config,
{ 'build/templates/Makefile.in' => 'Makefile',
'build/templates/src/pmc/Makefile.in' => 'src/pmc/Makefile',
Expand Down Expand Up @@ -116,10 +116,10 @@ sub read_parrot_config {


# Generate a Makefile from a configuration
sub create_makefiles {
my ($config, $makefiles) = @_;
sub create_files {
my ($config, $setup) = @_;

while (my ($template_fn, $target_fn) = each %{$makefiles}) {
while (my ($template_fn, $target_fn) = each %{$setup}) {
my $content;
{
open my $template_fh, '<', $template_fn or
Expand Down
8 changes: 7 additions & 1 deletion build/templates/lib/Pipp/FindParrot_pm.in
@@ -1,3 +1,9 @@
use lib '/home/bernhard/devel/Parrot/install/lib/parrot/0.9.1-devel/tools/lib';
# Set up @INC, so that the Parrot::* modules of an installed Parrot is found

use lib '@lib_dir@@versiondir@/tools/lib';

package Pipp::FindParrot;

our $parrot_config = '@bin_dir@/parrot_config';

1;
6 changes: 3 additions & 3 deletions lib/Pipp/Test.pm
Expand Up @@ -109,13 +109,12 @@ package Pipp::Test;

use strict;
use warnings;
use lib qw( lib );

use Cwd;
use File::Spec;
use File::Basename;
use Memoize ();

use lib qw( lib );
use Pipp::FindParrot;

require Exporter;
require Test::Builder;
Expand Down Expand Up @@ -388,6 +387,7 @@ sub _prepare_exit_message {

sub read_parrot_config {
my @parrot_config_exe = (
$Pipp::FindParrot::parrot_config,
'parrot/parrot_config',
'../../parrot_config',
'parrot_config'
Expand Down

0 comments on commit c0e01f7

Please sign in to comment.