Loading core/base_rules.mk +27 −6 Original line number Original line Diff line number Diff line Loading @@ -452,12 +452,33 @@ endif # Set up phony targets that covers all modules under the given paths. # Set up phony targets that covers all modules under the given paths. # This allows us to build everything in given paths by running mmma/mma. # This allows us to build everything in given paths by running mmma/mma. my_path_components := $(subst /,$(space),$(LOCAL_PATH)) define my_path_comp my_path_prefix := MODULES-IN parent := $(patsubst %/,%,$(dir $(1))) $(foreach c, $(my_path_components),\ parent_target := MODULES-IN-$$(subst /,-,$$(parent)) $(eval my_path_prefix := $(my_path_prefix)-$(c))\ .PHONY: $$(parent_target) $(eval .PHONY : $(my_path_prefix))\ $$(parent_target): $(2) $(eval $(my_path_prefix) : $(my_all_targets))) ifndef $$(parent_target) $$(parent_target) := true ifneq (,$$(findstring /,$$(parent))) $$(eval $$(call my_path_comp,$$(parent),$$(parent_target))) endif endif endef _local_path := $(patsubst %/,%,$(LOCAL_PATH)) _local_path_target := MODULES-IN-$(subst /,-,$(_local_path)) .PHONY: $(_local_path_target) $(_local_path_target): $(my_register_name) ifndef $(_local_path_target) $(_local_path_target) := true $(eval $(call my_path_comp,$(_local_path),$(_local_path_target))) endif _local_path := _local_path_target := my_path_comp := ########################################################### ########################################################### ## Module installation rule ## Module installation rule Loading Loading
core/base_rules.mk +27 −6 Original line number Original line Diff line number Diff line Loading @@ -452,12 +452,33 @@ endif # Set up phony targets that covers all modules under the given paths. # Set up phony targets that covers all modules under the given paths. # This allows us to build everything in given paths by running mmma/mma. # This allows us to build everything in given paths by running mmma/mma. my_path_components := $(subst /,$(space),$(LOCAL_PATH)) define my_path_comp my_path_prefix := MODULES-IN parent := $(patsubst %/,%,$(dir $(1))) $(foreach c, $(my_path_components),\ parent_target := MODULES-IN-$$(subst /,-,$$(parent)) $(eval my_path_prefix := $(my_path_prefix)-$(c))\ .PHONY: $$(parent_target) $(eval .PHONY : $(my_path_prefix))\ $$(parent_target): $(2) $(eval $(my_path_prefix) : $(my_all_targets))) ifndef $$(parent_target) $$(parent_target) := true ifneq (,$$(findstring /,$$(parent))) $$(eval $$(call my_path_comp,$$(parent),$$(parent_target))) endif endif endef _local_path := $(patsubst %/,%,$(LOCAL_PATH)) _local_path_target := MODULES-IN-$(subst /,-,$(_local_path)) .PHONY: $(_local_path_target) $(_local_path_target): $(my_register_name) ifndef $(_local_path_target) $(_local_path_target) := true $(eval $(call my_path_comp,$(_local_path),$(_local_path_target))) endif _local_path := _local_path_target := my_path_comp := ########################################################### ########################################################### ## Module installation rule ## Module installation rule Loading