2003-02-12 11:40:28 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# flex
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
FLEX_SOURCE:=flex_2.5.4a.orig.tar.gz
|
2003-05-16 00:15:06 +02:00
|
|
|
FLEX_PATCH:=flex_2.5.4a-24.diff.gz
|
2003-02-12 11:40:28 +01:00
|
|
|
FLEX_SITE:=http://ftp.debian.org/debian/pool/main/f/flex
|
|
|
|
FLEX_DIR:=$(BUILD_DIR)/flex-2.5.4
|
|
|
|
FLEX_CAT:=zcat
|
|
|
|
FLEX_BINARY:=flex
|
|
|
|
FLEX_TARGET_BINARY:=usr/bin/flex
|
|
|
|
|
|
|
|
$(DL_DIR)/$(FLEX_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_SOURCE)
|
|
|
|
|
|
|
|
$(DL_DIR)/$(FLEX_PATCH):
|
|
|
|
$(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_PATCH)
|
|
|
|
|
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) -
|
2004-10-09 04:49:33 +02:00
|
|
|
#toolchain/patch-kernel.sh $(FLEX_DIR) $(DL_DIR) $(FLEX_PATCH)
|
2003-02-12 11:40:28 +01:00
|
|
|
touch $(FLEX_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
|
|
|
|
(cd $(FLEX_DIR); autoconf; rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2003-11-01 06:34:41 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
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 \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2003-02-12 11:40:28 +01:00
|
|
|
);
|
|
|
|
touch $(FLEX_DIR)/.configured
|
|
|
|
|
|
|
|
$(FLEX_DIR)/$(FLEX_BINARY): $(FLEX_DIR)/.configured
|
|
|
|
$(MAKE) -C $(FLEX_DIR)
|
|
|
|
|
|
|
|
$(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
|
2003-02-12 11:40:28 +01:00
|
|
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
|
|
|
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
2004-10-21 15:56:21 +02:00
|
|
|
(cd $(TARGET_DIR)/usr/bin; ln -sf flex lex)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
flex: uclibc $(TARGET_DIR)/$(FLEX_TARGET_BINARY)
|
|
|
|
|
|
|
|
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 \
|
|
|
|
infodir=$(TARGET_DIR)/usr/info \
|
|
|
|
mandir=$(TARGET_DIR)/usr/man \
|
|
|
|
includedir=$(TARGET_DIR)/usr/include \
|
|
|
|
-C $(FLEX_DIR) uninstall
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/lex
|
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
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_FLEX)),y)
|
|
|
|
TARGETS+=flex
|
|
|
|
endif
|