2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-23 14:54:42 +02:00
|
|
|
#
|
|
|
|
# bash
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2018-03-29 21:15:50 +02:00
|
|
|
BASH_VERSION = 4.4.18
|
2010-06-09 15:36:26 +02:00
|
|
|
BASH_SITE = $(BR2_GNU_MIRROR)/bash
|
2014-10-08 15:19:47 +02:00
|
|
|
# Build after since bash is better than busybox shells
|
|
|
|
BASH_DEPENDENCIES = ncurses readline host-bison \
|
|
|
|
$(if $(BR2_PACKAGE_BUSYBOX),busybox)
|
2017-05-23 19:19:31 +02:00
|
|
|
BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
|
2017-03-30 15:43:33 +02:00
|
|
|
BASH_LICENSE = GPL-3.0+
|
2012-11-13 02:05:37 +01:00
|
|
|
BASH_LICENSE_FILES = COPYING
|
|
|
|
|
2014-02-27 21:58:59 +01:00
|
|
|
BASH_CONF_ENV += \
|
2014-03-01 18:54:26 +01:00
|
|
|
ac_cv_rl_prefix="$(STAGING_DIR)" \
|
2014-02-27 21:58:59 +01:00
|
|
|
ac_cv_rl_version="$(READLINE_VERSION)" \
|
2015-09-03 17:00:09 +02:00
|
|
|
bash_cv_getcwd_malloc=yes \
|
2014-02-27 21:58:59 +01:00
|
|
|
bash_cv_job_control_missing=present \
|
|
|
|
bash_cv_sys_named_pipes=present \
|
|
|
|
bash_cv_func_sigsetjmp=present \
|
|
|
|
bash_cv_printf_a_format=yes
|
2010-06-09 15:36:26 +02:00
|
|
|
|
2013-08-12 15:15:45 +02:00
|
|
|
# The static build needs some trickery
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2017-05-23 19:19:31 +02:00
|
|
|
BASH_CONF_OPTS += --enable-static-link
|
2017-09-18 20:30:27 +02:00
|
|
|
BASH_CONF_ENV += SHOBJ_STATUS=unsupported
|
2014-10-22 11:40:40 +02:00
|
|
|
# bash wants to redefine the getenv() function. To check whether this is
|
|
|
|
# possible, AC_TRY_RUN is used which is not possible in
|
|
|
|
# cross-compilation.
|
|
|
|
# On uClibc, redefining getenv is not possible; on glibc and musl it is.
|
|
|
|
# Related:
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
|
BASH_CONF_ENV += bash_cv_getenv_redef=no
|
|
|
|
else
|
|
|
|
BASH_CONF_ENV += bash_cv_getenv_redef=yes
|
|
|
|
endif
|
2013-08-12 15:15:45 +02:00
|
|
|
endif
|
|
|
|
|
2018-01-13 17:05:27 +01:00
|
|
|
# Add /bin/bash to /etc/shells otherwise some login tools like dropbear
|
|
|
|
# can reject the user connexion. See man shells.
|
2010-06-09 15:36:26 +02:00
|
|
|
define BASH_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
|
|
|
DESTDIR=$(TARGET_DIR) exec_prefix=/ install
|
|
|
|
rm -f $(TARGET_DIR)/bin/bashbug
|
2018-01-13 17:05:27 +01:00
|
|
|
grep -qsE '^/bin/bash' $(TARGET_DIR)/etc/shells \
|
|
|
|
|| echo "/bin/bash" >> $(TARGET_DIR)/etc/shells
|
2010-06-09 15:36:26 +02:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|