Makefile

Tue, 25 May 2010 15:51:26 -0700

author
ohair
date
Tue, 25 May 2010 15:51:26 -0700
changeset 182
412712f77af6
parent 144
382219a27386
child 191
47f6b7db1882
permissions
-rw-r--r--

6943119: Rebrand source copyright notices
Reviewed-by: darcy

duke@2 1 #
ohair@182 2 # Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
duke@2 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@2 4 #
duke@2 5 # This code is free software; you can redistribute it and/or modify it
duke@2 6 # under the terms of the GNU General Public License version 2 only, as
ohair@182 7 # published by the Free Software Foundation. Oracle designates this
duke@2 8 # particular file as subject to the "Classpath" exception as provided
ohair@182 9 # by Oracle in the LICENSE file that accompanied this code.
duke@2 10 #
duke@2 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@2 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@2 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@2 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@2 15 # accompanied this code).
duke@2 16 #
duke@2 17 # You should have received a copy of the GNU General Public License version
duke@2 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@2 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@2 20 #
ohair@182 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@182 22 # or visit www.oracle.com if you need additional information or have any
ohair@182 23 # questions.
duke@2 24 #
duke@2 25
ohair@7 26 BUILD_PARENT_DIRECTORY=.
ohair@7 27
duke@2 28 ifndef TOPDIR
ohair@10 29 TOPDIR:=.
duke@2 30 endif
duke@2 31
duke@2 32 ifndef CONTROL_TOPDIR
ohair@10 33 CONTROL_TOPDIR=$(TOPDIR)
duke@2 34 endif
duke@2 35
ohair@6 36 # Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
ohair@6 37 OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
ohair@6 38 OPENJDK_BUILDDIR:=$(shell \
ohair@10 39 if [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
ohair@6 40 echo "$(OPENJDK_SOURCETREE)"; \
ohair@6 41 else \
ohair@6 42 echo "."; \
ohair@6 43 fi)
ohair@6 44
duke@2 45 ifndef JDK_TOPDIR
duke@2 46 JDK_TOPDIR=$(TOPDIR)/jdk
duke@2 47 endif
duke@2 48 ifndef JDK_MAKE_SHARED_DIR
duke@2 49 JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
duke@2 50 endif
duke@2 51
ohair@29 52 # For start and finish echo lines
ohair@29 53 TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE)
ohair@144 54 DATE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'`
ohair@29 55 START_ECHO = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
ohair@29 56 FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
ohair@29 57
ohair@29 58 default: all
ohair@29 59
duke@2 60 include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
duke@2 61 include ./make/Defs-internal.gmk
duke@2 62 include ./make/sanity-rules.gmk
duke@2 63 include ./make/hotspot-rules.gmk
duke@2 64 include ./make/langtools-rules.gmk
duke@2 65 include ./make/corba-rules.gmk
duke@2 66 include ./make/jaxp-rules.gmk
duke@2 67 include ./make/jaxws-rules.gmk
duke@2 68 include ./make/jdk-rules.gmk
duke@2 69 include ./make/install-rules.gmk
duke@2 70 include ./make/sponsors-rules.gmk
duke@2 71 include ./make/deploy-rules.gmk
duke@2 72
ohair@29 73 # What "all" means
ohair@29 74 all::
ohair@29 75 @$(START_ECHO)
duke@2 76
ohair@34 77 all:: openjdk_check sanity
ohair@29 78
ohair@29 79 ifeq ($(SKIP_FASTDEBUG_BUILD), false)
ohair@29 80 all:: fastdebug_build
ohair@29 81 endif
ohair@29 82
ohair@29 83 ifeq ($(SKIP_DEBUG_BUILD), false)
ohair@29 84 all:: debug_build
ohair@29 85 endif
ohair@29 86
ohair@29 87 ifneq ($(SKIP_OPENJDK_BUILD), true)
ohair@29 88 all:: openjdk_build
ohair@29 89 endif
ohair@29 90
ohair@34 91 all:: all_product_build
ohair@34 92
ohair@29 93 all::
ohair@29 94 @$(FINISH_ECHO)
ohair@29 95
ohair@29 96 # Everything for a full product build
ohair@29 97 all_product_build::
ohair@29 98 @$(START_ECHO)
ohair@29 99
ohair@29 100 ifeq ($(SKIP_PRODUCT_BUILD), false)
ohair@29 101
ohair@29 102 all_product_build:: product_build
ohair@29 103
ohair@29 104 ifeq ($(BUILD_INSTALL), true)
ohair@29 105 all_product_build:: $(INSTALL)
ohair@29 106 clobber:: install-clobber
ohair@29 107 endif
ohair@29 108
ohair@29 109 ifeq ($(BUILD_SPONSORS), true)
ohair@29 110 all_product_build:: $(SPONSORS)
ohair@29 111 clobber:: sponsors-clobber
ohair@29 112 endif
ohair@29 113
ohair@29 114 ifneq ($(SKIP_COMPARE_IMAGES), true)
ohair@29 115 all_product_build:: compare-image
ohair@29 116 endif
ohair@29 117
ohair@29 118 endif
ohair@29 119
ohair@29 120 all_product_build::
ohair@29 121 @$(FINISH_ECHO)
ohair@29 122
ohair@29 123 # Generis build of basic repo series
ohair@29 124 generic_build_repo_series::
ohair@29 125 $(MKDIR) -p $(OUTPUTDIR)
duke@2 126 $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
duke@2 127
ohair@29 128 ifeq ($(BUILD_LANGTOOLS), true)
ohair@29 129 generic_build_repo_series:: langtools
ohair@29 130 clobber:: langtools-clobber
ohair@29 131 endif
ohair@29 132
ohair@29 133 ifeq ($(BUILD_CORBA), true)
ohair@29 134 generic_build_repo_series:: corba
ohair@29 135 clobber:: corba-clobber
ohair@29 136 endif
ohair@29 137
ohair@29 138 ifeq ($(BUILD_JAXP), true)
ohair@29 139 generic_build_repo_series:: jaxp
ohair@29 140 clobber:: jaxp-clobber
ohair@29 141 endif
ohair@29 142
ohair@29 143 ifeq ($(BUILD_JAXWS), true)
ohair@29 144 generic_build_repo_series:: jaxws
ohair@29 145 clobber:: jaxws-clobber
ohair@29 146 endif
ohair@29 147
ohair@29 148 ifeq ($(BUILD_HOTSPOT), true)
ohair@29 149 generic_build_repo_series:: $(HOTSPOT)
ohair@29 150 clobber:: hotspot-clobber
ohair@29 151 endif
ohair@29 152
ohair@29 153 ifeq ($(BUILD_JDK), true)
ohair@29 154 generic_build_repo_series:: $(JDK_JAVA_EXE)
ohair@29 155 clobber:: jdk-clobber
ohair@29 156 endif
ohair@29 157
ohair@29 158 ifeq ($(BUILD_DEPLOY), true)
ohair@29 159 generic_build_repo_series:: $(DEPLOY)
ohair@29 160 clobber:: deploy-clobber
ohair@29 161 endif
ohair@29 162
ohair@29 163 ifeq ($(BUILD_JDK), true)
ohair@29 164 ifeq ($(BUNDLE_RULES_AVAILABLE), true)
ohair@29 165 generic_build_repo_series:: openjdk-binary-plugs-bundles
ohair@29 166 endif
ohair@29 167 endif
ohair@29 168
ohair@29 169 # The debug build, fastdebug or debug. Needs special handling.
ohair@29 170 # Note that debug builds do NOT do INSTALL steps, but must be done
ohair@29 171 # after the product build and before the INSTALL step of the product build.
ohair@29 172 #
ohair@29 173 # DEBUG_NAME is fastdebug or debug
ohair@29 174 # ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
ohair@29 175 # The resulting j2sdk-image is used by the install makefiles to create a
ohair@29 176 # debug install bundle jdk-*-debug-** bundle (tar or zip)
ohair@29 177 # which will install in the debug or fastdebug subdirectory of the
ohair@29 178 # normal product install area.
ohair@29 179 # The install process needs to know what the DEBUG_NAME is, so
ohair@29 180 # look for INSTALL_DEBUG_NAME in the install rules.
ohair@29 181 #
ohair@29 182
ohair@29 183 # Location of fresh bootdir output
ohair@29 184 ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
ohair@29 185 FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
ohair@29 186 FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image
ohair@29 187
ohair@29 188 create_fresh_product_bootdir: FRC
ohair@29 189 @$(START_ECHO)
ohair@29 190 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
ohair@144 191 GENERATE_DOCS=false \
ohair@29 192 BOOT_CYCLE_SETTINGS= \
ohair@29 193 build_product_image
ohair@29 194 @$(FINISH_ECHO)
ohair@29 195
ohair@29 196 create_fresh_debug_bootdir: FRC
ohair@29 197 @$(START_ECHO)
ohair@29 198 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
ohair@144 199 GENERATE_DOCS=false \
ohair@29 200 BOOT_CYCLE_DEBUG_SETTINGS= \
ohair@29 201 build_debug_image
ohair@29 202 @$(FINISH_ECHO)
ohair@29 203
ohair@29 204 create_fresh_fastdebug_bootdir: FRC
ohair@29 205 @$(START_ECHO)
ohair@29 206 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
ohair@144 207 GENERATE_DOCS=false \
ohair@29 208 BOOT_CYCLE_DEBUG_SETTINGS= \
ohair@29 209 build_fastdebug_image
ohair@29 210 @$(FINISH_ECHO)
ohair@29 211
ohair@29 212 # Create boot image?
ohair@29 213 ifeq ($(SKIP_BOOT_CYCLE),false)
ohair@29 214 ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
ohair@29 215 DO_BOOT_CYCLE=true
ohair@29 216 endif
ohair@29 217 endif
ohair@29 218
ohair@29 219 ifeq ($(DO_BOOT_CYCLE),true)
ohair@29 220
ohair@29 221 # Create the bootdir to use in the build
ohair@29 222 product_build:: create_fresh_product_bootdir
ohair@29 223 debug_build:: create_fresh_debug_bootdir
ohair@29 224 fastdebug_build:: create_fresh_fastdebug_bootdir
ohair@29 225
ohair@29 226 # Define variables to be used now for the boot jdk
ohair@29 227 BOOT_CYCLE_SETTINGS= \
ohair@29 228 ALT_BOOTDIR=$(FRESH_BOOTDIR) \
ohair@29 229 ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
ohair@29 230 BOOT_CYCLE_DEBUG_SETTINGS= \
ohair@29 231 ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
ohair@29 232 ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
ohair@29 233
ohair@29 234 else
ohair@29 235
ohair@29 236 # Use the supplied ALT_BOOTDIR as the boot
ohair@29 237 BOOT_CYCLE_SETTINGS=
ohair@29 238 BOOT_CYCLE_DEBUG_SETTINGS=
ohair@29 239
ohair@29 240 endif
ohair@29 241
ohair@29 242 build_product_image:
ohair@29 243 @$(START_ECHO)
ohair@29 244 $(MAKE) \
ohair@29 245 SKIP_FASTDEBUG_BUILD=true \
ohair@29 246 SKIP_DEBUG_BUILD=true \
ohair@29 247 $(BOOT_CYCLE_SETTINGS) \
ohair@29 248 generic_build_repo_series
ohair@29 249 @$(FINISH_ECHO)
ohair@29 250
ohair@29 251 generic_debug_build:
ohair@29 252 @$(START_ECHO)
ohair@29 253 $(MAKE) \
ohair@29 254 ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
ohair@29 255 DEBUG_NAME=$(DEBUG_NAME) \
ohair@144 256 GENERATE_DOCS=false \
ohair@29 257 $(BOOT_CYCLE_DEBUG_SETTINGS) \
ohair@29 258 generic_build_repo_series
ohair@29 259 @$(FINISH_ECHO)
ohair@29 260
ohair@29 261 build_debug_image:
ohair@29 262 $(MAKE) DEBUG_NAME=debug generic_debug_build
ohair@29 263
ohair@29 264 build_fastdebug_image:
ohair@29 265 $(MAKE) DEBUG_NAME=fastdebug generic_debug_build
ohair@29 266
ohair@29 267 # Build final image
ohair@29 268 product_build:: build_product_image
ohair@29 269 debug_build:: build_debug_image
ohair@29 270 fastdebug_build:: build_fastdebug_image
ohair@29 271
ohair@6 272 # Check on whether we really can build the openjdk, need source etc.
ohair@7 273 openjdk_check: FRC
ohair@6 274 ifneq ($(SKIP_OPENJDK_BUILD), true)
ohair@6 275 @$(ECHO) " "
ohair@6 276 @$(ECHO) "================================================="
ohair@6 277 @if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
ohair@6 278 $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
ohair@6 279 exit 1; \
ohair@6 280 else \
ohair@6 281 $(ECHO) "OpenJDK will be built after JDK is built"; \
ohair@6 282 $(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
ohair@6 283 fi
ohair@6 284 @$(ECHO) "================================================="
ohair@6 285 @$(ECHO) " "
ohair@6 286 endif
ohair@6 287
ohair@6 288 # If we have bundle rules, we have a chance here to do a complete cycle
ohair@6 289 # build, of production and open build.
ohair@6 290 # FIXUP: We should create the openjdk source bundle and build that?
ohair@6 291 # But how do we reliable create or get at a formal openjdk source tree?
ohair@6 292 # The one we have needs to be trimmed of built bits and closed dirs.
ohair@6 293 # The repositories might not be available.
ohair@6 294 # The openjdk source bundle is probably not available.
ohair@6 295
ohair@6 296 ifneq ($(SKIP_OPENJDK_BUILD), true)
duke@2 297 ifeq ($(BUILD_JDK), true)
duke@2 298 ifeq ($(BUNDLE_RULES_AVAILABLE), true)
ohair@6 299
ohair@6 300 OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
ohair@6 301 OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
ohair@6 302 OPENJDK_BUILD_NAME \
ohair@6 303 = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
ohair@6 304 OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
ohair@6 305 BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
ohair@6 306 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
ohair@6 307 OPENJDK_BOOTDIR=$(BOOTDIR)
ohair@6 308 OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
ohair@6 309 else
ohair@6 310 OPENJDK_BOOTDIR=$(BUILT_IMAGE)
ohair@6 311 OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
ohair@6 312 endif
ohair@6 313
ohair@6 314 openjdk_build:
ohair@29 315 @$(START_ECHO)
duke@2 316 @$(ECHO) " "
duke@2 317 @$(ECHO) "================================================="
duke@2 318 @$(ECHO) "Starting openjdk build"
ohair@6 319 @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
duke@2 320 @$(ECHO) "================================================="
duke@2 321 @$(ECHO) " "
ohair@6 322 $(RM) -r $(OPENJDK_OUTPUTDIR)
ohair@6 323 $(MKDIR) -p $(OPENJDK_OUTPUTDIR)
ohair@6 324 ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
ohair@6 325 OPENJDK=true \
ohair@144 326 GENERATE_DOCS=false \
ohair@6 327 ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
ohair@6 328 ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
ohair@6 329 ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
ohair@6 330 ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
ohair@6 331 ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
ohair@6 332 product_build )
duke@2 333 $(RM) $(OPENJDK_BUILD_BINARY_ZIP)
ohair@6 334 ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
duke@2 335 $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
ohair@6 336 $(RM) -r $(OPENJDK_OUTPUTDIR)
ohair@6 337 @$(ECHO) " "
ohair@6 338 @$(ECHO) "================================================="
ohair@6 339 @$(ECHO) "Finished openjdk build"
ohair@6 340 @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
ohair@6 341 @$(ECHO) "================================================="
ohair@6 342 @$(ECHO) " "
ohair@29 343 @$(FINISH_ECHO)
ohair@6 344
duke@2 345 endif
duke@2 346 endif
duke@2 347 endif
duke@2 348
duke@2 349 clobber::
duke@2 350 $(RM) -r $(OUTPUTDIR)/*
duke@2 351 $(RM) -r $(OUTPUTDIR)-debug/*
duke@2 352 $(RM) -r $(OUTPUTDIR)-fastdebug/*
duke@2 353 -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
duke@2 354
duke@2 355 clean: clobber
duke@2 356
ohair@29 357 #
ohair@29 358 # Dev builds
ohair@29 359 #
ohair@29 360
ohair@29 361 dev : dev-build
ohair@29 362
ohair@29 363 dev-build:
ohair@29 364 $(MAKE) DEV_ONLY=true all
ohair@29 365 dev-sanity:
ohair@29 366 $(MAKE) DEV_ONLY=true sanity
ohair@29 367 dev-clobber:
ohair@29 368 $(MAKE) DEV_ONLY=true clobber
duke@2 369
duke@2 370 #
duke@2 371 # Quick jdk verification build
duke@2 372 #
duke@2 373 jdk_only:
duke@2 374 $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
duke@2 375
duke@2 376
duke@2 377 #
duke@2 378 # Quick jdk verification fastdebug build
duke@2 379 #
duke@2 380 jdk_fastdebug_only:
duke@2 381 $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
duke@2 382 BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
duke@2 383
duke@2 384 #
duke@2 385 # Quick deploy verification fastdebug build
duke@2 386 #
duke@2 387 deploy_fastdebug_only:
duke@2 388 $(MAKE) \
duke@2 389 DEBUG_NAME=fastdebug \
duke@2 390 BUILD_HOTSPOT=false \
duke@2 391 BUILD_JDK=false \
duke@2 392 BUILD_LANGTOOLS=false \
duke@2 393 BUILD_CORBA=false \
duke@2 394 BUILD_JAXP=false \
duke@2 395 BUILD_JAXWS=false \
duke@2 396 BUILD_INSTALL=false \
duke@2 397 BUILD_SPONSORS=false \
duke@2 398 generic_debug_build
duke@2 399
duke@2 400 #
duke@2 401 # Product build (skip debug builds)
duke@2 402 #
duke@2 403 product_only:
duke@2 404 $(MAKE) SKIP_FASTDEBUG_BUILD=true all
duke@2 405
duke@2 406 #
duke@2 407 # Check target
duke@2 408 #
duke@2 409
duke@2 410 check: variable_check
duke@2 411
duke@2 412 #
duke@2 413 # Help target
duke@2 414 #
duke@2 415 help: intro_help target_help variable_help notes_help examples_help
duke@2 416
duke@2 417 # Intro help message
duke@2 418 intro_help:
duke@2 419 @$(ECHO) "\
duke@2 420 Makefile for the JDK builds (all the JDK). \n\
duke@2 421 "
duke@2 422
duke@2 423 # Target help
duke@2 424 target_help:
duke@2 425 @$(ECHO) "\
duke@2 426 --- Common Targets --- \n\
duke@2 427 all -- build the core JDK (default target) \n\
duke@2 428 help -- Print out help information \n\
duke@2 429 check -- Check make variable values for correctness \n\
duke@2 430 sanity -- Perform detailed sanity checks on system and settings \n\
duke@2 431 fastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\
duke@2 432 debug_build -- build the core JDK in 'debug' mode (-g) \n\
duke@2 433 clean -- remove all built and imported files \n\
duke@2 434 clobber -- same as clean \n\
duke@2 435 "
duke@2 436
duke@2 437 # Variable help (only common ones used by this Makefile)
duke@2 438 variable_help: variable_help_intro variable_list variable_help_end
duke@2 439 variable_help_intro:
duke@2 440 @$(ECHO) "--- Common Variables ---"
duke@2 441 variable_help_end:
duke@2 442 @$(ECHO) " "
duke@2 443
duke@2 444 # One line descriptions for the variables
duke@2 445 OUTPUTDIR.desc = Output directory
duke@2 446 PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
duke@2 447 SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
duke@2 448 BOOTDIR.desc = JDK used to boot the build
duke@2 449 JDK_IMPORT_PATH.desc = JDK used to import components of the build
duke@2 450 COMPILER_PATH.desc = Compiler install directory
duke@2 451 CACERTS_FILE.desc = Location of certificates file
duke@2 452 DEVTOOLS_PATH.desc = Directory containing zip and gnumake
duke@2 453 CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
duke@2 454 DXSDK_PATH.desc = Root directory of DirectX SDK
duke@2 455 MSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
duke@2 456 MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
duke@2 457
duke@2 458 # Make variables to print out (description and value)
duke@2 459 VARIABLE_PRINTVAL_LIST += \
duke@2 460 OUTPUTDIR \
duke@2 461 PARALLEL_COMPILE_JOBS \
duke@2 462 SLASH_JAVA \
duke@2 463 BOOTDIR \
duke@2 464 JDK_IMPORT_PATH \
duke@2 465 COMPILER_PATH \
duke@2 466 CACERTS_FILE \
duke@2 467 DEVTOOLS_PATH
duke@2 468
duke@2 469 # Make variables that should refer to directories that exist
duke@2 470 VARIABLE_CHECKDIR_LIST += \
duke@2 471 SLASH_JAVA \
duke@2 472 BOOTDIR \
duke@2 473 JDK_IMPORT_PATH \
duke@2 474 COMPILER_PATH \
duke@2 475 DEVTOOLS_PATH
duke@2 476
duke@2 477 # Make variables that should refer to files that exist
duke@2 478 VARIABLE_CHECKFIL_LIST += \
duke@2 479 CACERTS_FILE
duke@2 480
duke@2 481 # Some are windows specific
duke@2 482 ifeq ($(PLATFORM), windows)
duke@2 483
duke@2 484 VARIABLE_PRINTVAL_LIST += \
duke@2 485 DXSDK_PATH \
duke@2 486 MSDEVTOOLS_PATH \
duke@2 487 MSVCRT_DLL_PATH
duke@2 488
duke@2 489 VARIABLE_CHECKDIR_LIST += \
duke@2 490 DXSDK_PATH \
duke@2 491 MSDEVTOOLS_PATH \
duke@2 492 MSVCRT_DLL_PATH
duke@2 493
duke@2 494 endif
duke@2 495
duke@2 496 # For pattern rules below, so all are treated the same
duke@2 497 DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
duke@2 498 DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
duke@2 499 DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
duke@2 500
duke@2 501 # Complete variable check
duke@2 502 variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
duke@2 503 variable_list: $(DO_PRINTVAL_LIST) variable_check
duke@2 504
duke@2 505 # Pattern rule for printing out a variable
duke@2 506 %.printval:
duke@2 507 @$(ECHO) " ALT_$* - $($*.desc)"
duke@2 508 @$(ECHO) " \t $*=$($*)"
duke@2 509
duke@2 510 # Pattern rule for checking to see if a variable with a directory exists
duke@2 511 %.checkdir:
duke@2 512 @if [ ! -d $($*) ] ; then \
duke@2 513 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
duke@2 514 fi
duke@2 515
duke@2 516 # Pattern rule for checking to see if a variable with a file exists
duke@2 517 %.checkfil:
duke@2 518 @if [ ! -f $($*) ] ; then \
duke@2 519 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
duke@2 520 fi
duke@2 521
duke@2 522 # Misc notes on help
duke@2 523 notes_help:
duke@2 524 @$(ECHO) "\
duke@2 525 --- Notes --- \n\
duke@2 526 - All builds use same output directory unless overridden with \n\
duke@2 527 \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
duke@2 528 \t to use the clean target first. \n\
duke@2 529 - JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
duke@2 530 \t builds or previous release JDK builds will work. \n\
duke@2 531 - The fastest builds have been when the sources and the BOOTDIR are on \n\
duke@2 532 \t local disk. \n\
duke@2 533 "
duke@2 534
duke@2 535 examples_help:
duke@2 536 @$(ECHO) "\
duke@2 537 --- Examples --- \n\
duke@2 538 $(MAKE) fastdebug_build \n\
duke@2 539 $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
duke@2 540 $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
duke@2 541 $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
duke@2 542 $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
duke@2 543 $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
duke@2 544 "
duke@2 545
duke@2 546 ################################################################
duke@2 547 # Source and binary plug bundling
duke@2 548 ################################################################
duke@2 549 ifeq ($(BUNDLE_RULES_AVAILABLE), true)
duke@2 550 include $(BUNDLE_RULES)
duke@2 551 endif
duke@2 552
duke@2 553 ################################################################
duke@2 554 # JPRT rule to build
duke@2 555 ################################################################
duke@2 556
duke@2 557 include ./make/jprt.gmk
duke@2 558
duke@2 559 ################################################################
duke@2 560 # PHONY
duke@2 561 ################################################################
duke@2 562
ohair@29 563 .PHONY: all \
ohair@29 564 generic_build_repo_series \
ohair@29 565 what clobber insane \
ohair@29 566 dev dev-build dev-sanity dev-clobber \
ohair@29 567 product_build \
ohair@29 568 fastdebug_build \
ohair@29 569 debug_build \
ohair@29 570 build_product_image \
ohair@29 571 build_debug_image \
ohair@29 572 build_fastdebug_image \
ohair@29 573 create_fresh_product_bootdir \
ohair@29 574 create_fresh_debug_bootdir \
ohair@29 575 create_fresh_fastdebug_bootdir \
ohair@29 576 generic_debug_build
duke@2 577
ohair@7 578 # Force target
ohair@7 579 FRC:
ohair@7 580

mercurial