bash.mk 947 B

1234567891011121314151617181920212223242526272829303132
  1. #############################################################
  2. #
  3. # bash
  4. #
  5. #############################################################
  6. BASH_VERSION = 4.1
  7. BASH_SITE = $(BR2_GNU_MIRROR)/bash
  8. BASH_DEPENDENCIES = ncurses
  9. # Save the old sh file/link if there is one and symlink bash->sh
  10. define BASH_INSTALL_TARGET_CMDS
  11. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
  12. DESTDIR=$(TARGET_DIR) exec_prefix=/ install
  13. rm -f $(TARGET_DIR)/bin/bashbug
  14. if [ -e $(TARGET_DIR)/bin/sh ]; then \
  15. mv -f $(TARGET_DIR)/bin/sh $(TARGET_DIR)/bin/sh.prebash; \
  16. fi
  17. ln -sf bash $(TARGET_DIR)/bin/sh
  18. endef
  19. # Restore the old shell file/link if there was one
  20. define BASH_UNINSTALL_TARGET_CMDS
  21. $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) \
  22. -C $(BASH_DIR) exec_prefix=/ uninstall
  23. rm -f $(TARGET_DIR)/bin/sh
  24. if [ -e $(TARGET_DIR)/bin/sh.prebash ]; then \
  25. mv -f $(TARGET_DIR)/bin/sh.prebash $(TARGET_DIR)/bin/sh; \
  26. fi
  27. endef
  28. $(eval $(call AUTOTARGETS,package,bash))