8244044: Refactor phase makefiles to be structured per module

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2020-04-29 08:55:01 +02:00
parent 739e8e322d
commit 0de9bbd4f3
104 changed files with 62 additions and 116 deletions

View File

@ -127,7 +127,7 @@ GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
define DeclareModuleInfoRecipe
$1-gensrc-moduleinfo:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
-f gensrc/GensrcModuleInfo.gmk MODULE=$1)
-f common/modules/GensrcModuleInfo.gmk MODULE=$1)
$1-gensrc: $1-gensrc-moduleinfo
endef

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -129,18 +129,17 @@ define DeclareRecipeForModuleMakefile
$2-$$($1_TARGET_SUFFIX):
ifeq ($$($1_USE_WRAPPER), true)
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
-f ModuleWrapper.gmk \
-f ModuleWrapper.gmk -I $$(TOPDIR)/make/common/modules \
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
$$(addsuffix /modules/$2, $$(PHASE_MAKEDIRS)) \
) \
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX) $$($1_EXTRA_ARGS))
else
+($(CD) $$(dir $$(firstword $$(wildcard $$(addsuffix \
/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $$(PHASE_MAKEDIRS))))) \
+($(CD) $$(TOPDIR)/make \
&& $(MAKE) $(MAKE_ARGS) \
-f $$($1_FILE_PREFIX)-$2.gmk \
-f modules/$2/$$($1_FILE_PREFIX).gmk -I $$(TOPDIR)/make/common/modules \
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
$$(addsuffix /modules/$2, $$(PHASE_MAKEDIRS)) \
) \
MODULE=$2 $$($1_EXTRA_ARGS) \
)
@ -153,7 +152,7 @@ endef
# Param 2: Module name
define DeclareRecipesForPhaseAndModule
$1_$2_MAKEFILES := $$(strip $$(wildcard \
$$(addsuffix /$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $$(PHASE_MAKEDIRS))))
$$(addsuffix /modules/$2/$$($1_FILE_PREFIX).gmk, $$(PHASE_MAKEDIRS))))
# Only declare recipes if there are makefiles to call
ifneq ($$($1_$2_MAKEFILES), )

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,7 @@ include MakeBase.gmk
TARGETS :=
# Include the file being wrapped.
include $(MAKEFILE_PREFIX)-$(MODULE).gmk
include modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk
# Setup copy rules from the modules directories to the jdk image directory.
ifeq ($(call isTargetOs, windows), true)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -27,7 +27,8 @@ include CopyCommon.gmk
include Modules.gmk
include TextFileProcessing.gmk
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, modules/java.base/Copy.gmk))
################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,18 +25,15 @@
include GendataCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, gendata/Gendata-java.base.gmk))
include gendata/GendataBreakIterator.gmk
include GendataBreakIterator.gmk
include gendata/GendataTZDB.gmk
include GendataTZDB.gmk
include gendata/GendataBlacklistedCerts.gmk
include GendataBlacklistedCerts.gmk
include gendata/GendataCryptoPolicy.gmk
include GendataCryptoPolicy.gmk
include GendataPublicSuffixList.gmk
include gendata/GendataPublicSuffixList.gmk
################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,16 +25,16 @@
include GensrcCommonJdk.gmk
include GensrcLocaleData.gmk
include GensrcCharacterData.gmk
include GensrcMisc.gmk
include GensrcCharsetMapping.gmk
include GensrcCharsetCoder.gmk
include GensrcBuffer.gmk
include GensrcExceptions.gmk
include GensrcVarHandles.gmk
include GensrcModuleLoaderMap.gmk
include GensrcEmojiData.gmk
include gensrc/GensrcLocaleData.gmk
include gensrc/GensrcCharacterData.gmk
include gensrc/GensrcMisc.gmk
include gensrc/GensrcCharsetMapping.gmk
include gensrc/GensrcCharsetCoder.gmk
include gensrc/GensrcBuffer.gmk
include gensrc/GensrcExceptions.gmk
include gensrc/GensrcVarHandles.gmk
include gensrc/GensrcModuleLoaderMap.gmk
include gensrc/GensrcEmojiData.gmk
################################################################################

View File

@ -25,7 +25,8 @@
include LauncherCommon.gmk
$(eval $(call IncludeCustomExtension, launcher/Launcher-java.base.gmk))
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, modules/java.base/Launcher.gmk))
JAVA_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/launcher/java.rc

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
include LibCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/Lib-java.base.gmk))
$(eval $(call IncludeCustomExtension, modules/java.base/Lib.gmk))
# Prepare the find cache.
$(call FillFindCache, $(wildcard $(TOPDIR)/src/java.base/*/native))
@ -34,7 +34,7 @@ $(call FillFindCache, $(wildcard $(TOPDIR)/src/java.base/*/native))
################################################################################
# Create all the core libraries
include CoreLibraries.gmk
include lib/CoreLibraries.gmk
################################################################################
# Create the network library

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,8 +23,6 @@
# questions.
#
$(eval $(call IncludeCustomExtension, gendata/GendataBlacklistedCerts.gmk))
GENDATA_BLACKLISTED_CERTS_SRC += $(TOPDIR)/make/data/blacklistedcertsconverter/blacklisted.certs.pem
GENDATA_BLACKLISTED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blacklisted.certs

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -277,6 +277,3 @@ $(foreach t, $(VARHANDLES_MEMORY_ADDRESS_TYPES), \
$(eval $(call GenerateVarHandleMemoryAddress,VAR_HANDLE_MEMORY_ADDRESS_$t,$t)))
GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,6 @@
# questions.
#
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/CoreLibraries.gmk))
##########################################################################################
# libfdlibm is statically linked with libjava below and not delivered into the
# product on its own.

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,6 @@
include CopyCommon.gmk
include Modules.gmk
$(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
################################################################################
$(CONF_DST_DIR)/sound.properties: $(TOPDIR)/src/java.desktop/share/conf/sound.properties

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,6 @@
include GendataCommon.gmk
include GendataFontConfig.gmk
include gendata/GendataFontConfig.gmk
include GendataHtml32dtd.gmk
include gendata/GendataHtml32dtd.gmk

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -26,17 +26,17 @@
include GensrcCommonJdk.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-java.desktop.gmk))
$(eval $(call IncludeCustomExtension, modules/java.desktop/Gensrc.gmk))
ifeq ($(call isTargetOs, windows), false)
include GensrcIcons.gmk
include gensrc/GensrcIcons.gmk
endif
ifeq ($(call isTargetOs, linux solaris aix), true)
include GensrcX11Wrappers.gmk
include gensrc/GensrcX11Wrappers.gmk
endif
include GensrcSwing.gmk
include gensrc/GensrcSwing.gmk
################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
include LibCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/Lib-java.desktop.gmk))
$(eval $(call IncludeCustomExtension, modules/java.desktop/Lib.gmk))
# Prepare the find cache.
$(call FillFindCache, $(wildcard $(TOPDIR)/src/java.desktop/*/native))
@ -34,7 +34,7 @@ $(call FillFindCache, $(wildcard $(TOPDIR)/src/java.desktop/*/native))
################################################################################
# Create the AWT/2D libraries
include Awt2dLibraries.gmk
include lib/Awt2dLibraries.gmk
################################################################################
# Create the libjsound library

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,8 +23,6 @@
# questions.
#
$(eval $(call IncludeCustomExtension, gensrc/GensrcIcons.gmk))
GENSRC_AWT_ICONS :=
GENSRC_AWT_ICONS_SRC :=
GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,8 +23,6 @@
# questions.
#
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries-pre.gmk))
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
LIBAWT_DEFAULT_HEADER_DIRS := \
@ -900,8 +898,3 @@ ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
endif
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,9 +25,6 @@
include LibCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/Lib-java.instrument.gmk))
################################################################################
ifeq ($(call isTargetOs, windows), true)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,9 +25,6 @@
include LibCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/Lib-java.management.gmk))
################################################################################
LIBMANAGEMENT_OPTIMIZATION := HIGH
@ -52,8 +49,3 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \
$(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
TARGETS += $(BUILD_LIBMANAGEMENT)
################################################################################
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, lib/Lib-java.management-post.gmk))

View File

@ -30,7 +30,7 @@ include Modules.gmk
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, gendata/Gendata-jdk.compiler-pre.gmk))
$(eval $(call IncludeCustomExtension, modules/jdk.compiler/Gendata.gmk))
# This is needed to properly setup DOCS_MODULES.
$(eval $(call ReadImportMetaData))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,6 @@
include LibCommon.gmk
$(eval $(call IncludeCustomExtension, hotspot/lib/Lib-jdk.hotspot.agent.gmk))
################################################################################
ifeq ($(call isTargetOs, linux), true)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -28,8 +28,6 @@ default: all
include $(SPEC)
include MakeBase.gmk
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-jdk.internal.vm.compiler.gmk))
GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)
SRC_DIR := $(TOPDIR)/src/$(MODULE)/share/classes

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -60,6 +60,3 @@ $(eval $(call SetupBuildLauncher, jstat, \
$(eval $(call SetupBuildLauncher, jcmd, \
MAIN_CLASS := sun.tools.jcmd.JCmd, \
))
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, launcher/Launcher-jdk.jcmd-post.gmk))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jstatd, \
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
))
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, launcher/Launcher-jdk.jstatd-post.gmk))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,10 +25,7 @@
include GensrcCommonJdk.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-jdk.localedata.gmk))
include GensrcLocaleData.gmk
include modules/java.base/gensrc/GensrcLocaleData.gmk
################################################################################

Some files were not shown because too many files have changed in this diff Show More