Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and improve module dependency management #797

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ifeq (,$(wildcard $(SPEC)))
endif
include $(SPEC)
include $(TOPDIR)/make/common/MakeBase.gmk
include $(TOPDIR)/closed/JPP.gmk

ifeq (,$(BUILD_ID))
BUILD_ID := 000000
Expand Down
1 change: 0 additions & 1 deletion closed/autoconf/custom-spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ $(foreach var, \
$(eval $(var) += -I$(SUPPORT_OUTPUTDIR)/openj9_include))

J9JCL_SOURCES_DIR := $(SUPPORT_OUTPUTDIR)/j9jcl
J9JCL_SOURCES_DONEFILE := $(MAKESUPPORT_OUTPUTDIR)/j9jcl.done

# Required by OpenJCEPlus.
BUILD_OPENJCEPLUS := @BUILD_OPENJCEPLUS@
Expand Down
11 changes: 4 additions & 7 deletions closed/GensrcJ9JCL.gmk → closed/custom/Main-post.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
# 2 along with this work; if not, see <http://www.gnu.org/licenses/>.
# ===========================================================================

.PHONY : all

all :

include $(SPEC)
include $(TOPDIR)/make/common/MakeBase.gmk
include $(TOPDIR)/make/common/CopyFiles.gmk
include $(TOPDIR)/closed/JPP.gmk

Expand Down Expand Up @@ -62,6 +56,8 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \

IncludeIfUnsure := -includeIfUnsure -noWarnIncludeIf

J9JCL_SOURCES_DONEFILE := $(MAKESUPPORT_OUTPUTDIR)/j9jcl.done

$(J9JCL_SOURCES_DONEFILE) : \
$(foreach dir, $(JppSourceDirs), $(call RecursiveWildcard,$(dir),*)) \
$(COPY_OVERLAY_FILES)
Expand All @@ -83,4 +79,5 @@ $(J9JCL_SOURCES_DONEFILE) : \
@$(MKDIR) -p $(@D)
@$(TOUCH) $@

all : $(J9JCL_SOURCES_DONEFILE)
# Force (re-)generation of module dependencies after preprocessing OpenJ9 source files.
$(MODULE_DEPS_MAKEFILE) : $(J9JCL_SOURCES_DONEFILE)
10 changes: 1 addition & 9 deletions closed/custom/Main.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
# (c) Copyright IBM Corp. 2017, 2024 All Rights Reserved
# ===========================================================================
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
Expand Down Expand Up @@ -34,14 +34,6 @@ PHASE_MAKEDIRS := $(TOPDIR)/closed/make $(PHASE_MAKEDIRS)

OPENJ9_MAKE := $(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/OpenJ9.gmk

# An early part of the build process involves computing the list of main targets.
# Those targets include {module}-java, {module}-jmod, etc. which requires that the
# set of module names be known. We must build and run the preprocessor to ensure the
# modules specific to OpenJ9 will be found and included in that set. The next two
# rules make that happen.

create-main-targets-include java.base-gensrc : generate-j9jcl-sources

j9vm-build : buildtools-langtools
ifeq ($(BUILD_OPENSSL),yes)
@+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/openssl.gmk
Expand Down
15 changes: 1 addition & 14 deletions closed/custom/common/Modules.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
# (c) Copyright IBM Corp. 2017, 2024 All Rights Reserved
# ===========================================================================
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
Expand Down Expand Up @@ -59,16 +59,3 @@ TOP_SRC_DIRS += \
ifeq (true,$(BUILD_OPENJCEPLUS))
TOP_SRC_DIRS += $(OPENJCEPLUS_TOPDIR)/src/main
endif

.PHONY : generate-j9jcl-sources

generate-j9jcl-sources $(J9JCL_SOURCES_DONEFILE) :
@+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/GensrcJ9JCL.gmk

# When building multiple configurations at once (e.g. 'make CONF= images')
# the 'create-main-targets-include' target will only be considered for the
# first configuration; J9JCL source generation will be delayed for other
# configurations. In order to produce a complete module-deps.gmk, we need
# to ensure that the J9JCL source has been generated.

-include $(J9JCL_SOURCES_DONEFILE)