am 9db1fc2b: am b392641d: Make fail if it\'s called after including

Merge commit '9db1fc2bea0b75b59ad52f94faa1e7d66209d2d2'

* commit '9db1fc2bea0b75b59ad52f94faa1e7d66209d2d2':
  Make $(my-dir) fail if it's called after including $(CLEAR_VARS)
This commit is contained in:
Dave Bort
2009-09-25 10:51:31 -07:00
committed by Android Git Automerger

View File

@@ -109,7 +109,14 @@ endef
# Figure out where we are.
define my-dir
$(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST),$(MAKEFILE_LIST))))
$(strip \
$(eval md_file_ := $$(lastword $$(MAKEFILE_LIST))) \
$(if $(filter $(CLEAR_VARS),$(md_file_)), \
$(error LOCAL_PATH must be set before including $$(CLEAR_VARS)) \
, \
$(patsubst %/,%,$(dir $(md_file_))) \
) \
)
endef
###########################################################