Skip to content

Commit

Permalink
Generate lib/Pipp/FindParrot.pm and use it in t/harness
Browse files Browse the repository at this point in the history
Find the Parrot::* modules of an installed Parrot
  • Loading branch information
bschmalhofer committed Mar 8, 2009
1 parent 66a790c commit aabbff7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
28 changes: 22 additions & 6 deletions Configure.pl
@@ -1,11 +1,26 @@
#! perl
# Copyright (C) 2009 The Perl Foundation

=head1 NAME
Configure.pl - a configure script for a high level language running on Parrot
=head1 SYNOPSIS
perl Configure.pl --help
perl Configure.pl
perl Configure.pl --parrot_config=<path_to_parrot>
perl Configure.pl --gen-parrot
=cut

use strict;
use warnings;
use 5.008;


my %valid_options = (
'help' => 'Display configuration help',
'parrot-config' => 'Use configuration given by parrot_config binary',
Expand All @@ -32,9 +47,9 @@

# Get a list of parrot-configs to invoke.
my @parrot_config_exe = (
"parrot/parrot_config",
"../../parrot_config",
"parrot_config"
'parrot/parrot_config',
'../../parrot_config',
'parrot_config'
);
if ($options{'parrot-config'} && $options{'parrot-config'} ne '1') {
@parrot_config_exe = ($options{'parrot-config'});
Expand All @@ -55,8 +70,9 @@ END
# Create the Makefile using the information we just got
create_makefiles(
\%config,
{ 'build/templates/Makefile.in' => 'Makefile',
'build/templates/src/pmc/Makefile.in' => 'src/pmc/Makefile',
{ 'build/templates/Makefile.in' => 'Makefile',
'build/templates/src/pmc/Makefile.in' => 'src/pmc/Makefile',
'build/templates/lib/Pipp/FindParrot_pm.in' => 'lib/Pipp/FindParrot.pm',
}
);

Expand Down
3 changes: 3 additions & 0 deletions build/templates/lib/Pipp/FindParrot_pm.in
@@ -0,0 +1,3 @@
use lib '/home/bernhard/devel/Parrot/install/lib/parrot/0.9.1-devel/tools/lib';

1;
2 changes: 2 additions & 0 deletions t/harness
Expand Up @@ -30,6 +30,7 @@ use strict;
use warnings;
use FindBin ();
use lib "$FindBin::Bin/../../../lib", "$FindBin::Bin/../lib", "$FindBin::Bin/../parrot/lib";
use Pipp::FindParrot;

use Cwd ();
use File::Spec ();
Expand All @@ -38,6 +39,7 @@ use TAP::Harness::Archive 0.12;
use Getopt::Long;
use Parrot::Harness::Smoke;


my ( $send_to_smolder_flag, $archive_flag, $verbose_flag );
my ( $php_flag, $pct_flag, $phc_flag);
GetOptions(
Expand Down

0 comments on commit aabbff7

Please sign in to comment.