[svn:parrot] r45129 - trunk/compilers/pct/src/PCT

gerd at svn.parrot.org gerd at svn.parrot.org
Tue Mar 23 14:01:32 UTC 2010


Author: gerd
Date: Tue Mar 23 14:01:28 2010
New Revision: 45129
URL: https://trac.parrot.org/parrot/changeset/45129

Log:
Gives out the version number, if a release is used and the revision number, if a svn checkout is used

Modified:
   trunk/compilers/pct/src/PCT/HLLCompiler.pir

Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir	Tue Mar 23 13:51:54 2010	(r45128)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir	Tue Mar 23 14:01:28 2010	(r45129)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -55,13 +55,22 @@
 
     $S0  = '???'
     push_eh _handler
-    $P0  = _config()    # currently works in the build tree, but not in the install tree
-    $S0  = $P0['revision']
+    $P0  = _config()
+    $S0  = $P0['revision']   # also $I0 = P0['installed'] could be used
   _handler:
     pop_eh
-    $P2  = box 'This compiler is built with the Parrot Compiler Toolkit, parrot revision '
+    $P2  = box 'This compiler is built with the Parrot Compiler Toolkit, parrot '
+    if $S0 goto _revision_lab
+    $P2 .= 'version '
+    $S0 = $P0['VERSION']
     $P2 .= $S0
     $P2 .= '.'
+    goto _is_version
+  _revision_lab:
+    $P2 .= 'revision '
+    $P2 .= $S0
+    $P2 .= '.'
+  _is_version:
     setattribute self, '$version', $P2
 .end
 


More information about the parrot-commits mailing list