diff --git a/package/bash/Config.in b/package/bash/Config.in index 5a9ebb8d02..0212df6bfd 100644 --- a/package/bash/Config.in +++ b/package/bash/Config.in @@ -9,3 +9,17 @@ config BR2_PACKAGE_BASH The standard GNU Bourne again shell. http://tiswww.case.edu/php/chet/bash/bashtop.html + +if BR2_PACKAGE_BASH + +config BR2_PACKAGE_BASH_LOADABLE_EXAMPLES + bool "loadable examples" + depends on !BR2_STATIC_LIBS + help + This option will enable the installation of the "loadable" + examples, which are dynamically loadable extension providing + additional built-ins commands to bash. There are typically + not needed as they are provided as regular, external + commands. + +endif diff --git a/package/bash/bash.mk b/package/bash/bash.mk index 31cb1f50a3..7b853ece08 100644 --- a/package/bash/bash.mk +++ b/package/bash/bash.mk @@ -47,6 +47,19 @@ define BASH_REMOVE_UNUSED_FILES endef BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES +ifeq ($(BR2_PACKAGE_BASH_LOADABLE_EXAMPLES),y) +define BASH_REMOVE_LOADABLE_UNUSED_FILES + rm -f $(TARGET_DIR)/usr/lib/bash/Makefile.inc + rm -f $(TARGET_DIR)/usr/lib/bash/loadables.h +endef +BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_UNUSED_FILES +else +define BASH_REMOVE_LOADABLE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/lib/bash +endef +BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_EXAMPLES +endif + # Add /bin/bash to /etc/shells otherwise some login tools like dropbear # can reject the user connection. See man shells. define BASH_ADD_MKSH_TO_SHELLS