hush: make echo builtin optional
It's a bit overkill (who would want it off?) but ash already has it
configurable. Let's be symmetric.
Also tweak kbuild logic to use ASH_BUILTIN_ECHO to select echo.o,
not ASH.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src
index 9ac6b9e..d0b3f62 100644
--- a/coreutils/Kbuild.src
+++ b/coreutils/Kbuild.src
@@ -14,15 +14,11 @@
lib-$(CONFIG_LESS) += cat.o # less too
lib-$(CONFIG_CRONTAB) += cat.o # crontab -l
lib-$(CONFIG_ADDUSER) += chown.o # used by adduser
-lib-$(CONFIG_ADDGROUP) += chown.o # used by adduser
+lib-$(CONFIG_ADDGROUP) += chown.o # used by addgroup
lib-$(CONFIG_FTPD) += ls.o # used by ftpd
-lib-$(CONFIG_ASH) += echo.o # used by ash
-lib-$(CONFIG_SH_IS_ASH) += echo.o # used by ash
-lib-$(CONFIG_BASH_IS_ASH) += echo.o # used by ash
-lib-$(CONFIG_HUSH) += echo.o # used by hush
-lib-$(CONFIG_SH_IS_HUSH) += echo.o # used by hush
-lib-$(CONFIG_BASH_IS_HUSH) += echo.o # used by hush
+lib-$(CONFIG_ASH_BUILTIN_ECHO) += echo.o
+lib-$(CONFIG_HUSH_ECHO) += echo.o
lib-$(CONFIG_ASH_BUILTIN_PRINTF) += printf.o
-lib-$(CONFIG_HUSH_PRINTF) += printf.o
+lib-$(CONFIG_HUSH_PRINTF) += printf.o