diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:28:42 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:28:42 -0800 |
commit | 88b607994a148f4af5bffee163e39ce8296750c6 (patch) | |
tree | fa249ff843e976cf034f2029437d3362a8396321 /core/copy_headers.mk | |
parent | 05806d7af62e07c6225b2e7103a1b115ecf6c9ad (diff) | |
download | build-88b607994a148f4af5bffee163e39ce8296750c6.zip build-88b607994a148f4af5bffee163e39ce8296750c6.tar.gz build-88b607994a148f4af5bffee163e39ce8296750c6.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'core/copy_headers.mk')
-rw-r--r-- | core/copy_headers.mk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/copy_headers.mk b/core/copy_headers.mk new file mode 100644 index 0000000..dac07d5 --- /dev/null +++ b/core/copy_headers.mk @@ -0,0 +1,23 @@ +########################################################### +## Copy headers to the install tree +########################################################### +ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),) + my_prefix := HOST_ +else + my_prefix := TARGET_ +endif + +# Create a rule to copy each header, and make the +# all_copied_headers phony target depend on each +# destination header. copy-one-header defines the +# actual rule. +# +$(foreach header,$(LOCAL_COPY_HEADERS), \ + $(eval _chFrom := $(LOCAL_PATH)/$(header)) \ + $(eval _chTo := \ + $($(my_prefix)OUT_HEADERS)/$(LOCAL_COPY_HEADERS_TO)/$(notdir $(header))) \ + $(eval $(call copy-one-header,$(_chFrom),$(_chTo))) \ + $(eval all_copied_headers: $(_chTo)) \ + ) +_chFrom := +_chTo := |