2003-02-12 11:40:28 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# flex
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-01-19 15:54:58 +01:00
|
|
|
FLEX_VERSION:=2.5.33
|
2007-02-03 22:05:53 +01:00
|
|
|
FLEX_PATCH_VERSION:=11
|
2007-01-19 15:54:58 +01:00
|
|
|
FLEX_SOURCE:=flex_$(FLEX_VERSION).orig.tar.gz
|
|
|
|
FLEX_PATCH:=flex_$(FLEX_VERSION)-$(FLEX_PATCH_VERSION).diff.gz
|
2007-12-27 13:00:12 +01:00
|
|
|
FLEX_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/f/flex
|
2007-01-19 15:54:58 +01:00
|
|
|
FLEX_DIR:=$(BUILD_DIR)/flex-$(FLEX_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
FLEX_CAT:=$(ZCAT)
|
2003-02-12 11:40:28 +01:00
|
|
|
FLEX_BINARY:=flex
|
|
|
|
FLEX_TARGET_BINARY:=usr/bin/flex
|
|
|
|
|
|
|
|
$(DL_DIR)/$(FLEX_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(FLEX_SITE),$(FLEX_SOURCE))
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(FLEX_PATCH):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(FLEX_SITE),$(FLEX_PATCH))
|
2003-02-12 11:40:28 +01:00
|
|
|
|
2003-11-12 10:31:12 +01:00
|
|
|
flex-source: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(FLEX_DIR)/.unpacked: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(FLEX_CAT) $(DL_DIR)/$(FLEX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-01-19 15:54:58 +01:00
|
|
|
ifneq ($(FLEX_PATCH),)
|
|
|
|
toolchain/patch-kernel.sh $(FLEX_DIR) $(DL_DIR) $(FLEX_PATCH)
|
|
|
|
if [ -d $(FLEX_DIR)/debian/patches ]; then \
|
2007-08-22 11:56:41 +02:00
|
|
|
toolchain/patch-kernel.sh $(FLEX_DIR) $(FLEX_DIR)/debian/patches \*.patch; \
|
2007-01-19 15:54:58 +01:00
|
|
|
fi
|
|
|
|
endif
|
2007-03-07 15:32:22 +01:00
|
|
|
$(CONFIG_UPDATE) $(FLEX_DIR)
|
2007-01-19 15:54:58 +01:00
|
|
|
touch $@
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
|
2007-01-19 15:54:58 +01:00
|
|
|
(cd $(FLEX_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2003-02-12 11:40:28 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-02-12 11:40:28 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-02-12 11:40:28 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-09-17 14:30:31 +02:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
2007-01-19 15:54:58 +01:00
|
|
|
--includedir=$(TARGET_DIR)/usr/include \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-01-19 15:54:58 +01:00
|
|
|
touch $@
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(FLEX_DIR)/$(FLEX_BINARY): $(FLEX_DIR)/.configured
|
2007-07-09 10:30:38 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(FLEX_DIR)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(FLEX_TARGET_BINARY): $(FLEX_DIR)/$(FLEX_BINARY)
|
2004-12-11 14:01:10 +01:00
|
|
|
$(MAKE1) \
|
2003-02-12 11:40:28 +01:00
|
|
|
prefix=$(TARGET_DIR)/usr \
|
|
|
|
exec_prefix=$(TARGET_DIR)/usr \
|
|
|
|
bindir=$(TARGET_DIR)/usr/bin \
|
|
|
|
sbindir=$(TARGET_DIR)/usr/sbin \
|
|
|
|
libexecdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
datadir=$(TARGET_DIR)/usr/share \
|
|
|
|
sysconfdir=$(TARGET_DIR)/etc \
|
|
|
|
sharedstatedir=$(TARGET_DIR)/usr/com \
|
|
|
|
localstatedir=$(TARGET_DIR)/var \
|
|
|
|
libdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
infodir=$(TARGET_DIR)/usr/info \
|
|
|
|
mandir=$(TARGET_DIR)/usr/man \
|
|
|
|
includedir=$(TARGET_DIR)/usr/include \
|
2004-10-21 15:56:21 +02:00
|
|
|
-C $(FLEX_DIR) install
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FLEX_LIBFL),y)
|
2007-11-29 14:03:56 +01:00
|
|
|
install -D $(FLEX_DIR)/libfl.a $(STAGING_DIR)/usr/lib/libfl.a
|
2006-01-23 22:21:00 +01:00
|
|
|
endif
|
2007-09-17 14:30:31 +02:00
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/info
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/man
|
|
|
|
endif
|
|
|
|
rm -rf $(TARGET_DIR)/share/locale
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc
|
2005-04-15 04:19:11 +02:00
|
|
|
(cd $(TARGET_DIR)/usr/bin; ln -snf flex lex)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
flex: $(TARGET_DIR)/$(FLEX_TARGET_BINARY)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
flex-clean:
|
2004-10-21 15:56:21 +02:00
|
|
|
$(MAKE) \
|
|
|
|
prefix=$(TARGET_DIR)/usr \
|
|
|
|
exec_prefix=$(TARGET_DIR)/usr \
|
|
|
|
bindir=$(TARGET_DIR)/usr/bin \
|
|
|
|
sbindir=$(TARGET_DIR)/usr/sbin \
|
|
|
|
libexecdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
datadir=$(TARGET_DIR)/usr/share \
|
|
|
|
sysconfdir=$(TARGET_DIR)/etc \
|
|
|
|
sharedstatedir=$(TARGET_DIR)/usr/com \
|
|
|
|
localstatedir=$(TARGET_DIR)/var \
|
|
|
|
libdir=$(TARGET_DIR)/usr/lib \
|
2007-09-17 14:30:31 +02:00
|
|
|
infodir=$(TARGET_DIR)/usr/share/info \
|
|
|
|
mandir=$(TARGET_DIR)/usr/share/man \
|
2004-10-21 15:56:21 +02:00
|
|
|
includedir=$(TARGET_DIR)/usr/include \
|
|
|
|
-C $(FLEX_DIR) uninstall
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/lex
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FLEX_LIBFL),y)
|
2006-01-23 22:21:00 +01:00
|
|
|
-rm $(STAGING_DIR)/lib/libfl.a
|
|
|
|
endif
|
2003-02-12 11:40:28 +01:00
|
|
|
-$(MAKE) -C $(FLEX_DIR) clean
|
|
|
|
|
|
|
|
flex-dirclean:
|
|
|
|
rm -rf $(FLEX_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FLEX),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=flex
|
|
|
|
endif
|