blob: 7d5a5d99225c242193dd129bea27d392a1c9e254 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001###########################################################
2## Copy headers to the install tree
3###########################################################
4ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),)
5 my_prefix := HOST_
6else
7 my_prefix := TARGET_
8endif
9
10# Create a rule to copy each header, and make the
11# all_copied_headers phony target depend on each
12# destination header. copy-one-header defines the
13# actual rule.
14#
15$(foreach header,$(LOCAL_COPY_HEADERS), \
16 $(eval _chFrom := $(LOCAL_PATH)/$(header)) \
17 $(eval _chTo := \
Colin Crossa6c4ebd2013-10-22 12:24:21 -070018 $(if $(LOCAL_COPY_HEADERS_TO),\
19 $($(my_prefix)OUT_HEADERS)/$(LOCAL_COPY_HEADERS_TO)/$(notdir $(header)),\
20 $($(my_prefix)OUT_HEADERS)/$(notdir $(header)))) \
Dan Willemsen4fbc1642016-02-23 13:40:07 -080021 $(eval ALL_COPIED_HEADERS.$(_chTo).MAKEFILE += $(LOCAL_MODULE_MAKEFILE)) \
22 $(eval ALL_COPIED_HEADERS.$(_chTo).SRC += $(_chFrom)) \
23 $(if $(filter $(_chTo),$(ALL_COPIED_HEADERS)),, \
24 $(eval ALL_COPIED_HEADERS += $(_chTo))) \
The Android Open Source Project88b60792009-03-03 19:28:42 -080025 )
26_chFrom :=
27_chTo :=