From 3c565b568d77bf8032f82bdf069b63c7effeb771 Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Thu, 25 Apr 2019 12:03:27 -0400 Subject: Use BSD grep for builds with toybox - Include symlinks for egrep and fgrep Change-Id: I78e27f95efa143fa63def02c9e72af567833aefe --- prebuilt/Android.mk | 5 +++++ toybox/Android.mk | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index 4d67e5b77..b63935ab5 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -21,6 +21,11 @@ else RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0) + RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/grep + LOCAL_POST_INSTALL_CMD += $(hide) if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep" ]; then \ + rm $(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep; fi; ln -sr $(TARGET_RECOVERY_ROOT_OUT)/sbin/grep $(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep; \ + if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep" ]; then \ + rm $(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep; fi; ln -sr $(TARGET_RECOVERY_ROOT_OUT)/sbin/grep $(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep; RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toybox ifneq ($(wildcard external/zip/Android.mk),) RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip diff --git a/toybox/Android.mk b/toybox/Android.mk index c88f360f5..e2fbb86c4 100644 --- a/toybox/Android.mk +++ b/toybox/Android.mk @@ -481,15 +481,12 @@ ALL_TOOLS += \ dd \ df \ diff \ - egrep \ - fgrep \ flock \ freeramdisk \ fsfreeze \ fstype \ ftpget \ ftpput \ - grep \ help \ install \ ionice \ -- cgit v1.2.3