summaryrefslogtreecommitdiffstats
path: root/core/definitions.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/definitions.mk')
-rw-r--r--core/definitions.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/definitions.mk b/core/definitions.mk
index e66625e..bde0678 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -118,14 +118,15 @@ endef
###########################################################
## Retrieve the directory of the current makefile
+## Must be called before including any other makefile!!
###########################################################
# Figure out where we are.
define my-dir
$(strip \
$(eval LOCAL_MODULE_MAKEFILE := $$(lastword $$(MAKEFILE_LIST))) \
- $(if $(filter $(CLEAR_VARS),$(LOCAL_MODULE_MAKEFILE)), \
- $(error LOCAL_PATH must be set before including $$(CLEAR_VARS)) \
+ $(if $(filter $(BUILD_SYSTEM)/% $(OUT_DIR)/%,$(LOCAL_MODULE_MAKEFILE)), \
+ $(error my-dir must be called before including any other makefile.) \
, \
$(patsubst %/,%,$(dir $(LOCAL_MODULE_MAKEFILE))) \
) \
@@ -154,6 +155,7 @@ endef
###########################################################
## Retrieve a list of all makefiles immediately below your directory
+## Must be called before including any other makefile!!
###########################################################
define all-subdir-makefiles
@@ -163,6 +165,7 @@ endef
###########################################################
## Look in the named list of directories for makefiles,
## relative to the current directory.
+## Must be called before including any other makefile!!
###########################################################
# $(1): List of directories to look for under this directory