8231974: Build fails if no common legal notices are present

Reviewed-by: dholmes, mchung, ihse
This commit is contained in:
Erik Joelsson 2019-10-09 09:23:22 -07:00
parent 42885307f6
commit fddd963cec

View File

@ -86,16 +86,18 @@ endif
# from there. These files were explicitly filtered or modified in <module>-copy # from there. These files were explicitly filtered or modified in <module>-copy
# targets. For the rest, just pick up everything from the source legal dirs. # targets. For the rest, just pick up everything from the source legal dirs.
LEGAL_NOTICES := \ LEGAL_NOTICES := \
$(SUPPORT_OUTPUTDIR)/modules_legal/common \ $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/common) \
$(if $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \ $(if $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
$(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \ $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
$(call FindModuleLegalSrcDirs, $(MODULE)) \ $(call FindModuleLegalSrcDirs, $(MODULE)) \
) )
LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES)) ifneq ($(strip $(LEGAL_NOTICES)), )
DEPS += $(call FindFiles, $(LEGAL_NOTICES)) LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
DEPS += $(call FindFiles, $(LEGAL_NOTICES))
JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH) JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH)
endif
ifeq ($(filter-out jdk.incubator.%, $(MODULE)), ) ifeq ($(filter-out jdk.incubator.%, $(MODULE)), )
JMOD_FLAGS += --do-not-resolve-by-default JMOD_FLAGS += --do-not-resolve-by-default