Wed, 06 Aug 2008 14:57:13 -0700
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
Reviewed-by: tbell
Makefile | file | annotate | diff | comparison | revisions | |
make/Defs-internal.gmk | file | annotate | diff | comparison | revisions | |
make/jprt.config | file | annotate | diff | comparison | revisions | |
make/jprt.gmk | file | annotate | diff | comparison | revisions |
1.1 --- a/Makefile Thu Jul 17 22:06:53 2008 -0700 1.2 +++ b/Makefile Wed Aug 06 14:57:13 2008 -0700 1.3 @@ -49,27 +49,17 @@ 1.4 JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared 1.5 endif 1.6 1.7 +# For start and finish echo lines 1.8 +TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE) 1.9 +DAYE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'` 1.10 +START_ECHO = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)" 1.11 +FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)" 1.12 + 1.13 +default: all 1.14 + 1.15 include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk 1.16 - 1.17 include ./make/Defs-internal.gmk 1.18 - 1.19 -all:: 1.20 - @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'` 1.21 - $(MKDIR) -p $(OUTPUTDIR) 1.22 - 1.23 -# Rules for sanity checks 1.24 include ./make/sanity-rules.gmk 1.25 - 1.26 -dev : dev-build 1.27 - 1.28 -dev-build: 1.29 - $(MAKE) DEV_ONLY=true all 1.30 -dev-sanity: 1.31 - $(MAKE) DEV_ONLY=true sanity 1.32 -dev-clobber: 1.33 - $(MAKE) DEV_ONLY=true clobber 1.34 - 1.35 -# Rules for various components 1.36 include ./make/hotspot-rules.gmk 1.37 include ./make/langtools-rules.gmk 1.38 include ./make/corba-rules.gmk 1.39 @@ -80,11 +70,203 @@ 1.40 include ./make/sponsors-rules.gmk 1.41 include ./make/deploy-rules.gmk 1.42 1.43 -all:: setup build 1.44 +# What "all" means 1.45 +all:: 1.46 + @$(START_ECHO) 1.47 1.48 -setup: openjdk_check 1.49 +all:: openjdk_check sanity all_product_build 1.50 + 1.51 +ifeq ($(SKIP_FASTDEBUG_BUILD), false) 1.52 + all:: fastdebug_build 1.53 +endif 1.54 + 1.55 +ifeq ($(SKIP_DEBUG_BUILD), false) 1.56 + all:: debug_build 1.57 +endif 1.58 + 1.59 +ifneq ($(SKIP_OPENJDK_BUILD), true) 1.60 + all:: openjdk_build 1.61 +endif 1.62 + 1.63 +all:: 1.64 + @$(FINISH_ECHO) 1.65 + 1.66 +# Everything for a full product build 1.67 +all_product_build:: 1.68 + @$(START_ECHO) 1.69 + 1.70 +ifeq ($(SKIP_PRODUCT_BUILD), false) 1.71 + 1.72 + all_product_build:: product_build 1.73 + 1.74 + ifeq ($(BUILD_INSTALL), true) 1.75 + all_product_build:: $(INSTALL) 1.76 + clobber:: install-clobber 1.77 + endif 1.78 + 1.79 + ifeq ($(BUILD_SPONSORS), true) 1.80 + all_product_build:: $(SPONSORS) 1.81 + clobber:: sponsors-clobber 1.82 + endif 1.83 + 1.84 + ifneq ($(SKIP_COMPARE_IMAGES), true) 1.85 + all_product_build:: compare-image 1.86 + endif 1.87 + 1.88 +endif 1.89 + 1.90 +all_product_build:: 1.91 + @$(FINISH_ECHO) 1.92 + 1.93 +# Generis build of basic repo series 1.94 +generic_build_repo_series:: 1.95 + $(MKDIR) -p $(OUTPUTDIR) 1.96 $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image 1.97 1.98 +ifeq ($(BUILD_LANGTOOLS), true) 1.99 + generic_build_repo_series:: langtools 1.100 + clobber:: langtools-clobber 1.101 +endif 1.102 + 1.103 +ifeq ($(BUILD_CORBA), true) 1.104 + generic_build_repo_series:: corba 1.105 + clobber:: corba-clobber 1.106 +endif 1.107 + 1.108 +ifeq ($(BUILD_JAXP), true) 1.109 + generic_build_repo_series:: jaxp 1.110 + clobber:: jaxp-clobber 1.111 +endif 1.112 + 1.113 +ifeq ($(BUILD_JAXWS), true) 1.114 + generic_build_repo_series:: jaxws 1.115 + clobber:: jaxws-clobber 1.116 +endif 1.117 + 1.118 +ifeq ($(BUILD_HOTSPOT), true) 1.119 + generic_build_repo_series:: $(HOTSPOT) 1.120 + clobber:: hotspot-clobber 1.121 +endif 1.122 + 1.123 +ifeq ($(BUILD_JDK), true) 1.124 + generic_build_repo_series:: $(JDK_JAVA_EXE) 1.125 + clobber:: jdk-clobber 1.126 +endif 1.127 + 1.128 +ifeq ($(BUILD_DEPLOY), true) 1.129 + generic_build_repo_series:: $(DEPLOY) 1.130 + clobber:: deploy-clobber 1.131 +endif 1.132 + 1.133 +ifeq ($(BUILD_JDK), true) 1.134 + ifeq ($(BUNDLE_RULES_AVAILABLE), true) 1.135 + generic_build_repo_series:: openjdk-binary-plugs-bundles 1.136 + endif 1.137 +endif 1.138 + 1.139 +# The debug build, fastdebug or debug. Needs special handling. 1.140 +# Note that debug builds do NOT do INSTALL steps, but must be done 1.141 +# after the product build and before the INSTALL step of the product build. 1.142 +# 1.143 +# DEBUG_NAME is fastdebug or debug 1.144 +# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix 1.145 +# The resulting j2sdk-image is used by the install makefiles to create a 1.146 +# debug install bundle jdk-*-debug-** bundle (tar or zip) 1.147 +# which will install in the debug or fastdebug subdirectory of the 1.148 +# normal product install area. 1.149 +# The install process needs to know what the DEBUG_NAME is, so 1.150 +# look for INSTALL_DEBUG_NAME in the install rules. 1.151 +# 1.152 + 1.153 +# Location of fresh bootdir output 1.154 +ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk 1.155 +FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image 1.156 +FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image 1.157 + 1.158 +create_fresh_product_bootdir: FRC 1.159 + @$(START_ECHO) 1.160 + $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ 1.161 + NO_DOCS=true \ 1.162 + BOOT_CYCLE_SETTINGS= \ 1.163 + build_product_image 1.164 + @$(FINISH_ECHO) 1.165 + 1.166 +create_fresh_debug_bootdir: FRC 1.167 + @$(START_ECHO) 1.168 + $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ 1.169 + NO_DOCS=true \ 1.170 + BOOT_CYCLE_DEBUG_SETTINGS= \ 1.171 + build_debug_image 1.172 + @$(FINISH_ECHO) 1.173 + 1.174 +create_fresh_fastdebug_bootdir: FRC 1.175 + @$(START_ECHO) 1.176 + $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ 1.177 + NO_DOCS=true \ 1.178 + BOOT_CYCLE_DEBUG_SETTINGS= \ 1.179 + build_fastdebug_image 1.180 + @$(FINISH_ECHO) 1.181 + 1.182 +# Create boot image? 1.183 +ifeq ($(SKIP_BOOT_CYCLE),false) 1.184 + ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) 1.185 + DO_BOOT_CYCLE=true 1.186 + endif 1.187 +endif 1.188 + 1.189 +ifeq ($(DO_BOOT_CYCLE),true) 1.190 + 1.191 + # Create the bootdir to use in the build 1.192 + product_build:: create_fresh_product_bootdir 1.193 + debug_build:: create_fresh_debug_bootdir 1.194 + fastdebug_build:: create_fresh_fastdebug_bootdir 1.195 + 1.196 + # Define variables to be used now for the boot jdk 1.197 + BOOT_CYCLE_SETTINGS= \ 1.198 + ALT_BOOTDIR=$(FRESH_BOOTDIR) \ 1.199 + ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR) 1.200 + BOOT_CYCLE_DEBUG_SETTINGS= \ 1.201 + ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \ 1.202 + ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR) 1.203 + 1.204 +else 1.205 + 1.206 + # Use the supplied ALT_BOOTDIR as the boot 1.207 + BOOT_CYCLE_SETTINGS= 1.208 + BOOT_CYCLE_DEBUG_SETTINGS= 1.209 + 1.210 +endif 1.211 + 1.212 +build_product_image: 1.213 + @$(START_ECHO) 1.214 + $(MAKE) \ 1.215 + SKIP_FASTDEBUG_BUILD=true \ 1.216 + SKIP_DEBUG_BUILD=true \ 1.217 + $(BOOT_CYCLE_SETTINGS) \ 1.218 + generic_build_repo_series 1.219 + @$(FINISH_ECHO) 1.220 + 1.221 +generic_debug_build: 1.222 + @$(START_ECHO) 1.223 + $(MAKE) \ 1.224 + ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \ 1.225 + DEBUG_NAME=$(DEBUG_NAME) \ 1.226 + NO_DOCS=true \ 1.227 + $(BOOT_CYCLE_DEBUG_SETTINGS) \ 1.228 + generic_build_repo_series 1.229 + @$(FINISH_ECHO) 1.230 + 1.231 +build_debug_image: 1.232 + $(MAKE) DEBUG_NAME=debug generic_debug_build 1.233 + 1.234 +build_fastdebug_image: 1.235 + $(MAKE) DEBUG_NAME=fastdebug generic_debug_build 1.236 + 1.237 +# Build final image 1.238 +product_build:: build_product_image 1.239 +debug_build:: build_debug_image 1.240 +fastdebug_build:: build_fastdebug_image 1.241 + 1.242 # Check on whether we really can build the openjdk, need source etc. 1.243 openjdk_check: FRC 1.244 ifneq ($(SKIP_OPENJDK_BUILD), true) 1.245 @@ -101,113 +283,6 @@ 1.246 @$(ECHO) " " 1.247 endif 1.248 1.249 -build:: sanity 1.250 - 1.251 -clobber:: 1.252 - 1.253 -ifeq ($(BUILD_LANGTOOLS), true) 1.254 - build:: langtools 1.255 - clobber:: langtools-clobber 1.256 -endif 1.257 - 1.258 -ifeq ($(BUILD_CORBA), true) 1.259 - build:: corba 1.260 - clobber:: corba-clobber 1.261 -endif 1.262 - 1.263 -ifeq ($(BUILD_JAXP), true) 1.264 - build:: jaxp 1.265 - clobber:: jaxp-clobber 1.266 -endif 1.267 - 1.268 -ifeq ($(BUILD_JAXWS), true) 1.269 - build:: jaxws 1.270 - clobber:: jaxws-clobber 1.271 -endif 1.272 - 1.273 -ifeq ($(BUILD_HOTSPOT), true) 1.274 - build:: $(HOTSPOT) 1.275 - clobber:: hotspot-clobber 1.276 -endif 1.277 - 1.278 -ifeq ($(BUILD_JDK), true) 1.279 - build:: $(JDK_JAVA_EXE) 1.280 - clobber:: jdk-clobber 1.281 -endif 1.282 - 1.283 -ifeq ($(BUILD_DEPLOY), true) 1.284 - build:: $(DEPLOY) 1.285 - clobber:: deploy-clobber 1.286 -endif 1.287 - 1.288 -# 1.289 -# Generic debug build, fastdebug or debug. Needs special handling. 1.290 -# Note that debug builds do NOT do INSTALL steps, but must be done 1.291 -# after the product build and before the INSTALL step of the product build. 1.292 -# 1.293 -# DEBUG_NAME is fastdebug or debug 1.294 -# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix 1.295 -# The resulting j2sdk-image is used by the install makefiles to create a 1.296 -# debug install bundle jdk-*-debug-** bundle (tar or zip) 1.297 -# which will install in the debug or fastdebug subdirectory of the 1.298 -# normal product install area. 1.299 -# The install process needs to know what the DEBUG_NAME is, so 1.300 -# look for INSTALL_DEBUG_NAME in the install rules. 1.301 -# 1.302 - 1.303 -COMMON_DEBUG_FLAGS= \ 1.304 - DEBUG_NAME=$(DEBUG_NAME) \ 1.305 - ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \ 1.306 - NO_DOCS=true 1.307 - 1.308 -product_build: setup 1.309 - @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` 1.310 - $(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all 1.311 - @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` 1.312 - 1.313 -generic_debug_build: 1.314 - @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` 1.315 - $(MAKE) $(COMMON_DEBUG_FLAGS) setup build 1.316 - @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` 1.317 - 1.318 -debug_build: setup 1.319 - $(MAKE) DEBUG_NAME=debug generic_debug_build 1.320 - 1.321 -fastdebug_build: setup 1.322 - $(MAKE) DEBUG_NAME=fastdebug generic_debug_build 1.323 - 1.324 -ifeq ($(SKIP_FASTDEBUG_BUILD), false) 1.325 - all:: fastdebug_build 1.326 -endif 1.327 - 1.328 -ifeq ($(SKIP_DEBUG_BUILD), false) 1.329 - all:: debug_build 1.330 -endif 1.331 - 1.332 -ifeq ($(BUILD_JDK), true) 1.333 - ifeq ($(BUNDLE_RULES_AVAILABLE), true) 1.334 - all:: openjdk-binary-plugs-bundles 1.335 - endif 1.336 -endif 1.337 - 1.338 -ifeq ($(BUILD_INSTALL), true) 1.339 - all :: $(INSTALL) 1.340 - clobber:: install-clobber 1.341 -endif 1.342 - 1.343 -ifeq ($(BUILD_SPONSORS), true) 1.344 - all :: $(SPONSORS) 1.345 - clobber:: sponsors-clobber 1.346 -endif 1.347 - 1.348 -ifneq ($(SKIP_COMPARE_IMAGES), true) 1.349 - all :: compare-image 1.350 -endif 1.351 - 1.352 -ifneq ($(SKIP_OPENJDK_BUILD), true) 1.353 - all :: openjdk_build 1.354 -endif 1.355 - 1.356 # If we have bundle rules, we have a chance here to do a complete cycle 1.357 # build, of production and open build. 1.358 # FIXUP: We should create the openjdk source bundle and build that? 1.359 @@ -235,6 +310,7 @@ 1.360 endif 1.361 1.362 openjdk_build: 1.363 + @$(START_ECHO) 1.364 @$(ECHO) " " 1.365 @$(ECHO) "=================================================" 1.366 @$(ECHO) "Starting openjdk build" 1.367 @@ -245,6 +321,7 @@ 1.368 $(MKDIR) -p $(OPENJDK_OUTPUTDIR) 1.369 ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ 1.370 OPENJDK=true \ 1.371 + NO_DOCS=true \ 1.372 ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ 1.373 ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ 1.374 ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ 1.375 @@ -261,6 +338,7 @@ 1.376 @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" 1.377 @$(ECHO) "=================================================" 1.378 @$(ECHO) " " 1.379 + @$(FINISH_ECHO) 1.380 1.381 endif 1.382 endif 1.383 @@ -274,8 +352,18 @@ 1.384 1.385 clean: clobber 1.386 1.387 -all:: 1.388 - @$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'` 1.389 +# 1.390 +# Dev builds 1.391 +# 1.392 + 1.393 +dev : dev-build 1.394 + 1.395 +dev-build: 1.396 + $(MAKE) DEV_ONLY=true all 1.397 +dev-sanity: 1.398 + $(MAKE) DEV_ONLY=true sanity 1.399 +dev-clobber: 1.400 + $(MAKE) DEV_ONLY=true clobber 1.401 1.402 # 1.403 # Quick jdk verification build 1.404 @@ -461,16 +549,6 @@ 1.405 endif 1.406 1.407 ################################################################ 1.408 -# Cycle build. Build the jdk, use it to build the jdk again. 1.409 -################################################################ 1.410 - 1.411 -ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk 1.412 - 1.413 -boot_cycle: 1.414 - $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build 1.415 - $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build 1.416 - 1.417 -################################################################ 1.418 # JPRT rule to build 1.419 ################################################################ 1.420 1.421 @@ -480,9 +558,20 @@ 1.422 # PHONY 1.423 ################################################################ 1.424 1.425 -.PHONY: all build what clobber insane \ 1.426 - fastdebug_build debug_build product_build setup \ 1.427 - dev dev-build dev-sanity dev-clobber 1.428 +.PHONY: all \ 1.429 + generic_build_repo_series \ 1.430 + what clobber insane \ 1.431 + dev dev-build dev-sanity dev-clobber \ 1.432 + product_build \ 1.433 + fastdebug_build \ 1.434 + debug_build \ 1.435 + build_product_image \ 1.436 + build_debug_image \ 1.437 + build_fastdebug_image \ 1.438 + create_fresh_product_bootdir \ 1.439 + create_fresh_debug_bootdir \ 1.440 + create_fresh_fastdebug_bootdir \ 1.441 + generic_debug_build 1.442 1.443 # Force target 1.444 FRC:
2.1 --- a/make/Defs-internal.gmk Thu Jul 17 22:06:53 2008 -0700 2.2 +++ b/make/Defs-internal.gmk Wed Aug 06 14:57:13 2008 -0700 2.3 @@ -159,6 +159,9 @@ 2.4 SKIP_OPENJDK_BUILD = true 2.5 endif 2.6 endif 2.7 +ifndef SKIP_PRODUCT_BUILD 2.8 + SKIP_PRODUCT_BUILD = false 2.9 +endif 2.10 2.11 # Solaris 64 bit builds are not complete enough to ever do this 2.12 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
3.1 --- a/make/jprt.config Thu Jul 17 22:06:53 2008 -0700 3.2 +++ b/make/jprt.config Wed Aug 06 14:57:13 2008 -0700 3.3 @@ -115,13 +115,13 @@ 3.4 dirMustExist "${ANT_HOME}" ANT_HOME 3.5 dirMustExist "${FINDBUGS_HOME}" FINDBUGS_HOME 3.6 3.7 -# If ALT_PREVIOUS_JDK_IMAGE not defined, set it to the bootdir area for 3.8 +# If ALT_PREVIOUS_RELEASE_IMAGE not defined, set it to the bootdir area for 3.9 # any possible image comparisons. 3.10 # We assume bootdir is a previous jdk release image, valid for comparison 3.11 # reasons. 3.12 -if [ "${ALT_PREVIOUS_JDK_IMAGE}" = "" ] ; then 3.13 - ALT_PREVIOUS_JDK_IMAGE="${bootdir}" 3.14 - export ALT_PREVIOUS_JDK_IMAGE 3.15 +if [ "${ALT_PREVIOUS_RELEASE_IMAGE}" = "" ] ; then 3.16 + ALT_PREVIOUS_RELEASE_IMAGE="${bootdir}" 3.17 + export ALT_PREVIOUS_RELEASE_IMAGE 3.18 fi 3.19 3.20 # Use the JDK import for now (FIXME: use the binary plugs?)
4.1 --- a/make/jprt.gmk Thu Jul 17 22:06:53 2008 -0700 4.2 +++ b/make/jprt.gmk Wed Aug 06 14:57:13 2008 -0700 4.3 @@ -36,7 +36,7 @@ 4.4 JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-bundle.zip 4.5 JPRT_ARCHIVE_INSTALL_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-install-bundle.zip 4.6 4.7 -jprt_build_product: product_build 4.8 +jprt_build_product: all_product_build 4.9 ( $(CD) $(OUTPUTDIR)/j2sdk-image && \ 4.10 $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . ) 4.11 ifdef HAVE_JPRT_SAVE_BUNDLES