diff --git a/core/base_rules.mk b/core/base_rules.mk index 1178800616..25564b2859 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -106,11 +106,11 @@ endif # Add implicit tags. # # If the local directory or one of its parents contains a MODULE_LICENSE_GPL -# file, tag the module as "gnu". Search for "*_GNU*" so that we can also +# file, tag the module as "gnu". Search for "*_GPL*" and "*_MPL*" so that we can also # find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like # MODULE_LICENSE_LGPL. # -ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL*),) +ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*),) LOCAL_MODULE_TAGS += gnu endif diff --git a/core/definitions.mk b/core/definitions.mk index 2875e284d3..6db9d8f986 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -339,7 +339,7 @@ endef define find-parent-file $(strip \ - $(eval _fpf := $(wildcard $(strip $(1))/$(strip $(2)))) \ + $(eval _fpf := $(wildcard $(foreach f, $(2), $(strip $(1))/$(f)))) \ $(if $(_fpf),$(_fpf), \ $(if $(filter-out ./ .,$(1)), \ $(call find-parent-file,$(patsubst %/,%,$(dir $(1))),$(2)) \