kumquat-buildroot/package/flex/flex.mk
Gustavo Zacarias bd72a13a4c flex: fix build for nommu systems
The flex binary uses fork() so it breaks on !MMU builds.
Since we usually don't require flex in the target and the common
scenario is that we just want libfl in staging reverse the options so
that BR2_PACKAGE_FLEX just builds and install libfl.a and change the
LIBFL option to BR2_PACKAGE_FLEX_BINARY to install the binary in the
target.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-30 11:52:38 -08:00

37 lines
923 B
Makefile

#############################################################
#
# flex
#
#############################################################
FLEX_VERSION = 2.5.35
FLEX_PATCH_VERSION = 10
FLEX_SOURCE = flex_$(FLEX_VERSION).orig.tar.gz
FLEX_PATCH = flex_$(FLEX_VERSION)-$(FLEX_PATCH_VERSION).diff.gz
FLEX_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/f/flex
FLEX_DIR = $(BUILD_DIR)/flex-$(FLEX_VERSION)
FLEX_INSTALL_STAGING = YES
FLEX_DEPENDENCIES = \
$(if $(BR2_PACKAGE_GETTEXT),gettext)
# we don't have a host-gettext/libintl
HOST_FLEX_DEPENDENCIES =
ifeq ($(BR2_PACKAGE_FLEX_BINARY),y)
# lex -> flex
define FLEX_INSTALL_LEX
cd $(TARGET_DIR)/usr/bin && ln -snf flex lex
endef
FLEX_POST_INSTALL_HOOKS += FLEX_INSTALL_LEX
else
define FLEX_DISABLE_PROGRAM
$(SED) 's/^bin_PROGRAMS.*//' $(@D)/Makefile.in
endef
FLEX_POST_PATCH_HOOKS += FLEX_DISABLE_PROGRAM
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))