aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2017-11-11 17:26:07 +0800
committerSam Mortimer <sam@mortimer.me.uk>2017-12-12 03:53:59 +0000
commitf3154375ebf41e288c68c6f65f8be602b77250e7 (patch)
tree6e247c13e3c9958222e536da8f20b55c82313084
parentf600cd59d034ecfc84c3848fb557db1259bd0c76 (diff)
downloadandroid_external_toybox-staging/lineage-15.1.tar.gz
android_external_toybox-staging/lineage-15.1.tar.bz2
android_external_toybox-staging/lineage-15.1.zip
toybox: Prevent building vendor toybox when vendor is folded into systemstaging/lineage-15.1
* Vendor toybox can be used in vendor scripts. * If a target uses TARGET_COPY_OUT_VENDOR := system then writing to TARGET_OUT_VENDOR_EXECUTABLES can clobber things in system/bin, so add a guard to prevent this. Change-Id: I48d7cc20e654adc78e29a13c154a639971941cc7
-rw-r--r--Android.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index a2cfe5fe..745226cf 100644
--- a/Android.mk
+++ b/Android.mk
@@ -409,6 +409,9 @@ include $(BUILD_EXECUTABLE)
# toybox for /vendor
############################################
+# Guard to prevent overwriting in system
+ifneq ($(TARGET_COPY_OUT_VENDOR),system)
+
include $(CLEAR_VARS)
LOCAL_MODULE := toybox_vendor
LOCAL_VENDOR_MODULE := true
@@ -420,6 +423,8 @@ LOCAL_MODULE_TAGS := optional
LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf ${LOCAL_MODULE} $(TARGET_OUT_VENDOR_EXECUTABLES)/$(t);)
include $(BUILD_EXECUTABLE)
+endif
+
############################################
# static version to be installed in recovery
############################################