Try to catch more misuse of $(my-dir).
Change-Id: I0c07d7115c66b30ba1383dfaa133f0cc40a33ad7
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Put some miscellaneous rules here
|
# Put some miscellaneous rules here
|
||||||
|
|
||||||
|
# HACK: clear LOCAL_PATH from including last build target before calling
|
||||||
|
# intermedites-dir-for
|
||||||
|
LOCAL_PATH := $(BUILD_SYSTEM)
|
||||||
|
|
||||||
# Pick a reasonable string to use to identify files.
|
# Pick a reasonable string to use to identify files.
|
||||||
ifneq "" "$(filter eng.%,$(BUILD_NUMBER))"
|
ifneq "" "$(filter eng.%,$(BUILD_NUMBER))"
|
||||||
# BUILD_NUMBER has a timestamp in it, which means that
|
# BUILD_NUMBER has a timestamp in it, which means that
|
||||||
@@ -644,10 +648,6 @@ ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY)))
|
|||||||
|
|
||||||
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
|
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
|
||||||
|
|
||||||
# HACK: clear LOCAL_PATH from including last build target before calling
|
|
||||||
# intermedites-dir-for
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
recovery_initrc := $(call include-path-for, recovery)/etc/init.rc
|
recovery_initrc := $(call include-path-for, recovery)/etc/init.rc
|
||||||
recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
|
recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
|
||||||
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
|
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
|
||||||
|
@@ -118,14 +118,15 @@ endef
|
|||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Retrieve the directory of the current makefile
|
## Retrieve the directory of the current makefile
|
||||||
|
## Must be called before including any other makefile!!
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
# Figure out where we are.
|
# Figure out where we are.
|
||||||
define my-dir
|
define my-dir
|
||||||
$(strip \
|
$(strip \
|
||||||
$(eval LOCAL_MODULE_MAKEFILE := $$(lastword $$(MAKEFILE_LIST))) \
|
$(eval LOCAL_MODULE_MAKEFILE := $$(lastword $$(MAKEFILE_LIST))) \
|
||||||
$(if $(filter $(CLEAR_VARS),$(LOCAL_MODULE_MAKEFILE)), \
|
$(if $(filter $(BUILD_SYSTEM)/% $(OUT_DIR)/%,$(LOCAL_MODULE_MAKEFILE)), \
|
||||||
$(error LOCAL_PATH must be set before including $$(CLEAR_VARS)) \
|
$(error my-dir must be called before including any other makefile.) \
|
||||||
, \
|
, \
|
||||||
$(patsubst %/,%,$(dir $(LOCAL_MODULE_MAKEFILE))) \
|
$(patsubst %/,%,$(dir $(LOCAL_MODULE_MAKEFILE))) \
|
||||||
) \
|
) \
|
||||||
@@ -154,6 +155,7 @@ endef
|
|||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Retrieve a list of all makefiles immediately below your directory
|
## Retrieve a list of all makefiles immediately below your directory
|
||||||
|
## Must be called before including any other makefile!!
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
define all-subdir-makefiles
|
define all-subdir-makefiles
|
||||||
@@ -163,6 +165,7 @@ endef
|
|||||||
###########################################################
|
###########################################################
|
||||||
## Look in the named list of directories for makefiles,
|
## Look in the named list of directories for makefiles,
|
||||||
## relative to the current directory.
|
## relative to the current directory.
|
||||||
|
## Must be called before including any other makefile!!
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
# $(1): List of directories to look for under this directory
|
# $(1): List of directories to look for under this directory
|
||||||
|
Reference in New Issue
Block a user