forked from openkylin/platform_build
Merge "Ignore Android.mk files with USE_SOONG=true"
This commit is contained in:
commit
19f6638026
|
@ -141,12 +141,28 @@ $(strip \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
###########################################################
|
||||||
|
## Remove any makefiles that are being handled by soong
|
||||||
|
###########################################################
|
||||||
|
ifeq ($(USE_SOONG),true)
|
||||||
|
define filter-soong-makefiles
|
||||||
|
$(foreach mk,$(1),\
|
||||||
|
$(if $(wildcard $(patsubst %/Android.mk,%/Android.bp,$(mk))),\
|
||||||
|
$(info skipping $(mk) ...),\
|
||||||
|
$(mk)))
|
||||||
|
endef
|
||||||
|
else
|
||||||
|
define filter-soong-makefiles
|
||||||
|
$(1)
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Retrieve a list of all makefiles immediately below some directory
|
## Retrieve a list of all makefiles immediately below some directory
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
define all-makefiles-under
|
define all-makefiles-under
|
||||||
$(sort $(wildcard $(1)/*/Android.mk))
|
$(sort $(call filter-soong-makefiles,$(wildcard $(1)/*/Android.mk)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
@ -157,8 +173,9 @@ endef
|
||||||
# $(1): directory to search under
|
# $(1): directory to search under
|
||||||
# Ignores $(1)/Android.mk
|
# Ignores $(1)/Android.mk
|
||||||
define first-makefiles-under
|
define first-makefiles-under
|
||||||
$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) \
|
$(call filter-soong-makefiles,\
|
||||||
--mindepth=2 $(1) Android.mk)
|
$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) \
|
||||||
|
--mindepth=2 $(1) Android.mk))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
@ -178,7 +195,8 @@ endef
|
||||||
|
|
||||||
# $(1): List of directories to look for under this directory
|
# $(1): List of directories to look for under this directory
|
||||||
define all-named-subdir-makefiles
|
define all-named-subdir-makefiles
|
||||||
$(sort $(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1)))))
|
$(sort $(call filter-soong-makefiles,\
|
||||||
|
$(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1))))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
|
@ -534,11 +534,12 @@ ifneq ($(dont_bother),true)
|
||||||
# --mindepth=2 makes the prunes not work.
|
# --mindepth=2 makes the prunes not work.
|
||||||
subdir_makefiles := \
|
subdir_makefiles := \
|
||||||
$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk)
|
$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk)
|
||||||
|
|
||||||
ifeq ($(USE_SOONG),true)
|
ifeq ($(USE_SOONG),true)
|
||||||
subdir_makefiles := $(SOONG_ANDROID_MK) $(subdir_makefiles)
|
subdir_makefiles := $(SOONG_ANDROID_MK) $(call filter-soong-makefiles,$(subdir_makefiles))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk)))
|
$(foreach mk, $(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
|
||||||
|
|
||||||
endif # dont_bother
|
endif # dont_bother
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue