58 DEST := $(INCLUDE_TARGET_DIR)/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR), \ 59 FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \ 60 )) 61 62 TARGETS += $(COPY_EXPORTED_INCLUDE_OS) 63 endif 64 65 ################################################################################ 66 # Setup make rules for copying legal files. This is only needed if the files 67 # need to be filtered due to optional components being enabled/disabled. 68 # Otherwise CreateJmods.gmk will find the legal files in the original src dirs. 69 # 70 # Parameter 1 is the name of the rule. 71 # 72 # Remaining parameters are named arguments. These include: 73 # EXCLUDES : List of filenames to exclude from copy 74 SetupCopyLegalFiles = $(NamedParamsMacroTemplate) 75 define SetupCopyLegalFilesBody 76 $$(foreach f, $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \ 77 $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \ 78 $$(eval $$(call SetupCopyFiles, $1_$$(notdir $$f), \ 79 DEST := $$(LEGAL_DST_DIR), \ 80 FILES := $$f, \ 81 )) \ 82 $$(eval $1 += $$($1_$$(notdir $$f))) \ 83 ) 84 endef | 58 DEST := $(INCLUDE_TARGET_DIR)/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR), \ 59 FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \ 60 )) 61 62 TARGETS += $(COPY_EXPORTED_INCLUDE_OS) 63 endif 64 65 ################################################################################ 66 # Setup make rules for copying legal files. This is only needed if the files 67 # need to be filtered due to optional components being enabled/disabled. 68 # Otherwise CreateJmods.gmk will find the legal files in the original src dirs. 69 # 70 # Parameter 1 is the name of the rule. 71 # 72 # Remaining parameters are named arguments. These include: 73 # EXCLUDES : List of filenames to exclude from copy 74 SetupCopyLegalFiles = $(NamedParamsMacroTemplate) 75 define SetupCopyLegalFilesBody 76 $$(foreach f, $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \ 77 $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \ 78 $$(if $$(filter $$($1_$$(notdir $$f)), $$($1)), , \ 79 $$(eval $$(call SetupCopyFiles, $1_$$(notdir $$f), \ 80 DEST := $$(LEGAL_DST_DIR), \ 81 FILES := $$f, \ 82 )) \ 83 $$(eval $1 += $$($1_$$(notdir $$f))) \ 84 ) \ 85 ) 86 endef |