[svn:parrot] r42544 - trunk/tools/dev
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue Nov 17 08:50:57 UTC 2009
Author: chromatic
Date: Tue Nov 17 08:50:57 2009
New Revision: 42544
URL: https://trac.parrot.org/parrot/changeset/42544
Log:
[pbc_to_exe] Fixed pbc_to_exe to allow the generation of installable
fakecutables when the source PBC has a directory path (RT #57236).
Modified:
trunk/tools/dev/pbc_to_exe.pir
Modified: trunk/tools/dev/pbc_to_exe.pir
==============================================================================
--- trunk/tools/dev/pbc_to_exe.pir Tue Nov 17 08:46:55 2009 (r42543)
+++ trunk/tools/dev/pbc_to_exe.pir Tue Nov 17 08:50:57 2009 (r42544)
@@ -31,7 +31,6 @@
(infile, cfile, objfile, exefile) = 'handle_args'(argv)
unless infile > '' goto err_infile
-
.local string code_type
code_type = 'determine_code_type'()
@@ -164,7 +163,7 @@
cfile = 'replace_pbc_extension'(infile, '.c')
objfile = 'replace_pbc_extension'(infile, obj)
$S0 = 'replace_pbc_extension'(infile, exe)
- exefile = concat 'installable_', $S0
+ exefile = 'prepend_installable'($S0)
.return(infile, cfile, objfile, exefile)
@@ -680,6 +679,26 @@
.return()
.end
+# handle any directory components
+.sub 'prepend_installable'
+ .param string file
+
+ $P0 = '_config'()
+
+ .local string slash
+ slash = $P0['slash']
+
+ .local pmc path
+ path = split slash, file
+
+ file = path[-1]
+ file = concat 'installable_', file
+ path[-1] = file
+
+ file = join slash, path
+
+ .return( file )
+.end
# Local Variables:
# mode: pir
More information about the parrot-commits
mailing list