< prev index next >
make/copy/Copy-java.base.gmk
Print this page
@@ -22,10 +22,11 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include CopyCommon.gmk
+include Modules.gmk
include TextFileProcessing.gmk
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
################################################################################
@@ -222,17 +223,36 @@
JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
JDK_ADDITIONAL_LICENSE_INFO ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
$(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
- DEST := $(LEGAL_DST_DIR), \
+ DEST := $(COMMON_LEGAL_DST_DIR), \
FLATTEN := true, \
))
TARGETS += $(COPY_JDK_NOTICES)
################################################################################
+#
+# Copy and filter the legal files depending on what 3rd party components are
+# bundled or linked from the OS.
+#
+ifeq ($(USE_EXTERNAL_LIBZ), true)
+ LEGAL_EXCLUDES += zlib.md
+endif
+
+$(eval $(call SetupCopyFiles, COPY_LEGAL, \
+ SRC := $(CUSTOM_ROOT), \
+ DEST := $(LEGAL_DST_DIR), \
+ FILES := $(filter-out $(addprefix %/, $(LEGAL_EXCLUDES)), \
+ $(wildcard $(addsuffix /*, $(call FindModuleLegalSrcDirs, $(MODULE))))), \
+ FLATTEN := true, \
+))
+
+TARGETS += $(COPY_LEGAL)
+
+################################################################################
# Optionally copy libffi.so.? into the the image
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
$(eval $(call SetupCopyFiles, COPY_LIBFFI, \
FILES := $(LIBFFI_LIB_FILE), \
< prev index next >