Skip to content

Commit

Permalink
8169925: Organize licenses by module in source, JMOD file, and run-ti…
Browse files Browse the repository at this point in the history
…me image

Reviewed-by: alanb, erikj, ihse, naoto, prr
Contributed-by: [email protected], [email protected]
  • Loading branch information
mchung committed Dec 13, 2016
1 parent c5fdb5e commit 1c71ae3
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 3,610 deletions.
3,605 changes: 0 additions & 3,605 deletions THIRD_PARTY_README

This file was deleted.

8 changes: 7 additions & 1 deletion common/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5088,7 +5088,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE

# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1481104795
DATE_WHEN_GENERATED=1481559330

###############################################################################
#
Expand Down Expand Up @@ -31189,6 +31189,12 @@ $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\"
if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
fi
if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
fi
if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
fi
if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
fi
Expand Down
6 changes: 6 additions & 0 deletions common/autoconf/source-dirs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ AC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
fi
if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
fi
if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
fi
if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
fi
Expand Down
2 changes: 2 additions & 0 deletions common/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ IMPORT_MODULES_CLASSES:=@IMPORT_MODULES_CLASSES@
IMPORT_MODULES_CMDS:=@IMPORT_MODULES_CMDS@
IMPORT_MODULES_LIBS:=@IMPORT_MODULES_LIBS@
IMPORT_MODULES_CONF:=@IMPORT_MODULES_CONF@
IMPORT_MODULES_LEGAL:=@IMPORT_MODULES_LEGAL@
IMPORT_MODULES_MAN:=@IMPORT_MODULES_MAN@
IMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
IMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@

Expand Down
11 changes: 10 additions & 1 deletion make/CreateJmods.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ ifneq ($(MAN_DIR), )
DEPS += $(call CacheFind, $(MAN_DIR))
endif

LEGAL_NOTICES := \
$(SUPPORT_OUTPUTDIR)/modules_legal/java.base \
$(call FindModuleLegalDirs, $(MODULE)) \
#

LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
DEPS += $(call CacheFind, $(LEGAL_NOTICES))

JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH)

# Add dependencies on other jmod files. Only java.base needs access to other
# jmods.
ifeq ($(MODULE), java.base)
Expand Down Expand Up @@ -112,7 +122,6 @@ ifeq ($(INTERIM_JMOD), true)
DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
endif

# TODO: What about headers?
# Create jmods in a temp dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
$(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
Expand Down
3 changes: 1 addition & 2 deletions make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
--endian $(OPENJDK_BUILD_CPU_ENDIAN) \
--release-info $(BASE_RELEASE_FILE) \
--order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
--dedup-legal-notices=error-if-not-same-content \
$(JLINK_JLI_CLASSES) \
#

Expand Down Expand Up @@ -287,8 +288,6 @@ endif # Windows
################################################################################
# doc files

JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
JRE_DOC_LOCATION ?= $(JDK_TOPDIR)
JDK_DOC_LOCATION ?= $(JDK_TOPDIR)

Expand Down
2 changes: 1 addition & 1 deletion make/InterimImage.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))

JMODS := $(patsubst %, $(INTERIM_JMODS_DIR)/%.jmod, $(INTERIM_IMAGE_MODULES))

JLINK_TOOL := $(JLINK) \
JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
--module-path $(INTERIM_JMODS_DIR) \
--endian $(OPENJDK_BUILD_CPU_ENDIAN)

Expand Down
3 changes: 3 additions & 0 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,9 @@ else
exploded-image-optimize
endif

# All modules include the main license files from java.base.
$(JMOD_TARGETS): java.base-copy

zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
$(filter jdk.crypto%, $(JAVA_TARGETS))

Expand Down
15 changes: 15 additions & 0 deletions make/common/Modules.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,21 @@ FindAllUpgradeableModules = \

################################################################################

LEGAL_SUBDIRS += $(OPENJDK_TARGET_OS)/legal
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
LEGAL_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/legal
endif
LEGAL_SUBDIRS += share/legal

# Find all legal dirs for a particular module
# $1 - Module to find legal dirs for
FindModuleLegalDirs = \
$(strip $(wildcard \
$(addsuffix /$(strip $1), $(IMPORT_MODULES_LEGAL)) \
$(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))

################################################################################

# Param 1 - Name of module
define ReadSingleImportMetaData
ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), )
Expand Down

0 comments on commit 1c71ae3

Please sign in to comment.