[svn:parrot] r42389 - trunk/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Mon Nov 9 18:34:21 UTC 2009
Author: fperrad
Date: Mon Nov 9 18:34:20 2009
New Revision: 42389
URL: https://trac.parrot.org/parrot/changeset/42389
Log:
[distutils] fix dynpmc, pmc2c works only in the current directory
Modified:
trunk/runtime/parrot/library/distutils.pir
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Mon Nov 9 18:06:12 2009 (r42388)
+++ trunk/runtime/parrot/library/distutils.pir Mon Nov 9 18:34:20 2009 (r42389)
@@ -733,21 +733,32 @@
pmc2c_includes .= " --include "
pmc2c_includes .= $S0
pmc2c_includes .= "/pmc"
+ .local string current_dir
+ current_dir = cwd()
+ $S0 = dirname(src)
+ chdir($S0)
+
.local string cmd
cmd = clone pmc2c
cmd .= " --dump "
cmd .= pmc2c_includes
cmd .= " "
- cmd .= src
+# cmd .= src
+ $S0 = basename(src)
+ cmd .= $S0
system(cmd)
cmd = clone pmc2c
cmd .= " --c "
cmd .= pmc2c_includes
cmd .= " "
- cmd .= src
+# cmd .= src
+ $S0 = basename(src)
+ cmd .= $S0
system(cmd)
+ chdir(current_dir)
+
$S0 = config['o']
$S1 = _mk_path_gen_dynpmc(src, $S0)
$S2 = _mk_path_gen_dynpmc(src, '.c')
@@ -768,6 +779,7 @@
current_dir = cwd()
$S0 = dirname(src)
chdir($S0)
+
.local string cmd
cmd = config['perl']
cmd .= " "
@@ -791,10 +803,13 @@
goto L1
L2:
system(cmd)
+
chdir(current_dir)
+
$S1 = _mk_path_gen_dynpmc_group(src, group, obj)
$S2 = _mk_path_gen_dynpmc_group(src, group, '.c')
__compile_cc($S1, $S2, cflags)
+
cmd = config['ld']
cmd .= " "
$S0 = config['ld_out']
@@ -829,7 +844,6 @@
L5:
cmd .= ldflags
system(cmd)
-
.end
.sub '_mk_path_dynpmc' :anon
More information about the parrot-commits
mailing list