diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | b6c1cf6de79035f58b512f4400db458c8401379a (patch) | |
tree | 68979db37c85b499bc384e4ac337ed1424baab51 /core/copy_headers.mk | |
download | build-b6c1cf6de79035f58b512f4400db458c8401379a.zip build-b6c1cf6de79035f58b512f4400db458c8401379a.tar.gz build-b6c1cf6de79035f58b512f4400db458c8401379a.tar.bz2 |
Initial Contribution
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 := |