From: Stefan Ring Date: Tue, 2 Nov 2010 11:24:14 +0000 (+0100) Subject: * configure.ac: Bump version, append hg revision. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=cacao.git;a=commitdiff_plain;h=c7982045b8e1a27aca0c14398bd17a90f88ae8cc * configure.ac: Bump version, append hg revision. * 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. --- diff --git a/configure.ac b/configure.ac index 5a8539f57..dd46a9932 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl 02110-1301, USA. 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 @@ -579,6 +579,7 @@ AC_CHECK_ENABLE_ASSERTION dnl This one depends on AC_CHECK_ENABLE_ZLIB. AC_CHECK_WITH_VM_ZIP +AC_CHECK_WITH_HGREV AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY diff --git a/m4/hgrev.m4 b/m4/hgrev.m4 new file mode 100644 index 000000000..2a6627e10 --- /dev/null +++ b/m4/hgrev.m4 @@ -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=, 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) +]) diff --git a/m4/version.m4 b/m4/version.m4 index 2df93aeb8..8b0394637 100644 --- a/m4/version.m4 +++ b/m4/version.m4 @@ -37,11 +37,16 @@ else 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_FULL, "$major.$minor.$micro$extra", [full version info]) ]) diff --git a/src/threads/threadlist.cpp b/src/threads/threadlist.cpp index 70ad27683..ce055a083 100644 --- a/src/threads/threadlist.cpp +++ b/src/threads/threadlist.cpp @@ -64,7 +64,7 @@ void ThreadList::dump_threads() // 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; diff --git a/src/vm/properties.cpp b/src/vm/properties.cpp index a13b8b6dd..cb49e96ac 100644 --- a/src/vm/properties.cpp +++ b/src/vm/properties.cpp @@ -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.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"); @@ -346,7 +346,7 @@ Properties::Properties() uname(utsnamebuf); - put("java.runtime.version", VERSION); + put("java.runtime.version", VERSION_FULL); put("java.runtime.name", "CACAO"); put("java.specification.version", "1.5"); diff --git a/src/vm/vm.cpp b/src/vm/vm.cpp index 38b9d4e4c..a4be50fa5 100644 --- a/src/vm/vm.cpp +++ b/src/vm/vm.cpp @@ -540,9 +540,9 @@ static void XXusage(void) 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."); @@ -1471,7 +1471,7 @@ VM::VM(JavaVMInitArgs* vm_args) */ 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__)