f625bf277c
This allows one to declare a meta-package that depends on a list of modules. This is extremely useful for vendor provided prebulit libraries where there is a big list of libraries/binaries to include. Specifying that list in multiple places would be error prone and eventually lead to very annoying bug hunts. With a fake package, one does: LOCAL_MODULE := my_fake_package LOCAL_REQUIRED_MODULES := <list of required module names> LOCAL_MODULE_TAGS := optional include $(BUILD_PHONY_PACKAGE) Change-Id: Idcfe91f6f2d6d886aba094981a70690e5a808bfc Signed-off-by: Dima Zavin <dima@android.com>
18 lines
432 B
Makefile
18 lines
432 B
Makefile
LOCAL_MODULE_CLASS := _FAKE_
|
|
|
|
ifneq ($(strip $(LOCAL_SRC_FILES)),)
|
|
$(error LOCAL_SRC_FILES are not allowed for phony packages)
|
|
endif
|
|
|
|
ifeq ($(strip $(LOCAL_REQUIRED_MODULES)),)
|
|
$(error LOCAL_REQUIRED_MODULES is required for phony packages)
|
|
endif
|
|
|
|
.PHONY: $(LOCAL_MODULE)
|
|
|
|
$(LOCAL_MODULE): $(LOCAL_REQUIRED_MODULES)
|
|
|
|
ALL_MODULES += $(LOCAL_MODULE)
|
|
ALL_MODULES.$(LOCAL_MODULE).CLASS := _FAKE_
|
|
|
|
PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
|