ANDROID: kbuild: Copy out-of-tree kernel headers to INSTALL_HDR_PATH
The external modules "headers_install" target does not copy the
out-of-tree kernel headers from external modules obj folders to
INSTALL_HDR_PATH.
Add $(hdr-prefix) as the rsync command source folder prefix to copy
out-of-tree kernel headers.
Bug: 173331163
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: Ie54c64d026acda65894e048a785c0b66cc9a7ddf
diff --git a/Makefile b/Makefile
index 582e29c..88b6444 100644
--- a/Makefile
+++ b/Makefile
@@ -1158,7 +1158,7 @@
cmd_headers_install = \
mkdir -p $(INSTALL_HDR_PATH); \
rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
- usr/include $(INSTALL_HDR_PATH)
+ $(hdr-prefix)usr/include $(INSTALL_HDR_PATH);
PHONY += headers_install
headers_install: headers