< prev index next >

make/Images.gmk

Print this page




 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 # Avoid doing the expensive find unless called with "jdk" as target.
 386 ifneq ($(filter jdk, $(MAKECMDGOALS)), )
 387 
 388   DEMO_FILES := \
 389       $(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   ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
 396     ifeq ($(OPENJDK_TARGET_OS), macosx)
 397       DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES))
 398     else
 399       DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES))
 400     endif
 401   endif
 402 
 403   $(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \
 404       SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
 405       DEST := $(JDK_IMAGE_DIR)/demo, \
 406       FILES := $(DEMO_FILES), \



 407   ))
 408 
 409   JDK_TARGETS += $(JDK_COPY_DEMOS)
 410 endif
 411 
 412 ################################################################################
 413 # /sample dir
 414 
 415 $(eval $(call SetupCopyFiles,COPY_SAMPLES, \
 416     SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \
 417     DEST := $(JDK_IMAGE_DIR)/sample, \
 418     FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \
 419         $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image))))
 420 
 421 JDK_TARGETS += $(COPY_SAMPLES)
 422 
 423 ################################################################################
 424 # jrt-fs.jar
 425 
 426 $(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \


 451 
 452   SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
 453 
 454 endif
 455 
 456 ################################################################################
 457 # Debug symbols
 458 # Since debug symbols are not included in the jmod files, they need to be copied
 459 # in manually after generating the images.
 460 
 461 ALL_JDK_MODULES := $(JDK_MODULES)
 462 ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
 463     $(call FindTransitiveDepsForModule, $m)))
 464 
 465 ifeq ($(OPENJDK_TARGET_OS), windows)
 466   LIBS_TARGET_SUBDIR := bin
 467 else
 468   LIBS_TARGET_SUBDIR := lib
 469 endif
 470 


 471 # Param 1 - dir to find debuginfo files in
 472 FindDebuginfoFiles = \
 473     $(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
 474         $(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
 475         $(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
 476 
 477 # Pick the correct debug info files to copy, either zipped or not.
 478 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
 479   DEBUGINFO_SUFFIXES += .diz
 480 else
 481   DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
 482   # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
 483   # dirs.
 484   ifeq ($(OPENJDK_TARGET_OS), macosx)
 485     $(eval $(call FillCacheFind, \
 486         $(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs))
 487     FindDebuginfoFiles = \
 488         $(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
 489   endif
 490 endif
 491 
 492 # Param 1 - either JDK or JRE
 493 SetupCopyDebuginfo = \
 494     $(foreach m, $(ALL_$1_MODULES), \
 495       $(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \
 496           SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \
 497           DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \
 498           FILES := $(call FindDebuginfoFiles, \
 499               $(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
 500       )) \
 501       $(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
 502     )
 503 
 504 # No space before argument to avoid having to put $(strip ) everywhere in
 505 # implementation above.
 506 $(call SetupCopyDebuginfo,JDK)
 507 $(call SetupCopyDebuginfo,JRE)
 508 
 509 ################################################################################
 510 
 511 # Include custom post hook here to make it possible to augment the target lists
 512 # before actual target prerequisites are declared.
 513 $(eval $(call IncludeCustomExtension, , Images-post.gmk))
 514 
 515 ################################################################################
 516 
 517 $(JRE_TARGETS): $(TOOL_JRE_TARGETS)
 518 $(JDK_TARGETS): $(TOOL_JDK_TARGETS)
 519 
 520 jdk: $(JDK_TARGETS)
 521 jre: $(JRE_TARGETS)
 522 symbols: $(SYMBOLS_TARGETS)
 523 
 524 all: jdk jre symbols
 525 
 526 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
 527 $(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
 528 $(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
 529 
 530 profiles: $(TOOL_JRE_COMPACT1_TARGETS) \
 531     $(TOOL_JRE_COMPACT2_TARGETS) \
 532     $(TOOL_JRE_COMPACT3_TARGETS) \
 533     $(JRE_COMPACT1_TARGETS) \
 534     $(JRE_COMPACT2_TARGETS) \
 535     $(JRE_COMPACT3_TARGETS)
 536 
 537 .PHONY: default all jdk jre symbols profiles
< prev index next >