bash.mk 1.3 KB

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