< prev index next > make/CompileJavaModules.gmk
Print this page
include $(SPEC)
include MakeBase.gmk
include Modules.gmk
include JavaCompilation.gmk
+ include CopyFiles.gmk
+
################################################################################
# If this is an imported module that has prebuilt classes, only compile
# module-info.java.
ifneq ($(IMPORT_MODULES_CLASSES), )
IMPORT_MODULE_DIR := $(IMPORT_MODULES_CLASSES)/$(MODULE)
-include Java.gmk
################################################################################
# Setup the main compilation
-
$(eval $(call SetupJavaCompilation, $(MODULE), \
SMALL_JAVA := false, \
MODULE := $(MODULE), \
SRC := $(wildcard $(MODULE_SRC_DIRS)), \
INCLUDES := $(JDK_USER_DEFINED_FILTER), \
--system none, \
))
TARGETS += $($(MODULE))
+ ################################################################################
+ # Setup compilation for value classes in the module
+ # TBD: When $(DOCLINT) was included there was an NPE in JavacTypes.getOverriddenMethods
+
+ # Directory and file name suffix for jar file containing value classes
+ VALUECLASSES_STR := valueclasses
+
+ ifneq ($(COMPILER), bootjdk)
+ MODULE_VALUECLASS_SRC_DIRS := $(call FindModuleValueClassSrcDirs, $(MODULE))
+ MODULE_VALUECLASS_SOURCEPATH := $(call GetModuleValueClassSrcPath)
+
+ ifneq ($(MODULE_VALUECLASS_SRC_DIRS),)
+ $(eval $(call SetupJavaCompilation, $(MODULE)-$(VALUECLASSES_STR), \
+ SMALL_JAVA := false, \
+ MODULE := $(MODULE), \
+ SRC := $(wildcard $(MODULE_VALUECLASS_SRC_DIRS)), \
+ INCLUDES := $(JDK_USER_DEFINED_FILTER), \
+ FAIL_NO_SRC := $(FAIL_NO_SRC), \
+ BIN := $(SUPPORT_OUTPUTDIR)/$(VALUECLASSES_STR)/, \
+ JAR := $(JDK_OUTPUTDIR)/lib/$(VALUECLASSES_STR)/$(MODULE)-$(VALUECLASSES_STR).jar, \
+ HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
+ DISABLED_WARNINGS := $(DISABLED_WARNINGS_java) preview, \
+ EXCLUDES := $(EXCLUDES), \
+ EXCLUDE_FILES := $(EXCLUDE_FILES) \
+ KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
+ DEPENDS := $($(MODULE)), \
+ JAVAC_FLAGS := \
+ $(JAVAC_FLAGS) \
+ --module-source-path $(MODULE_VALUECLASS_SOURCEPATH) \
+ --module-path $(JDK_OUTPUTDIR)/modules \
+ --system none \
+ --enable-preview -source $(JDK_SOURCE_TARGET_VERSION), \
+ ))
+
+ TARGETS += $($(MODULE)-$(VALUECLASSES_STR))
+
+ $(eval $(call SetupCopyFiles, $(MODULE)-copy-valueclass-jar, \
+ FILES := $(JDK_OUTPUTDIR)/lib/$(VALUECLASSES_STR)/$(MODULE)-$(VALUECLASSES_STR).jar, \
+ DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/$(VALUECLASSES_STR), \
+ ))
+
+ TARGETS += $($(MODULE)-copy-valueclass-jar)
+ endif
+ endif
+
# Declare dependencies between java compilations of different modules.
# Since the other modules are declared in different invocations of this file,
# use the macro to find the correct target file to depend on.
# Only the javac compilation actually depends on other modules so limit
# dependency declaration to that by using the *_MODFILELIST variable.
< prev index next >