[svn:parrot] r44323 - trunk/runtime/parrot/library/Configure

fperrad at svn.parrot.org fperrad at svn.parrot.org
Mon Feb 22 22:16:13 UTC 2010


Author: fperrad
Date: Mon Feb 22 22:16:13 2010
New Revision: 44323
URL: https://trac.parrot.org/parrot/changeset/44323

Log:
[gengile] don't replace slash on source file (only on Makefile)

Modified:
   trunk/runtime/parrot/library/Configure/genfile.pir

Modified: trunk/runtime/parrot/library/Configure/genfile.pir
==============================================================================
--- trunk/runtime/parrot/library/Configure/genfile.pir	Mon Feb 22 22:12:02 2010	(r44322)
+++ trunk/runtime/parrot/library/Configure/genfile.pir	Mon Feb 22 22:16:13 2010	(r44323)
@@ -46,17 +46,28 @@
     .param pmc config
     .param int verbose          :named('verbose') :optional
     .param int has_verbose      :opt_flag
+    .local int flag_replace_slash
+    flag_replace_slash = 1
+    $I0 = index outfile, '.'
+    if $I0 < 0 goto L1
+    $S0 = substr outfile, $I0
+    $I0 = index '.c .h .pir .pmc .t', $S0
+    if $I0 < 0 goto L1
+    flag_replace_slash = 0
+  L1:
     $S0 = slurp(tmpl)
     $S0 = conditioned_line($S0, config)
     $S0 = interpolate_var($S0, config)
     $S1 = sysinfo .SYSINFO_PARROT_OS
+    unless flag_replace_slash goto L2
     $S0 = replace_slash($S0, $S1)
+  L2:
     spew(outfile, $S0)
-    unless has_verbose goto L1
-    unless verbose goto L1
+    unless has_verbose goto L3
+    unless verbose goto L3
     print "generate "
     say outfile
-  L1:
+  L3:
 .end
 
 .sub 'slurp' :anon


More information about the parrot-commits mailing list