bison.mk 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #############################################################
  2. #
  3. # bison
  4. #
  5. #############################################################
  6. BISON_VERSION:=2.3
  7. BISON_SOURCE:=bison-$(BISON_VERSION).tar.bz2
  8. BISON_SITE:=$(BR2_GNU_MIRROR)/bison
  9. BISON_DIR:=$(BUILD_DIR)/bison-$(BISON_VERSION)
  10. BISON_CAT:=$(BZCAT)
  11. BISON_BINARY:=src/bison
  12. BISON_TARGET_BINARY:=usr/bin/bison
  13. $(DL_DIR)/$(BISON_SOURCE):
  14. $(call DOWNLOAD,$(BISON_SITE),$(BISON_SOURCE))
  15. bison-source: $(DL_DIR)/$(BISON_SOURCE)
  16. $(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
  17. $(BISON_CAT) $(DL_DIR)/$(BISON_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  18. $(CONFIG_UPDATE) $(BISON_DIR)/build-aux
  19. touch $@
  20. $(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
  21. (cd $(BISON_DIR); rm -rf config.cache; \
  22. $(TARGET_CONFIGURE_OPTS) \
  23. $(TARGET_CONFIGURE_ARGS) \
  24. gt_cv_func_gnugettext2_libintl=yes \
  25. ./configure \
  26. --target=$(GNU_TARGET_NAME) \
  27. --host=$(GNU_TARGET_NAME) \
  28. --build=$(GNU_HOST_NAME) \
  29. --prefix=/usr \
  30. --exec-prefix=/usr \
  31. --bindir=/usr/bin \
  32. --sbindir=/usr/sbin \
  33. --libdir=/lib \
  34. --libexecdir=/usr/lib \
  35. --sysconfdir=/etc \
  36. --datadir=/usr/share \
  37. --localstatedir=/var \
  38. --mandir=/usr/share/man \
  39. --infodir=/usr/share/info \
  40. --includedir=/usr/include \
  41. $(DISABLE_NLS) \
  42. )
  43. echo 'all install:' > $(BISON_DIR)/examples/Makefile
  44. touch $@
  45. $(BISON_DIR)/$(BISON_BINARY): $(BISON_DIR)/.configured
  46. $(MAKE) CC=$(TARGET_CC) -C $(BISON_DIR)
  47. $(TARGET_DIR)/$(BISON_TARGET_BINARY): $(BISON_DIR)/$(BISON_BINARY)
  48. $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) install
  49. ifneq ($(BR2_HAVE_INFOPAGES),y)
  50. rm -rf $(TARGET_DIR)/usr/share/info
  51. endif
  52. ifneq ($(BR2_HAVE_MANPAGES),y)
  53. rm -rf $(TARGET_DIR)/usr/share/man
  54. endif
  55. rm -rf $(TARGET_DIR)/share/locale
  56. rm -rf $(TARGET_DIR)/usr/share/doc
  57. cp -a package/bison/yacc $(TARGET_DIR)/usr/bin/yacc
  58. bison: uclibc $(TARGET_DIR)/$(BISON_TARGET_BINARY)
  59. bison-clean:
  60. -$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) uninstall
  61. rm -f $(TARGET_DIR)/$(BISON_TARGET_BINARY)
  62. -$(MAKE) -C $(BISON_DIR) clean
  63. bison-dirclean:
  64. rm -rf $(BISON_DIR)
  65. #############################################################
  66. #
  67. # Toplevel Makefile options
  68. #
  69. #############################################################
  70. ifeq ($(BR2_PACKAGE_BISON),y)
  71. TARGETS+=bison
  72. endif