diff --git a/core/envsetup.mk b/core/envsetup.mk index fe4352971..729d9339a 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -234,6 +234,7 @@ TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars TARGET_OUT_ETC := $(TARGET_OUT)/etc TARGET_OUT_STATIC_LIBRARIES:= $(TARGET_OUT_INTERMEDIATES)/lib TARGET_OUT_NOTICE_FILES:=$(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES +TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages TARGET_OUT_DATA := $(PRODUCT_OUT)/data TARGET_OUT_DATA_EXECUTABLES:= $(TARGET_OUT_EXECUTABLES) diff --git a/core/main.mk b/core/main.mk index a6d3f29f5..8172b2257 100644 --- a/core/main.mk +++ b/core/main.mk @@ -571,8 +571,7 @@ $(foreach m,$(ALL_MODULES), \ $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \ $(if $(r), \ $(eval r := $(call module-installed-files,$(r))) \ - $(eval i := $(ALL_MODULES.$(m).INSTALLED)) \ - $(eval $(if $(i), $(call add-required-deps,$(i),$(r)))) \ + $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \ ) \ ) m := diff --git a/core/phony_package.mk b/core/phony_package.mk index e6c0b6ee8..3644db82c 100644 --- a/core/phony_package.mk +++ b/core/phony_package.mk @@ -1,5 +1,3 @@ -LOCAL_MODULE_CLASS := _FAKE_ - ifneq ($(strip $(LOCAL_SRC_FILES)),) $(error LOCAL_SRC_FILES are not allowed for phony packages) endif @@ -8,11 +6,12 @@ ifeq ($(strip $(LOCAL_REQUIRED_MODULES)),) $(error LOCAL_REQUIRED_MODULES is required for phony packages) endif -.PHONY: $(LOCAL_MODULE) +LOCAL_MODULE_CLASS := FAKE +LOCAL_MODULE_SUFFIX := -timestamp -$(LOCAL_MODULE): $(LOCAL_REQUIRED_MODULES) +include $(BUILD_SYSTEM)/base_rules.mk -ALL_MODULES += $(LOCAL_MODULE) -ALL_MODULES.$(LOCAL_MODULE).CLASS := _FAKE_ - -PACKAGES := $(PACKAGES) $(LOCAL_MODULE) +$(LOCAL_BUILT_MODULE): + $(hide) echo "Fake: $@" + $(hide) mkdir -p $(dir $@) + $(hide) touch $@