summaryrefslogtreecommitdiffstats
path: root/core/copy_headers.mk
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-10-22 12:24:21 -0700
committerColin Cross <ccross@android.com>2013-10-23 13:18:39 -0700
commita6c4ebdd112409e2b53fe0dfffcaa9dab17dd68f (patch)
tree22a34cbfefdb584798934d5277c2becc3c6f3bc9 /core/copy_headers.mk
parent0068d25b4895162993118fe3b61d2775fa575e70 (diff)
downloadbuild-a6c4ebdd112409e2b53fe0dfffcaa9dab17dd68f.zip
build-a6c4ebdd112409e2b53fe0dfffcaa9dab17dd68f.tar.gz
build-a6c4ebdd112409e2b53fe0dfffcaa9dab17dd68f.tar.bz2
avoid // in copy headers rule
If LOCAL_COPY_HEADERS_TO is not set, then the copy headers rule target is set to out/target/product/../obj/include//header.h. If another rule depends on the header without the //, it will fail. Don't insert LOCAL_COPY_HEADERS_TO if it is blank. Change-Id: Ideac7f8e01288ab5cca98645b307945d6ae9e97c
Diffstat (limited to 'core/copy_headers.mk')
-rw-r--r--core/copy_headers.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/copy_headers.mk b/core/copy_headers.mk
index dac07d5..e16560f 100644
--- a/core/copy_headers.mk
+++ b/core/copy_headers.mk
@@ -15,7 +15,9 @@ endif
$(foreach header,$(LOCAL_COPY_HEADERS), \
$(eval _chFrom := $(LOCAL_PATH)/$(header)) \
$(eval _chTo := \
- $($(my_prefix)OUT_HEADERS)/$(LOCAL_COPY_HEADERS_TO)/$(notdir $(header))) \
+ $(if $(LOCAL_COPY_HEADERS_TO),\
+ $($(my_prefix)OUT_HEADERS)/$(LOCAL_COPY_HEADERS_TO)/$(notdir $(header)),\
+ $($(my_prefix)OUT_HEADERS)/$(notdir $(header)))) \
$(eval $(call copy-one-header,$(_chFrom),$(_chTo))) \
$(eval all_copied_headers: $(_chTo)) \
)