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
//config: This instructs hush to print commands before execution.
//config: Adds ~300 bytes.
//config:
+//config:config HUSH_ECHO
+//config: bool "echo builtin"
+//config: default y
+//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
+//config: help
+//config: Enable echo builtin in hush.
+//config:
+//config:config HUSH_PRINTF
+//config: bool "printf builtin"
+//config: default y
+//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
+//config: help
+//config: Enable printf builtin in hush.
+//config:
//config:config HUSH_EXPORT
//config: bool "export builtin"
//config: default y
//config: help
//config: Enable help builtin in hush. Code size + ~1 kbyte.
//config:
-//config:config HUSH_PRINTF
-//config: bool "printf builtin"
-//config: default y
-//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
-//config: help
-//config: Enable printf builtin in hush.
-//config:
//config:config HUSH_KILL
//config: bool "kill builtin (for kill %jobspec)"
//config: default y
/* Function prototypes for builtins */
static int builtin_cd(char **argv) FAST_FUNC;
+#if ENABLE_HUSH_ECHO
static int builtin_echo(char **argv) FAST_FUNC;
+#endif
static int builtin_eval(char **argv) FAST_FUNC;
static int builtin_exec(char **argv) FAST_FUNC;
static int builtin_exit(char **argv) FAST_FUNC;
* Maybe make it configurable? */
static const struct built_in_command bltins2[] = {
BLTIN("[" , builtin_test , NULL),
+#if ENABLE_HUSH_ECHO
BLTIN("echo" , builtin_echo , NULL),
+#endif
#if ENABLE_HUSH_PRINTF
BLTIN("printf" , builtin_printf , NULL),
#endif
{
return run_applet_main(argv, test_main);
}
-
+#if ENABLE_HUSH_ECHO
static int FAST_FUNC builtin_echo(char **argv)
{
return run_applet_main(argv, echo_main);
}
-
+#endif
#if ENABLE_HUSH_PRINTF
static int FAST_FUNC builtin_printf(char **argv)
{