bash.mk 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 = bash_cv_job_control_missing=no
  10. # Make sure we build after busybox so that /bin/sh links to bash
  11. ifeq ($(BR2_PACKAGE_BUSYBOX),y)
  12. BASH_DEPENDENCIES += busybox
  13. endif
  14. # Save the old sh file/link if there is one and symlink bash->sh
  15. define BASH_INSTALL_TARGET_CMDS
  16. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
  17. DESTDIR=$(TARGET_DIR) exec_prefix=/ install
  18. rm -f $(TARGET_DIR)/bin/bashbug
  19. if [ -e $(TARGET_DIR)/bin/sh ]; then \
  20. mv -f $(TARGET_DIR)/bin/sh $(TARGET_DIR)/bin/sh.prebash; \
  21. fi
  22. ln -sf bash $(TARGET_DIR)/bin/sh
  23. endef
  24. # Restore the old shell file/link if there was one
  25. define BASH_UNINSTALL_TARGET_CMDS
  26. $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) \
  27. -C $(BASH_DIR) exec_prefix=/ uninstall
  28. rm -f $(TARGET_DIR)/bin/sh
  29. if [ -e $(TARGET_DIR)/bin/sh.prebash ]; then \
  30. mv -f $(TARGET_DIR)/bin/sh.prebash $(TARGET_DIR)/bin/sh; \
  31. fi
  32. endef
  33. $(eval $(call AUTOTARGETS))