Fix build: Revert "Try to catch more misuse of $(my-dir)."

This reverts commit 79e8319b2ea622d487a56498d657440f5935e9e9.

Change-Id: I7d4d352da802deea870fbe4f61f7a7023460a405
diff --git a/core/definitions.mk b/core/definitions.mk
index 94e7432..783cf3d 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -118,15 +118,14 @@
 
 ###########################################################
 ## 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 $(BUILD_SYSTEM)/% $(OUT_DIR)/%,$(LOCAL_MODULE_MAKEFILE)), \
-    $(error my-dir must be called before including any other makefile.) \
+  $(if $(filter $(CLEAR_VARS),$(LOCAL_MODULE_MAKEFILE)), \
+    $(error LOCAL_PATH must be set before including $$(CLEAR_VARS)) \
    , \
     $(patsubst %/,%,$(dir $(LOCAL_MODULE_MAKEFILE))) \
    ) \
@@ -155,7 +154,6 @@
 
 ###########################################################
 ## Retrieve a list of all makefiles immediately below your directory
-## Must be called before including any other makefile!!
 ###########################################################
 
 define all-subdir-makefiles
@@ -165,7 +163,6 @@
 ###########################################################
 ## 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