[svn:parrot] r42486 - trunk/runtime/parrot/library

fperrad at svn.parrot.org fperrad at svn.parrot.org
Fri Nov 13 20:21:24 UTC 2009


Author: fperrad
Date: Fri Nov 13 20:21:21 2009
New Revision: 42486
URL: https://trac.parrot.org/parrot/changeset/42486

Log:
[distutils] add get_nqp()

Modified:
   trunk/runtime/parrot/library/distutils.pir

Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir	Fri Nov 13 16:51:54 2009	(r42485)
+++ trunk/runtime/parrot/library/distutils.pir	Fri Nov 13 20:21:21 2009	(r42486)
@@ -476,10 +476,7 @@
     $I0 = newer(pir, nqp)
     if $I0 goto L1
     .local string cmd
-    cmd = get_bindir()
-    cmd .= "/parrot-nqp"
-    $S0 = get_exe()
-    cmd .= $S0
+    cmd = get_nqp()
     cmd .= " --target=pir --output="
     cmd .= pir
     cmd .= " "
@@ -701,7 +698,7 @@
     system(cmd)
 .end
 
-.sub '__compile_cc' :anon
+.sub '__compile_cc'
     .param string obj
     .param string src
     .param string cflags
@@ -824,6 +821,7 @@
     __build_dynpmc(src, cflags)
     goto L3
   L4:
+    if group == '' goto L1
     $S0 = _mk_path_dynpmc(group, load_ext)
     $I0 = newer($S0, srcs)
     if $I0 goto L1
@@ -1908,6 +1906,19 @@
     .return ($S0)
 .end
 
+=item get_nqp
+
+=cut
+
+.sub 'get_nqp'
+    $P0 = get_config()
+    $S0 = $P0['bindir']
+    $S0 .= '/parrot-nqp'
+    $S1 = $P0['exe']
+    $S0 .= $S1
+    .return ($S0)
+.end
+
 =item get_srcdir
 
 =cut


More information about the parrot-commits mailing list