bash.mk 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ################################################################################
  2. #
  3. # bash
  4. #
  5. ################################################################################
  6. BASH_VERSION = 4.3
  7. BASH_SITE = $(BR2_GNU_MIRROR)/bash
  8. BASH_DEPENDENCIES = ncurses readline host-bison
  9. BASH_CONF_OPTS = --with-installed-readline
  10. BASH_LICENSE = GPLv3+
  11. BASH_LICENSE_FILES = COPYING
  12. BASH_CONF_ENV += \
  13. ac_cv_rl_prefix="$(STAGING_DIR)" \
  14. ac_cv_rl_version="$(READLINE_VERSION)" \
  15. bash_cv_job_control_missing=present \
  16. bash_cv_sys_named_pipes=present \
  17. bash_cv_func_sigsetjmp=present \
  18. bash_cv_printf_a_format=yes
  19. # Parallel build sometimes fails because some of the generator tools
  20. # are built twice (i.e. while executing).
  21. BASH_MAKE = $(MAKE1)
  22. # The static build needs some trickery
  23. ifeq ($(BR2_PREFER_STATIC_LIB),y)
  24. BASH_CONF_OPTS += --enable-static-link --without-bash-malloc
  25. endif
  26. # Make sure we build after busybox so that /bin/sh links to bash
  27. ifeq ($(BR2_PACKAGE_BUSYBOX),y)
  28. BASH_DEPENDENCIES += busybox
  29. endif
  30. # Save the old sh file/link if there is one and symlink bash->sh
  31. define BASH_INSTALL_TARGET_CMDS
  32. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
  33. DESTDIR=$(TARGET_DIR) exec_prefix=/ install
  34. rm -f $(TARGET_DIR)/bin/bashbug
  35. if [ -e $(TARGET_DIR)/bin/sh ]; then \
  36. mv -f $(TARGET_DIR)/bin/sh $(TARGET_DIR)/bin/sh.prebash; \
  37. fi
  38. ln -sf bash $(TARGET_DIR)/bin/sh
  39. endef
  40. $(eval $(autotools-package))