changeset 2448:a82e71679b03

JamVM: Try --with-additional-vms=jamvm topping! 2011-02-23 Xerxes Ranby <xerxes@zafena.se> JamVM: Try --with-additional-vms=jamvm topping! * NEWS: Updated. * Makefile.am (stamps/add-jamvm.stamp): New make target. (clean-add-jamvm): Likewise. (stamps/add-jamvm-debug.stamp): Likewise. (clean-add-jamvm-debug): Likewise. (.PHONY): Add clean-add-jamvm and clean-add-jamvm-debug. (stamps/icedtea-against-icedtea.stamp): Add stamps/add-jamvm.stamp. (clean-icedtea-against-icedtea): Add clean-add-jamvm. (stamps/icedtea-debug-against-icedtea.stamp): Add stamps/add-jamvm-debug.stamp. (clean-icedtea-debug-against-icedtea): Add clean-add-jamvm-debug. * acinclude.m4 (IT_CHECK_ADDITIONAL_VMS): Set add_vm_jamvm if jamvm are found. (BUILD_JAMVM): Add check for add_vm_jamvm. (ADD_JAMVM_BUILD): New conditional dependent on add_vm_jamvm.
author Xerxes R?nby <xerxes@zafena.se>
date Wed, 23 Feb 2011 12:30:22 +0100
parents 11715c17ead8
children 69e952bd19fd
files ChangeLog Makefile.am NEWS acinclude.m4
diffstat 4 files changed, 71 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 23 09:11:57 2011 +0100
+++ b/ChangeLog	Wed Feb 23 12:30:22 2011 +0100
@@ -1,3 +1,22 @@
+2011-02-23  Xerxes Ranby  <xerxes@zafena.se>
+
+	JamVM: Try --with-additional-vms=jamvm topping!
+	* NEWS: Updated.
+	* Makefile.am (stamps/add-jamvm.stamp): New make target.
+	(clean-add-jamvm): Likewise.
+	(stamps/add-jamvm-debug.stamp): Likewise.
+	(clean-add-jamvm-debug): Likewise.
+	(.PHONY): Add clean-add-jamvm and clean-add-jamvm-debug.
+	(stamps/icedtea-against-icedtea.stamp): Add stamps/add-jamvm.stamp.
+	(clean-icedtea-against-icedtea): Add clean-add-jamvm.
+	(stamps/icedtea-debug-against-icedtea.stamp):
+	Add stamps/add-jamvm-debug.stamp.
+	(clean-icedtea-debug-against-icedtea): Add clean-add-jamvm-debug.
+	* acinclude.m4 (IT_CHECK_ADDITIONAL_VMS):
+	Set add_vm_jamvm if jamvm are found.
+	(BUILD_JAMVM): Add check for add_vm_jamvm.
+	(ADD_JAMVM_BUILD): New conditional dependent on add_vm_jamvm.
+
 2011-02-23  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* Makefile.am: Add new patch.
--- a/Makefile.am	Wed Feb 23 09:11:57 2011 +0100
+++ b/Makefile.am	Wed Feb 23 12:30:22 2011 +0100
@@ -610,7 +610,7 @@
 	hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \
 	clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \
 	clean-icedtea-against-ecj \
-	clean-jamvm \
+	clean-jamvm clean-add-jamvm clean-add-jamvm-debug \
 	clean-cacao clean-add-cacao clean-add-cacao-debug \
 	clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \
 	clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \
@@ -1376,22 +1376,26 @@
 	rm -rf $(DEBUG_BUILD_OUTPUT_DIR)
 	rm -f stamps/icedtea-debug.stamp
 
-stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \
+stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp \
+ stamps/add-jamvm.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \
  stamps/add-systemtap.stamp stamps/add-pulseaudio.stamp stamps/add-nss.stamp stamps/add-tzdata-support.stamp
 	mkdir -p stamps
 	touch stamps/icedtea-against-icedtea.stamp
 
-clean-icedtea-against-icedtea: clean-add-zero clean-add-cacao clean-add-systemtap clean-add-pulseaudio \
+clean-icedtea-against-icedtea: clean-add-jamvm clean-add-zero clean-add-cacao \
+ clean-add-systemtap clean-add-pulseaudio \
  clean-add-nss clean-add-tzdata-support
 	rm -f stamps/icedtea-against-icedtea.stamp
 
-stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp stamps/add-cacao-debug.stamp \
+stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \
+ stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \
  stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \
  stamps/add-nss-debug.stamp stamps/add/tzdata-support-debug.stamp
 	mkdir -p stamps
 	touch stamps/icedtea-debug-against-icedtea.stamp
 
-clean-icedtea-debug-against-icedtea: clean-add-zero-debug clean-add-cacao-debug clean-add-systemtap-debug \
+clean-icedtea-debug-against-icedtea: clean-add-zero-debug \
+ clean-add-jamvm-debug clean-add-cacao-debug clean-add-systemtap-debug \
  clean-add-pulseaudio-debug clean-add-nss-debug clean-add-tzdata-support-debug
 	rm -f stamps/icedtea-debug-against-icedtea.stamp
 
@@ -1796,6 +1800,40 @@
 	rm -f stamps/jamvm.stamp
 	rm -f stamps/extract-jamvm.stamp
 
+# Targets for additional VMs
+
+stamps/add-jamvm.stamp: stamps/icedtea.stamp stamps/jamvm.stamp
+if ADD_JAMVM_BUILD
+	mkdir -p $(BUILD_JRE_ARCH_DIR)/jamvm
+	install -m 644 jamvm/install/lib/libjvm.so \
+		$(BUILD_JRE_ARCH_DIR)/jamvm/
+	printf -- '-jamvm KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+else
+	printf -- '-jamvm ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+endif
+	touch $@
+
+clean-add-jamvm:
+	rm -rf $(BUILD_JRE_ARCH_DIR)/jamvm
+	sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg
+	rm -f stamps/add-jamvm.stamp
+
+stamps/add-jamvm-debug.stamp: stamps/icedtea-debug.stamp stamps/jamvm.stamp
+if ADD_JAMVM_BUILD
+	mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm
+	install -m 644 jamvm/install/lib/libjvm.so \
+		$(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm/
+	printf -- '-jamvm KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+else
+	printf -- '-jamvm ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+endif
+	touch $@
+
+clean-add-jamvm-debug:
+	rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm
+	sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg
+	rm -f stamps/add-jamvm-debug.stamp
+
 # CACAO
 
 stamps/cacao.stamp: $(OPENJDK_TREE) stamps/rt.stamp
--- a/NEWS	Wed Feb 23 09:11:57 2011 +0100
+++ b/NEWS	Wed Feb 23 12:30:22 2011 +0100
@@ -16,6 +16,8 @@
 * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap
 * Support for building with HotSpot 20 from its stable tree
 * Added out-of-the-box JamVM support using --enable-jamvm
+* Allow building of JamVM beside the default VM by using
+  --with-additional-vms=jamvm
 * Import of OpenJDK6 b21 including upgrade to HotSpot 19
   - S6961870: More rebranding fixes for templates/gpl-*-header files
   - S6976186: Shark build system changes
--- a/acinclude.m4	Wed Feb 23 09:11:57 2011 +0100
+++ b/acinclude.m4	Wed Feb 23 12:30:22 2011 +0100
@@ -1199,13 +1199,14 @@
 AC_MSG_CHECKING([for additional virtual machines to build])
 AC_ARG_WITH(additional-vms,
             AC_HELP_STRING([--with-additional-vms=vm-list],
-	    [build additional virtual machines. Valid value is a comma separated string with the backend names `cacao', `zero' and `shark'.]),
+	    [build additional virtual machines. Valid value is a comma separated string with the backend names `jamvm', `cacao', `zero' and `shark'.]),
 [
 if test "x${withval}" != x
 then
   with_additional_vms=${withval}
   for vm in `echo $with_additional_vms | sed 's/,/ /g'`; do
     case "x$vm" in
+      xjamvm) add_vm_jamvm=yes;;
       xcacao) add_vm_cacao=yes;;
       xzero)  add_vm_zero=yes;;
       xshark) add_vm_shark=yes;;
@@ -1218,12 +1219,16 @@
 fi
 AC_MSG_RESULT($with_additional_vms)
 
+AM_CONDITIONAL(ADD_JAMVM_BUILD, test x$add_vm_jamvm != x)
 AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x)
 AM_CONDITIONAL(ADD_ZERO_BUILD,  test x$add_vm_zero  != x || test x$add_vm_shark != x)
 AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x)
-AM_CONDITIONAL(BUILD_JAMVM, test "x${ENABLE_JAMVM}" = xyes)
+AM_CONDITIONAL(BUILD_JAMVM, test x$add_vm_jamvm != x || test "x${ENABLE_JAMVM}" = xyes)
 AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes)
 
+if test "x${ENABLE_JAMVM}" = xyes && test "x${ADD_JAMVM_BUILD_TRUE}" = x; then
+  AC_MSG_ERROR([additional vm is the default vm])
+fi
 if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then
   AC_MSG_ERROR([additional vm is the default vm])
 fi