Author: Ralph Sennhauser Split out add-shark target. This way the shark build will end up in shark instead of zero and java -zero will work as expected. Ie. allows for easier setup of per app vm preferences if desired. Also removes a bunch of conditionals which will simplify writing jvm.cfg correctly without a full rebuild. diff --git a/Makefile.am b/Makefile.am index 129edf2..fc4cc20 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1740,7 +1740,7 @@ clean-icedtea: rm -f stamps/icedtea.stamp stamps/icedtea-debug.stamp stamps/icedtea-stage2.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp \ - stamps/add-zero.stamp stamps/add-jamvm.stamp + stamps/add-zero.stamp stamps/add-jamvm.stamp stamps/add-shark.stamp mkdir -p stamps touch $@ @@ -1748,7 +1748,8 @@ clean-icedtea-stage2: clean-add-jamvm rm -f stamps/icedtea-stage2.stamp stamps/icedtea-debug-stage2.stamp: stamps/icedtea-debug.stamp \ - stamps/add-cacao-debug.stamp stamps/add-zero-debug.stamp stamps/add-jamvm-debug.stamp + stamps/add-cacao-debug.stamp stamps/add-zero-debug.stamp stamps/add-jamvm-debug.stamp \ + stamps/add-shark-debug.stamp mkdir -p stamps touch $@ @@ -2060,12 +2061,7 @@ clean-add-cacao-debug: CONFIGURE_ARGS = @CONFIGURE_ARGS@ ADD_ZERO_CONFIGURE_ARGS = \ --with-jdk-home=$(BUILD_OUTPUT_DIR)/j2sdk-image \ - --disable-bootstrap --enable-zero -if ADD_SHARK_BUILD -ADD_ZERO_CONFIGURE_ARGS += \ - --enable-shark -endif -ADD_ZERO_CONFIGURE_ARGS += \ + --disable-bootstrap --enable-zero \ --disable-docs \ $(filter-out '--with-jdk-home=% '--with-ecj=% \ '--with-java=% '--with-javah=% \ @@ -2096,32 +2092,20 @@ if ADD_ZERO_BUILD $(ADD_ZERO_EXTRA_BUILD_ENV) \ $(ARCH_PREFIX) $(MAKE) -C zerovm ICEDTEA_BUILD_TARGET=hotspot icedtea-stage2 -if ZERO_BUILD - mkdir -p $(BUILD_JRE_ARCH_DIR)/shark - cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \ - $(BUILD_JRE_ARCH_DIR)/shark/ - printf -- '-shark KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg - printf -- '-zero ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg -else mkdir -p $(BUILD_JRE_ARCH_DIR)/zero cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \ $(BUILD_JRE_ARCH_DIR)/zero/ printf -- '-zero KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg - printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg -endif else printf -- '-zero ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg - printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg endif touch $@ clean-add-zero: rm -rf $(BUILD_JRE_ARCH_DIR)/zero - rm -rf $(BUILD_JRE_ARCH_DIR)/shark rm -rf zerovm if [ -e $(BUILD_JRE_ARCH_DIR)/jvm.cfg ] ; then \ sed -i 's#-zero KNOWN#-zero ERROR#' $(BUILD_JRE_ARCH_DIR)/jvm.cfg ; \ - sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_JRE_ARCH_DIR)/jvm.cfg ; \ fi rm -f stamps/add-zero.stamp @@ -2137,33 +2121,88 @@ if ADD_ZERO_BUILD $(ADD_ZERO_EXTRA_BUILD_ENV) \ $(ARCH_PREFIX) $(MAKE) -C zerovm ICEDTEA_DEBUG_BUILD_TARGET=hotspot icedtea-stage2 -if ZERO_BUILD - mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/shark - cp -a zerovm/$(BUILD_OUTPUT_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \ - $(BUILD_DEBUG_JRE_ARCH_DIR)/shark/ - printf -- '-shark KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg -else mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/zero cp -a zerovm/$(BUILD_OUTPUT_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \ $(BUILD_DEBUG_JRE_ARCH_DIR)/zero/ printf -- '-zero KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg -endif else printf -- '-zero ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg - printf -- '-shark ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg endif touch $@ clean-add-zero-debug: rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/zero - rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/shark rm -rf zerovm if [ -e $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ] ; then \ sed -i 's#-zero KNOWN#-zero ERROR#' $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ; \ - sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ; \ fi rm -f stamps/add-zero-debug.stamp +ADD_SHARK_CONFIGURE_ARGS = \ + $(ADD_ZERO_CONFIGURE_ARGS) \ + --enable-shark + +ADD_SHARK_EXTRA_BUILD_ENV = \ + $(ADD_ZERO_EXTRA_BUILD_ENV) + +stamps/add-shark.stamp: stamps/icedtea.stamp + mkdir -p stamps +if ADD_SHARK_BUILD + mkdir -p sharkvm + + cd sharkvm && \ + $(ADD_SHARK_EXTRA_BUILD_ENV) \ + $(ARCH_PREFIX) $(abs_top_srcdir)/configure $(ADD_SHARK_CONFIGURE_ARGS) + + $(ADD_SHARK_EXTRA_BUILD_ENV) \ + $(ARCH_PREFIX) $(MAKE) -C sharkvm ICEDTEA_BUILD_TARGET=hotspot icedtea-stage2 + + mkdir -p $(BUILD_JRE_ARCH_DIR)/shark + cp -a sharkvm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \ + $(BUILD_JRE_ARCH_DIR)/shark/ + printf -- '-shark KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg +else + printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg +endif + touch $@ + +clean-add-shark: + rm -rf $(BUILD_JRE_ARCH_DIR)/shark + rm -rf sharkvm + if [ -e $(BUILD_JRE_ARCH_DIR)/jvm.cfg ] ; then \ + sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_JRE_ARCH_DIR)/jvm.cfg ; \ + fi + rm -f stamps/add-shark.stamp + +stamps/add-shark-debug.stamp: stamps/icedtea-debug.stamp + mkdir -p stamps +if ADD_SHARK_BUILD + mkdir -p sharkvm + + cd sharkvm && \ + $(ADD_SHARK_EXTRA_BUILD_ENV) \ + $(ARCH_PREFIX) $(abs_top_srcdir)/configure $(ADD_SHARK_CONFIGURE_ARGS) + + $(ADD_SHARK_EXTRA_BUILD_ENV) \ + $(ARCH_PREFIX) $(MAKE) -C sharkvm ICEDTEA_DEBUG_BUILD_TARGET=hotspot icedtea-stage2 + + mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/shark + cp -a sharkvm/$(BUILD_OUTPUT_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \ + $(BUILD_DEBUG_JRE_ARCH_DIR)/shark/ + printf -- '-shark KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg +else + printf -- '-shark ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg +endif + touch $@ + +clean-add-shark-debug: + rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/shark + rm -rf sharkvm + if [ -e $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ] ; then \ + sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ; \ + fi + rm -f stamps/add-shark-debug.stamp + # end additional VMs # jtreg