365 # classlist 366 367 ifeq ($(ENABLE_GENERATE_CLASSLIST), true) 368 $(eval $(call SetupCopyFiles, JDK_COPY_CLASSLIST, \ 369 FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \ 370 DEST := $(JDK_IMAGE_DIR)/lib, \ 371 )) 372 373 JDK_TARGETS += $(JDK_COPY_CLASSLIST) 374 375 $(eval $(call SetupCopyFiles, JRE_COPY_CLASSLIST, \ 376 FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \ 377 DEST := $(JRE_IMAGE_DIR)/lib, \ 378 )) 379 380 JRE_TARGETS += $(JRE_COPY_CLASSLIST) 381 endif 382 383 ################################################################################ 384 # /demo dir 385 ifneq ($(findstring images, $(MAKECMDGOALS)), ) 386 $(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \ 387 SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \ 388 DEST := $(JDK_IMAGE_DIR)/demo, \ 389 FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \ 390 $(call DoubleDollar, $(call DoubleDollar, \ 391 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ 392 -type f -a ! \( -name "_the*" -o -name "javac_state" \) )))), \ 393 )) 394 395 JDK_TARGETS += $(JDK_COPY_DEMOS) 396 endif 397 398 ################################################################################ 399 # /sample dir 400 401 $(eval $(call SetupCopyFiles,COPY_SAMPLES, \ 402 SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \ 403 DEST := $(JDK_IMAGE_DIR)/sample, \ 404 FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \ 405 $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image)))) 406 407 JDK_TARGETS += $(COPY_SAMPLES) 408 409 ################################################################################ 410 # jrt-fs.jar 411 412 $(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \ 437 438 SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) 439 440 endif 441 442 ################################################################################ 443 # Debug symbols 444 # Since debug symbols are not included in the jmod files, they need to be copied 445 # in manually after generating the images. 446 447 ALL_JDK_MODULES := $(JDK_MODULES) 448 ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \ 449 $(call FindTransitiveDepsForModule, $m))) 450 451 ifeq ($(OPENJDK_TARGET_OS), windows) 452 LIBS_TARGET_SUBDIR := bin 453 else 454 LIBS_TARGET_SUBDIR := lib 455 endif 456 457 DEBUGINFO_SUFFIXES := .diz .debuginfo .pdb .map 458 459 # Param 1 - dir to find debuginfo files in 460 FindDebuginfoFiles = \ 461 $(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \ 462 $(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \ 463 $(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES))) 464 465 # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM 466 # dirs. 467 ifeq ($(OPENJDK_TARGET_OS)-$(ZIP_EXTERNAL_DEBUG_SYMBOLS), macosx-false) 468 $(eval $(call FillCacheFind, \ 469 $(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs/)) 470 FindDebuginfoFiles = \ 471 $(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1))) 472 endif 473 474 # Param 1 - either JDK or JRE 475 SetupCopyDebuginfo = \ 476 $(foreach m, $(ALL_$1_MODULES), \ 477 $(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \ 478 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \ 479 DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \ 480 FILES := $(call FindDebuginfoFiles, \ 481 $(SUPPORT_OUTPUTDIR)/modules_libs/$m), \ 482 )) \ 483 $(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \ 484 ) 485 486 # No space before argument to avoid having to put $(strip ) everywhere in 487 # implementation above. 488 $(call SetupCopyDebuginfo,JDK) 489 $(call SetupCopyDebuginfo,JRE) 490 491 ################################################################################ 492 493 # Include custom post hook here to make it possible to augment the target lists 494 # before actual target prerequisites are declared. 495 $(eval $(call IncludeCustomExtension, , Images-post.gmk)) 496 497 ################################################################################ 498 499 $(JRE_TARGETS): $(TOOL_JRE_TARGETS) 500 $(JDK_TARGETS): $(TOOL_JDK_TARGETS) 501 502 jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \ 503 $(SYMBOLS_TARGETS) 504 505 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS) 506 $(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS) 507 $(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS) 508 509 profiles: $(TOOL_JRE_COMPACT1_TARGETS) \ 510 $(TOOL_JRE_COMPACT2_TARGETS) \ 511 $(TOOL_JRE_COMPACT3_TARGETS) \ 512 $(JRE_COMPACT1_TARGETS) \ 513 $(JRE_COMPACT2_TARGETS) \ 514 $(JRE_COMPACT3_TARGETS) 515 516 .PHONY: default all jimages profiles | 365 # classlist 366 367 ifeq ($(ENABLE_GENERATE_CLASSLIST), true) 368 $(eval $(call SetupCopyFiles, JDK_COPY_CLASSLIST, \ 369 FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \ 370 DEST := $(JDK_IMAGE_DIR)/lib, \ 371 )) 372 373 JDK_TARGETS += $(JDK_COPY_CLASSLIST) 374 375 $(eval $(call SetupCopyFiles, JRE_COPY_CLASSLIST, \ 376 FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \ 377 DEST := $(JRE_IMAGE_DIR)/lib, \ 378 )) 379 380 JRE_TARGETS += $(JRE_COPY_CLASSLIST) 381 endif 382 383 ################################################################################ 384 # /demo dir 385 ifneq ($(filter jdk, $(MAKECMDGOALS)), ) 386 387 DEMO_FILES := \ 388 $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \ 389 $(call DoubleDollar, $(call DoubleDollar, \ 390 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ 391 -type f -a ! \( -name "_the*" -o -name "javac_state" \) ))) \ 392 ) 393 394 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) 395 ifeq ($(OPENJDK_TARGET_OS), macosx) 396 DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES)) 397 else 398 DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES)) 399 endif 400 endif 401 402 $(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \ 403 SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \ 404 DEST := $(JDK_IMAGE_DIR)/demo, \ 405 FILES := $(DEMO_FILES), \ 406 )) 407 408 JDK_TARGETS += $(JDK_COPY_DEMOS) 409 endif 410 411 ################################################################################ 412 # /sample dir 413 414 $(eval $(call SetupCopyFiles,COPY_SAMPLES, \ 415 SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \ 416 DEST := $(JDK_IMAGE_DIR)/sample, \ 417 FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \ 418 $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image)))) 419 420 JDK_TARGETS += $(COPY_SAMPLES) 421 422 ################################################################################ 423 # jrt-fs.jar 424 425 $(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \ 450 451 SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) 452 453 endif 454 455 ################################################################################ 456 # Debug symbols 457 # Since debug symbols are not included in the jmod files, they need to be copied 458 # in manually after generating the images. 459 460 ALL_JDK_MODULES := $(JDK_MODULES) 461 ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \ 462 $(call FindTransitiveDepsForModule, $m))) 463 464 ifeq ($(OPENJDK_TARGET_OS), windows) 465 LIBS_TARGET_SUBDIR := bin 466 else 467 LIBS_TARGET_SUBDIR := lib 468 endif 469 470 # Param 1 - dir to find debuginfo files in 471 FindDebuginfoFiles = \ 472 $(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \ 473 $(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \ 474 $(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES))) 475 476 # Pick the correct debug info files to copy, either zipped or not. 477 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) 478 DEBUGINFO_SUFFIXES += .diz 479 else 480 DEBUGINFO_SUFFIXES := .debuginfo .pdb .map 481 # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM 482 # dirs. 483 ifeq ($(OPENJDK_TARGET_OS), macosx) 484 $(eval $(call FillCacheFind, \ 485 $(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs)) 486 FindDebuginfoFiles = \ 487 $(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1))) 488 endif 489 endif 490 491 # Param 1 - either JDK or JRE 492 SetupCopyDebuginfo = \ 493 $(foreach m, $(ALL_$1_MODULES), \ 494 $(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \ 495 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \ 496 DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \ 497 FILES := $(call FindDebuginfoFiles, \ 498 $(SUPPORT_OUTPUTDIR)/modules_libs/$m), \ 499 )) \ 500 $(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \ 501 ) 502 503 # No space before argument to avoid having to put $(strip ) everywhere in 504 # implementation above. 505 $(call SetupCopyDebuginfo,JDK) 506 $(call SetupCopyDebuginfo,JRE) 507 508 ################################################################################ 509 510 # Include custom post hook here to make it possible to augment the target lists 511 # before actual target prerequisites are declared. 512 $(eval $(call IncludeCustomExtension, , Images-post.gmk)) 513 514 ################################################################################ 515 516 $(JRE_TARGETS): $(TOOL_JRE_TARGETS) 517 $(JDK_TARGETS): $(TOOL_JDK_TARGETS) 518 519 jdk: $(JDK_TARGETS) 520 jre: $(JRE_TARGETS) 521 symbols: $(SYMBOLS_TARGETS) 522 523 all: jdk jre symbols 524 525 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS) 526 $(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS) 527 $(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS) 528 529 profiles: $(TOOL_JRE_COMPACT1_TARGETS) \ 530 $(TOOL_JRE_COMPACT2_TARGETS) \ 531 $(TOOL_JRE_COMPACT3_TARGETS) \ 532 $(JRE_COMPACT1_TARGETS) \ 533 $(JRE_COMPACT2_TARGETS) \ 534 $(JRE_COMPACT3_TARGETS) 535 536 .PHONY: default all jdk jre symbols profiles |