OSDN Git Service
(root)
/
android-x86
/
build.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4dc5f0
)
Make $(my-dir) fail if it's called after including $(CLEAR_VARS)
author
Dave Bort
<dbort@android.com>
Tue, 19 May 2009 23:12:22 +0000
(16:12 -0700)
committer
Joe Onorato
<joeo@android.com>
Wed, 23 Sep 2009 19:58:20 +0000
(12:58 -0700)
core/definitions.mk
patch
|
blob
|
history
diff --git
a/core/definitions.mk
b/core/definitions.mk
index
a16ce03
..
297e6b7
100644
(file)
--- a/
core/definitions.mk
+++ b/
core/definitions.mk
@@
-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
###########################################################