forked from openkylin/platform_build
Remove Android.bp logic from makefiles
When Soong was optional, the make build system needed extra complexity to ignore Android.mk files that had an associated Android.bp file. Now that Soong is required and the Android.mk files that were obsoleted by an associated Android.bp file have been removed, remove all of the logic that found associated Android.bp files. Android.mk files and Android.bp files are now handled independently. Change-Id: Ia6643d151b920689219ca8abd59ede44d230ba35
This commit is contained in:
parent
4058a71747
commit
65543c7bc2
|
@ -138,40 +138,12 @@ $(strip \
|
|||
endef
|
||||
|
||||
|
||||
define _filter-soong-makefile
|
||||
$(if $(wildcard $(patsubst %/Android.mk,%/Android.bp,$(1))),\
|
||||
$(info skipping $(1) ...)\
|
||||
$(call _filter-soong-bpfile $(patsubst %/Android.mk,%/Android.bp,$(1))),\
|
||||
$(1))
|
||||
endef
|
||||
|
||||
define _filter-soong-bpfile
|
||||
$(if $(wildcard $(patsubst %/Android.bp,%/Android.soong.mk,$(1))),\
|
||||
$(patsubst %/Android.bp,%/Android.soong.mk,$(1)))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Remove any makefiles that are being handled by soong
|
||||
##
|
||||
## If passed an Android.mk file, returns the Android.mk file
|
||||
## if no Android.bp file exists and the same path. If an
|
||||
## Android.bp file exists, or if passed an Android.bp file,
|
||||
## returns the Android.soong.mk file at the same path if it
|
||||
## exists, or nothing if it does not.
|
||||
###########################################################
|
||||
define filter-soong-makefiles
|
||||
$(sort $(foreach mk,$(1),\
|
||||
$(if $(filter %/Android.bp,$(mk)),\
|
||||
$(call _filter-soong-bpfile,$(mk)),\
|
||||
$(call _filter-soong-makefile,$(mk)))))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Retrieve a list of all makefiles immediately below some directory
|
||||
###########################################################
|
||||
|
||||
define all-makefiles-under
|
||||
$(call filter-soong-makefiles,$(wildcard $(1)/*/Android.mk $(1)/*/Android.bp))
|
||||
$(wildcard $(1)/*/Android.mk)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
@ -182,9 +154,8 @@ endef
|
|||
# $(1): directory to search under
|
||||
# Ignores $(1)/Android.mk
|
||||
define first-makefiles-under
|
||||
$(call filter-soong-makefiles,\
|
||||
$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) \
|
||||
--mindepth=2 $(addprefix --dir=,$(1)) Android.bp Android.mk))
|
||||
$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) \
|
||||
--mindepth=2 $(addprefix --dir=,$(1)) Android.mk)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
@ -204,9 +175,7 @@ endef
|
|||
|
||||
# $(1): List of directories to look for under this directory
|
||||
define all-named-subdir-makefiles
|
||||
$(call filter-soong-makefiles,\
|
||||
$(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1))))\
|
||||
$(wildcard $(addsuffix /Android.bp, $(addprefix $(call my-dir)/,$(1)))))
|
||||
$(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1))))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
|
|
@ -515,7 +515,7 @@ endif
|
|||
ifneq ($(ONE_SHOT_MAKEFILE),)
|
||||
# We've probably been invoked by the "mm" shell function
|
||||
# with a subdirectory's makefile.
|
||||
include $(SOONG_ANDROID_MK) $(call filter-soong-makefiles,$(ONE_SHOT_MAKEFILE))
|
||||
include $(SOONG_ANDROID_MK) $(wildcard $(ONE_SHOT_MAKEFILE))
|
||||
# Change CUSTOM_MODULES to include only modules that were
|
||||
# defined by this makefile; this will install all of those
|
||||
# modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE
|
||||
|
|
Loading…
Reference in New Issue