1 ################################################################################
5 ################################################################################
8 BASH_SITE = $(BR2_GNU_MIRROR)/bash
9 # Build after since bash is better than busybox shells
10 BASH_DEPENDENCIES = ncurses readline host-bison \
11 $(if $(BR2_PACKAGE_BUSYBOX),busybox)
12 BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
13 BASH_LICENSE = GPL-3.0+
14 BASH_LICENSE_FILES = COPYING
17 ac_cv_rl_prefix="$(STAGING_DIR)" \
18 ac_cv_rl_version="$(READLINE_VERSION)" \
19 bash_cv_getcwd_malloc=yes \
20 bash_cv_job_control_missing=present \
21 bash_cv_sys_named_pipes=present \
22 bash_cv_func_sigsetjmp=present \
23 bash_cv_printf_a_format=yes
25 # The static build needs some trickery
26 ifeq ($(BR2_STATIC_LIBS),y)
27 BASH_CONF_OPTS += --enable-static-link
28 BASH_CONF_ENV += SHOBJ_STATUS=unsupported
29 # bash wants to redefine the getenv() function. To check whether this is
30 # possible, AC_TRY_RUN is used which is not possible in
32 # On uClibc, redefining getenv is not possible; on glibc and musl it is.
34 # http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html
35 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
36 BASH_CONF_ENV += bash_cv_getenv_redef=no
38 BASH_CONF_ENV += bash_cv_getenv_redef=yes
42 # Add /bin/bash to /etc/shells otherwise some login tools like dropbear
43 # can reject the user connexion. See man shells.
44 define BASH_INSTALL_TARGET_CMDS
45 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
46 DESTDIR=$(TARGET_DIR) exec_prefix=/ install
47 rm -f $(TARGET_DIR)/bin/bashbug
48 grep -qsE '^/bin/bash$$' $(TARGET_DIR)/etc/shells \
49 || echo "/bin/bash" >> $(TARGET_DIR)/etc/shells
52 $(eval $(autotools-package))