Fail build if non-symlink /system/vendor detected while we are building

Fail build if non-symlink /system/vendor detected while we are building
a separate vendor.img.

Bug: 16360411
Change-Id: I96cb6d0b654d6632cd820ba193423e9a16214638
This commit is contained in:
Ying Wang 2014-07-17 12:56:49 -07:00
parent cff386250f
commit 3e72ed17a5
1 changed files with 5 additions and 0 deletions

View File

@ -898,6 +898,11 @@ BUILT_SYSTEMIMAGE := $(systemimage_intermediates)/system.img
# Create symlink /system/vendor to /vendor if necessary.
ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
define create-system-vendor-symlink
$(hide) if [ -d $(TARGET_OUT)/vendor ] && [ ! -h $(TARGET_OUT)/vendor ]; then \
echo 'Non-symlink $(TARGET_OUT)/vendor detected!' 1>&2; \
echo 'You cannot install files to $(TARGET_OUT)/vendor while building a separate vendor.img!' 1>&2; \
exit 1; \
fi
$(hide) ln -sf /vendor $(TARGET_OUT)/vendor
endef
else