harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arc...@apache.org
Subject svn commit: r367419 - in /incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc: Makefile.am jc_invoke.c
Date Mon, 09 Jan 2006 22:33:26 GMT
Author: archie
Date: Mon Jan  9 14:33:24 2006
New Revision: 367419

URL: http://svn.apache.org/viewcvs?rev=367419&view=rev
Log:
Include the Subversion repository revision number in the output
of "jc --version".

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/Makefile.am
    incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/jc_invoke.c

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/Makefile.am
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/Makefile.am?rev=367419&r1=367418&r2=367419&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/Makefile.am (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/Makefile.am Mon
Jan  9 14:33:24 2006
@@ -50,6 +50,7 @@
 			thread.c \
 			utf.c \
 			verify.c \
+			version.c \
 			vm.c \
 			vm_alloc.c \
 			zip.c
@@ -84,6 +85,13 @@
 			inline.h \
 			structures.h \
 			zip.h
+
+EXTRA_DIST=		version.c
+
+version.c:
+	echo '#include "libjc.h"' > $@
+	echo 'const unsigned long _jc_svn_revision = '`svn info $(top_srcdir) \
+	  | grep '^Last Changed Rev:' | awk '{ print $$NF }'`';' >> $@
 
 AM_CFLAGS=		$(CFLAGS) @JC_CFLAGS@
 AM_CFLAGS+=		-D_AC_INCLUDEDIR=\"$(includedir)\"

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/jc_invoke.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/jc_invoke.c?rev=367419&r1=367418&r2=367419&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/jc_invoke.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/jc_invoke.c Mon
Jan  9 14:33:24 2006
@@ -61,6 +61,9 @@
 	const char	*prop;
 };
 
+/* Subversion revision from version.c */
+extern const unsigned long _jc_svn_revision;
+
 /* Verbosity options */
 static const	char *const jc_verbose[] = {
 	"class",
@@ -388,9 +391,10 @@
 		    }
 		case OPT_VERSION:
 			jc_print(printer, stdout,
-			    "JC virtual machine version %s\n"
-			    "Copyright (C) 2003-2005 Archie L. Cobbs\n"
-			    "All rights reserved.\n", VERSION);
+			    "JC virtual machine version %s (r%lu)\n"
+			    "Copyright (C) 2003-2006 Archie L. Cobbs\n"
+			    "All rights reserved.\n", VERSION,
+			    _jc_svn_revision);
 			rtn = _JC_RETURN_NORMAL;
 			goto done;
 		case OPT_COMPATOPTS:



Mime
View raw message