bison.mk 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #############################################################
  2. #
  3. # bison
  4. #
  5. #############################################################
  6. BISON_SOURCE:=bison-1.35.tar.bz2
  7. BISON_SITE:=ftp://ftp.gnu.org/gnu/bison
  8. BISON_DIR:=$(BUILD_DIR)/bison-1.35
  9. BISON_CAT:=bzcat
  10. BISON_BINARY:=src/bison
  11. BISON_TARGET_BINARY:=usr/bin/bison
  12. $(DL_DIR)/$(BISON_SOURCE):
  13. $(WGET) -P $(DL_DIR) $(BISON_SITE)/$(BISON_SOURCE)
  14. bison-source: $(DL_DIR)/$(BISON_SOURCE)
  15. $(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
  16. $(BISON_CAT) $(DL_DIR)/$(BISON_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  17. touch $(BISON_DIR)/.unpacked
  18. $(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
  19. (cd $(BISON_DIR); rm -rf config.cache; \
  20. $(TARGET_CONFIGURE_OPTS) \
  21. CFLAGS="$(TARGET_CFLAGS)" \
  22. gt_cv_func_gnugettext2_libintl=yes \
  23. ./configure \
  24. --target=$(GNU_TARGET_NAME) \
  25. --host=$(GNU_TARGET_NAME) \
  26. --build=$(GNU_HOST_NAME) \
  27. --prefix=/usr \
  28. --exec-prefix=/usr \
  29. --bindir=/usr/bin \
  30. --sbindir=/usr/sbin \
  31. --libexecdir=/usr/lib \
  32. --sysconfdir=/etc \
  33. --datadir=/usr/share \
  34. --localstatedir=/var \
  35. --mandir=/usr/man \
  36. --infodir=/usr/info \
  37. $(DISABLE_NLS) \
  38. );
  39. touch $(BISON_DIR)/.configured
  40. $(BISON_DIR)/$(BISON_BINARY): $(BISON_DIR)/.configured
  41. $(MAKE) CC=$(TARGET_CC) -C $(BISON_DIR)
  42. $(TARGET_DIR)/$(BISON_TARGET_BINARY): $(BISON_DIR)/$(BISON_BINARY)
  43. $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) install
  44. rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
  45. $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
  46. cp -a package/bison/yacc $(TARGET_DIR)/usr/bin/yacc
  47. bison: uclibc $(TARGET_DIR)/$(BISON_TARGET_BINARY)
  48. bison-clean:
  49. $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) uninstall
  50. -$(MAKE) -C $(BISON_DIR) clean
  51. bison-dirclean:
  52. rm -rf $(BISON_DIR)
  53. #############################################################
  54. #
  55. # Toplevel Makefile options
  56. #
  57. #############################################################
  58. ifeq ($(strip $(BR2_PACKAGE_BISON)),y)
  59. TARGETS+=bison
  60. endif