docs/buildroot.html: fix typo
[avatt.git] / package / bison / bison.mk
blob1bac120844414f7e97e7d29058561c7203325584
1 #############################################################
3 # bison
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
14 $(DL_DIR)/$(BISON_SOURCE):
15 $(call DOWNLOAD,$(BISON_SITE),$(BISON_SOURCE))
17 bison-source: $(DL_DIR)/$(BISON_SOURCE)
19 $(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
20 $(BISON_CAT) $(DL_DIR)/$(BISON_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
21 $(CONFIG_UPDATE) $(BISON_DIR)/build-aux
22 touch $@
24 $(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
25 (cd $(BISON_DIR); rm -rf config.cache; \
26 $(TARGET_CONFIGURE_OPTS) \
27 $(TARGET_CONFIGURE_ARGS) \
28 gt_cv_func_gnugettext2_libintl=yes \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --sbindir=/usr/sbin \
37 --libdir=/lib \
38 --libexecdir=/usr/lib \
39 --sysconfdir=/etc \
40 --datadir=/usr/share \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 --infodir=/usr/share/info \
44 --includedir=/usr/include \
45 $(DISABLE_NLS) \
47 echo 'all install:' > $(BISON_DIR)/examples/Makefile
48 touch $@
50 $(BISON_DIR)/$(BISON_BINARY): $(BISON_DIR)/.configured
51 $(MAKE) CC=$(TARGET_CC) -C $(BISON_DIR)
53 $(TARGET_DIR)/$(BISON_TARGET_BINARY): $(BISON_DIR)/$(BISON_BINARY)
54 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) install
55 ifneq ($(BR2_HAVE_INFOPAGES),y)
56 rm -rf $(TARGET_DIR)/usr/share/info
57 endif
58 ifneq ($(BR2_HAVE_MANPAGES),y)
59 rm -rf $(TARGET_DIR)/usr/share/man
60 endif
61 rm -rf $(TARGET_DIR)/share/locale
62 rm -rf $(TARGET_DIR)/usr/share/doc
63 cp -a package/bison/yacc $(TARGET_DIR)/usr/bin/yacc
65 bison: uclibc $(TARGET_DIR)/$(BISON_TARGET_BINARY)
67 bison-clean:
68 -$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) uninstall
69 rm -f $(TARGET_DIR)/$(BISON_TARGET_BINARY)
70 -$(MAKE) -C $(BISON_DIR) clean
72 bison-dirclean:
73 rm -rf $(BISON_DIR)
75 #############################################################
77 # Toplevel Makefile options
79 #############################################################
80 ifeq ($(BR2_PACKAGE_BISON),y)
81 TARGETS+=bison
82 endif