libffi: avoid $(HOST_DIR)/usr while moving headers

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Arnout Vandecappelle 2017-07-05 13:14:39 +02:00 committed by Thomas Petazzoni
parent 6999e61394
commit a82680a618

View File

@ -14,13 +14,13 @@ LIBFFI_AUTORECONF = YES
# Move the headers to the usual location, and adjust the .pc file
# accordingly.
define LIBFFI_MOVE_HEADERS
mv $(1)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(1)/usr/include/
mv $(1)/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(1)/include/
$(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \
$(1)/usr/lib/pkgconfig/libffi.pc
rm -rf $(1)/usr/lib/libffi-*
$(1)/lib/pkgconfig/libffi.pc
rm -rf $(1)/lib/libffi-*
endef
LIBFFI_MOVE_STAGING_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(STAGING_DIR))
LIBFFI_MOVE_STAGING_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(STAGING_DIR)/usr)
LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS
HOST_LIBFFI_MOVE_HOST_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(HOST_DIR))