OSDN Git Service

avoid // in copy headers rule
authorColin Cross <ccross@android.com>
Tue, 22 Oct 2013 19:24:21 +0000 (12:24 -0700)
committerColin Cross <ccross@android.com>
Wed, 23 Oct 2013 20:18:39 +0000 (13:18 -0700)
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

core/copy_headers.mk

index dac07d5..e16560f 100644 (file)
@@ -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)) \
  )