bash.mk 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #############################################################
  2. #
  3. # bash
  4. #
  5. #############################################################
  6. BASH_VERSION = 4.2
  7. BASH_SITE = $(BR2_GNU_MIRROR)/bash
  8. BASH_DEPENDENCIES = ncurses
  9. BASH_CONF_ENV += \
  10. bash_cv_job_control_missing=present \
  11. bash_cv_sys_named_pipes=present \
  12. bash_cv_func_sigsetjmp=present \
  13. bash_cv_printf_a_format=yes
  14. # Make sure we build after busybox so that /bin/sh links to bash
  15. ifeq ($(BR2_PACKAGE_BUSYBOX),y)
  16. BASH_DEPENDENCIES += busybox
  17. endif
  18. # Save the old sh file/link if there is one and symlink bash->sh
  19. define BASH_INSTALL_TARGET_CMDS
  20. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
  21. DESTDIR=$(TARGET_DIR) exec_prefix=/ install
  22. rm -f $(TARGET_DIR)/bin/bashbug
  23. if [ -e $(TARGET_DIR)/bin/sh ]; then \
  24. mv -f $(TARGET_DIR)/bin/sh $(TARGET_DIR)/bin/sh.prebash; \
  25. fi
  26. ln -sf bash $(TARGET_DIR)/bin/sh
  27. endef
  28. # Restore the old shell file/link if there was one
  29. define BASH_UNINSTALL_TARGET_CMDS
  30. $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) \
  31. -C $(BASH_DIR) exec_prefix=/ uninstall
  32. rm -f $(TARGET_DIR)/bin/sh
  33. if [ -e $(TARGET_DIR)/bin/sh.prebash ]; then \
  34. mv -f $(TARGET_DIR)/bin/sh.prebash $(TARGET_DIR)/bin/sh; \
  35. fi
  36. endef
  37. $(eval $(autotools-package))