* configure.ac: Bump version, append hg revision.
authorStefan Ring <stefan@complang.tuwien.ac.at>
Tue, 2 Nov 2010 11:24:14 +0000 (12:24 +0100)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Tue, 2 Nov 2010 11:24:14 +0000 (12:24 +0100)
* src/threads/threadlist.cpp: Use full version in user-visible strings.
* src/vm/properties.cpp: Likewise.
* src/vm/vm.cpp: Likewise.
* m4/hgrev.m4: Define AC_CHECK_WITH_HGREV.
* m4/version.m4: Append hg revision to VERSION_EXTRA.

configure.ac
m4/hgrev.m4 [new file with mode: 0644]
m4/version.m4
src/threads/threadlist.cpp
src/vm/properties.cpp
src/vm/vm.cpp

index 5a8539f57372d1a0130f29ecb2b7c315d0f2c368..dd46a9932506607fe1d5948acbcd5d56a836f485 100644 (file)
@@ -23,7 +23,7 @@ dnl 02110-1301, USA.
 dnl Process this file with autoconf to produce a configure script.
 
 
 dnl Process this file with autoconf to produce a configure script.
 
 
-AC_INIT(cacao, 1.1.0pre1, cacao@cacaojvm.org)
+AC_INIT(cacao, 1.1.0pre2, cacao@cacaojvm.org)
 AC_CONFIG_SRCDIR(src/cacao/cacao.cpp)
 AC_CONFIG_AUX_DIR([.])
 AC_CANONICAL_HOST
 AC_CONFIG_SRCDIR(src/cacao/cacao.cpp)
 AC_CONFIG_AUX_DIR([.])
 AC_CANONICAL_HOST
@@ -579,6 +579,7 @@ AC_CHECK_ENABLE_ASSERTION
 
 dnl This one depends on AC_CHECK_ENABLE_ZLIB.
 AC_CHECK_WITH_VM_ZIP
 
 dnl This one depends on AC_CHECK_ENABLE_ZLIB.
 AC_CHECK_WITH_VM_ZIP
+AC_CHECK_WITH_HGREV
 
 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY
 
 
 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY
 
diff --git a/m4/hgrev.m4 b/m4/hgrev.m4
new file mode 100644 (file)
index 0000000..2a6627e
--- /dev/null
@@ -0,0 +1,34 @@
+dnl m4/hgrev.m4
+dnl
+dnl Copyright (C) 2010
+dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl Mercurial revision
+
+AC_DEFUN([AC_CHECK_WITH_HGREV],[
+AC_MSG_CHECKING(for the Mercurial revision)
+AC_ARG_WITH([hg-revision],
+            [AS_HELP_STRING(--with-hg-revision=<hash>, the Mercurial revision used for this CACAO build)],
+            [CACAO_HGREV=${withval}])
+AC_MSG_RESULT(${CACAO_HGREV-not specified})
+AC_DEFINE_UNQUOTED([CACAO_HGREV], "${CACAO_HGREV}", [CACAO's Mercurial revision])
+AC_SUBST(CACAO_HGREV)
+])
index 2df93aeb8ab5eeb8968c2b5eb68cd9b70576c158..8b039463767cf6bb4e78d4132e845d10d4cdf3f3 100644 (file)
@@ -37,11 +37,16 @@ else
     micro=0
     extra=`echo "$version" | $SED -e 's/^[[0-9]]*\.[[0-9]]*//'`
 fi
     micro=0
     extra=`echo "$version" | $SED -e 's/^[[0-9]]*\.[[0-9]]*//'`
 fi
+if test ! "x$CACAO_HGREV" = "x";
+then
+    extra="$extra.hg$CACAO_HGREV"
+fi
 
 AC_DEFINE_UNQUOTED(VERSION_MAJOR, $major, [major version number])
 AC_DEFINE_UNQUOTED(VERSION_MINOR, $minor, [minor version number])
 AC_DEFINE_UNQUOTED(VERSION_MICRO, $micro, [micro version number])
 AC_DEFINE_UNQUOTED(VERSION_EXTRA, "$extra", [extra version info])
 
 AC_DEFINE_UNQUOTED(VERSION_MAJOR, $major, [major version number])
 AC_DEFINE_UNQUOTED(VERSION_MINOR, $minor, [minor version number])
 AC_DEFINE_UNQUOTED(VERSION_MICRO, $micro, [micro version number])
 AC_DEFINE_UNQUOTED(VERSION_EXTRA, "$extra", [extra version info])
+AC_DEFINE_UNQUOTED(VERSION_FULL, "$major.$minor.$micro$extra", [full version info])
 ])
 
 
 ])
 
 
index 70ad276835fb61cb07e10f95bf53e122172faa53..ce055a083e15ff9f2dddd9b19a89472cdd1aff60 100644 (file)
@@ -64,7 +64,7 @@ void ThreadList::dump_threads()
        // Lock the thread lists.
        lock();
 
        // Lock the thread lists.
        lock();
 
-       printf("Full thread dump CACAO "VERSION":\n");
+       printf("Full thread dump CACAO "VERSION_FULL":\n");
 
        // Iterate over all started threads.
        threadobject* self = THREADOBJECT;
 
        // Iterate over all started threads.
        threadobject* self = THREADOBJECT;
index a13b8b6dd2479777412dfdbd0694d71d0f660518..cb49e96acbc5db6af3f41ba89675037584ca3c59 100644 (file)
@@ -314,7 +314,7 @@ Properties::Properties()
        put("java.vm.specification.version", "1.0");
        put("java.vm.specification.vendor", "Sun Microsystems Inc.");
        put("java.vm.specification.name", "Java Virtual Machine Specification");
        put("java.vm.specification.version", "1.0");
        put("java.vm.specification.vendor", "Sun Microsystems Inc.");
        put("java.vm.specification.name", "Java Virtual Machine Specification");
-       put("java.vm.version", VERSION);
+       put("java.vm.version", VERSION_FULL);
        put("java.vm.vendor", "CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
        put("java.vm.name", "CACAO");
 
        put("java.vm.vendor", "CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
        put("java.vm.name", "CACAO");
 
@@ -346,7 +346,7 @@ Properties::Properties()
 
        uname(utsnamebuf);
 
 
        uname(utsnamebuf);
 
-       put("java.runtime.version", VERSION);
+       put("java.runtime.version", VERSION_FULL);
        put("java.runtime.name", "CACAO");
 
        put("java.specification.version", "1.5");
        put("java.runtime.name", "CACAO");
 
        put("java.specification.version", "1.5");
index 38b9d4e4c0ddf0fd3d0ceb11e8573fe3c52243ab..a4be50fa56d2195adb898d66356a92e1ce1ad35f 100644 (file)
@@ -540,9 +540,9 @@ static void XXusage(void)
 static void version(bool opt_exit)
 {
        puts("java version \""JAVA_VERSION"\"");
 static void version(bool opt_exit)
 {
        puts("java version \""JAVA_VERSION"\"");
-       puts("CACAO version "VERSION"\n");
+       puts("CACAO version "VERSION_FULL"\n");
 
 
-       puts("Copyright (C) 1996-2005, 2006, 2007, 2008, 2009");
+       puts("Copyright (C) 1996-2005, 2006, 2007, 2008, 2009, 2010");
        puts("CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
        puts("This is free software; see the source for copying conditions.  There is NO");
        puts("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
        puts("CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
        puts("This is free software; see the source for copying conditions.  There is NO");
        puts("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
@@ -1471,7 +1471,7 @@ VM::VM(JavaVMInitArgs* vm_args)
  */
 void VM::print_build_time_config(void)
 {
  */
 void VM::print_build_time_config(void)
 {
-       puts("CACAO "VERSION" configure/build options:");
+       puts("CACAO "VERSION_FULL" configure/build options:");
        puts("");
        puts("  ./configure: "VERSION_CONFIGURE_ARGS"");
 #if defined(__VERSION__)
        puts("");
        puts("  ./configure: "VERSION_CONFIGURE_ARGS"");
 #if defined(__VERSION__)