[svn:parrot] r45283 - trunk/lib/Parrot/Pmc2c

fperrad at svn.parrot.org fperrad at svn.parrot.org
Mon Mar 29 20:00:57 UTC 2010


Author: fperrad
Date: Mon Mar 29 20:00:55 2010
New Revision: 45283
URL: https://trac.parrot.org/parrot/changeset/45283

Log:
[pmc2c] fix generation for filename with path

Modified:
   trunk/lib/Parrot/Pmc2c/Library.pm

Modified: trunk/lib/Parrot/Pmc2c/Library.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/Library.pm	Mon Mar 29 17:22:42 2010	(r45282)
+++ trunk/lib/Parrot/Pmc2c/Library.pm	Mon Mar 29 20:00:55 2010	(r45283)
@@ -24,6 +24,7 @@
 
 use strict;
 use warnings;
+use File::Basename qw(basename);
 use Parrot::Pmc2c::PMCEmitter ();
 use Parrot::Pmc2c::UtilFunctions qw(dont_edit dynext_load_code c_code_coda spew);
 
@@ -36,8 +37,9 @@
 sub generate_library {
     my ( $class, $library_name, $pmcs ) = @_;
 
-    spew( "$library_name.c", gen_c( $library_name, $pmcs ) );
-    spew( "$library_name.h", gen_h($library_name) );
+    my $basename = basename($library_name);
+    spew( $library_name . '.c', gen_c( $basename, $pmcs ) );
+    spew( $library_name . '.h', gen_h( $basename ) );
 }
 
 =item C<gen_h>


More information about the parrot-commits mailing list