< prev index next >

make/copy/CopyCommon.gmk

Print this page

        

*** 24,33 **** --- 24,34 ---- # LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE) LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE) + COMMON_LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/common ################################################################################ # # Copy exported include headers files to output directory, if present. #
*** 58,62 **** --- 59,83 ---- FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \ )) TARGETS += $(COPY_EXPORTED_INCLUDE_OS) endif + + ################################################################################ + # Setup make rules for copying legal files. This is only needed if the files + # need to be filtered due to optional components being enabled/disabled. + # Otherwise CreateJmods.gmk will find the legal files in the original src dirs. + # + # Parameter 1 is the name of the rule. + # + # Remaining parameters are named arguments. These include: + # EXCLUDES : List of filenames to exclude from copy + SetupCopyLegalFiles = $(NamedParamsMacroTemplate) + define SetupCopyLegalFilesBody + $$(eval $$(call SetupCopyFiles, $1, \ + SRC := $$(CUSTOM_ROOT), \ + DEST := $$(LEGAL_DST_DIR), \ + FILES := $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \ + $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \ + FLATTEN := true, \ + )) + endef
< prev index next >