Permalink
Browse files

Add Parrot::Installed.pm

In order to get at the installed Parrot::Config.pm, we need to add
the installed lib dir to our path; figure out the path at config time



git-svn-id: http://partcl.googlecode.com/svn/trunk@350 6cb8db7d-f34b-0410-8f57-4f83c6281724
  • Loading branch information...
1 parent e85d055 commit c88d76275ba087051a40c9a9b09612d8217bccba wcoleda committed May 21, 2009
Showing with 17 additions and 3 deletions.
  1. +11 −0 Configure.pl
  2. +2 −1 config/makefiles/root.in
  3. +4 −2 lib/Tcl/Test.pm
View
@@ -4,6 +4,8 @@
use warnings;
use Getopt::Long;
+use Fatal qw(open);
+
my %options;
GetOptions(\%options, 'parrot-config=s', 'help|?') or usage();
usage() if $options{'help'};
@@ -45,6 +47,15 @@
system("$build_tool $template $makefile");
}
+
+print "Creating Parrot::Installed\n";
+
+open my $fh, '>', 'lib/Parrot/Installed.pm';
+
+print {$fh} "package Parrot::Installed;\n";
+print {$fh} "use lib qw(${libdir}${versiondir}/tools/lib);\n";
+print {$fh} "1;\n";
+
print <<"END";
You can now use '$make' to build partcl.
View
@@ -190,7 +190,8 @@ clean:
realclean: clean
$(RM_F) examples/Makefile Makefile t_tcl \
- $(PMCDIR)/Makefile $(OPSDIR)/Makefile
+ $(PMCDIR)/Makefile $(OPSDIR)/Makefile \
+ lib/Parrot/Installed.pm
distclean: realclean
View
@@ -6,12 +6,14 @@ package Tcl::Test;
use warnings;
use strict;
-use lib qw(../lib ../../lib ../../../lib ../../../../lib);
+use lib qw(lib);
+
+use Parrot::Installed;
use Parrot::Config;
use File::Spec;
sub import {
- my $parrot = File::Spec->catfile( $PConfig{bin_dir}, 'parrot' );
+ my $parrot = $PConfig{test_prog} . $PConfig{exe};
my $test = File::Spec->rel2abs($0);
if ( exists $ENV{TEST_PROG_ARGS} ) {

0 comments on commit c88d762

Please sign in to comment.