bash.mk 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ################################################################################
  2. #
  3. # bash
  4. #
  5. ################################################################################
  6. BASH_VERSION = 4.4
  7. BASH_SITE = $(BR2_GNU_MIRROR)/bash
  8. # Build after since bash is better than busybox shells
  9. BASH_DEPENDENCIES = ncurses readline host-bison \
  10. $(if $(BR2_PACKAGE_BUSYBOX),busybox)
  11. BASH_CONF_OPTS = --with-installed-readline
  12. BASH_LICENSE = GPL-3.0+
  13. BASH_LICENSE_FILES = COPYING
  14. BASH_CONF_ENV += \
  15. ac_cv_rl_prefix="$(STAGING_DIR)" \
  16. ac_cv_rl_version="$(READLINE_VERSION)" \
  17. bash_cv_getcwd_malloc=yes \
  18. bash_cv_job_control_missing=present \
  19. bash_cv_sys_named_pipes=present \
  20. bash_cv_func_sigsetjmp=present \
  21. bash_cv_printf_a_format=yes
  22. # The static build needs some trickery
  23. ifeq ($(BR2_STATIC_LIBS),y)
  24. BASH_CONF_OPTS += --enable-static-link --without-bash-malloc
  25. # bash wants to redefine the getenv() function. To check whether this is
  26. # possible, AC_TRY_RUN is used which is not possible in
  27. # cross-compilation.
  28. # On uClibc, redefining getenv is not possible; on glibc and musl it is.
  29. # Related:
  30. # http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html
  31. ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
  32. BASH_CONF_ENV += bash_cv_getenv_redef=no
  33. else
  34. BASH_CONF_ENV += bash_cv_getenv_redef=yes
  35. endif
  36. endif
  37. # Make /bin/sh -> bash (no other shell, better than busybox shells)
  38. define BASH_INSTALL_TARGET_CMDS
  39. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
  40. DESTDIR=$(TARGET_DIR) exec_prefix=/ install
  41. rm -f $(TARGET_DIR)/bin/bashbug
  42. endef
  43. $(eval $(autotools-package))