8003693: build-infra: bridgeBuild should allow for partial build (no hotspot)
authorerikj
Fri, 18 Jan 2013 16:48:25 +0100
changeset 15082 ac03da8601cc
parent 15081 89d743b46460
child 15083 0d22bc048353
child 15178 5b28a4d0f57d
child 15585 9400e3513052
8003693: build-infra: bridgeBuild should allow for partial build (no hotspot) Reviewed-by: tbell
common/makefiles/Jprt.gmk
--- a/common/makefiles/Jprt.gmk	Fri Jan 18 09:58:23 2013 +0100
+++ b/common/makefiles/Jprt.gmk	Fri Jan 18 16:48:25 2013 +0100
@@ -43,24 +43,20 @@
 
 BUILD_DIR_ROOT:=$(root_dir)/build
 
-# Appears to be an open build
-OPEN_BUILD := \
-$(shell \
-  if [    -d $(root_dir)/jdk/src/closed      \
-       -o -d $(root_dir)/jdk/make/closed     \
-       -o -d $(root_dir)/jdk/test/closed     \
-       -o -d $(root_dir)/hotspot/src/closed  \
-       -o -d $(root_dir)/hotspot/make/closed \
-       -o -d $(root_dir)/hotspot/test/closed ] ; then \
-    echo "false"; \
-  else \
-    echo "true"; \
-  fi \
- )
 ifdef OPENJDK
   OPEN_BUILD=true
+else
+  OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
+                          $(wildcard $(root_dir)/jdk/make/closed), \
+                          $(wildcard $(root_dir)/jdk/test/closed), \
+                          $(wildcard $(root_dir)/hotspot/src/closed), \
+                          $(wildcard $(root_dir)/hotspot/make/closed), \
+                          $(wildcard $(root_dir)/hotspot/test/closed)), \
+                     false,true)
 endif
 
+HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
+
 ###########################################################################
 # To help in adoption of the new configure&&make build process, a bridge
 #   build will use the old settings to run configure and do the build.
@@ -103,6 +99,11 @@
 ifdef ALT_FREETYPE_HEADERS_PATH
 	@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
 endif
+ifeq ($(HOTSPOT_AVAILABLE),false)
+  ifdef ALT_JDK_IMPORT_PATH
+	@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
+  endif
+endif
 ifeq ($(OPEN_BUILD),true)
 	@$(ECHO) " --enable-openjdk-only " >> $@.tmp
 else