2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-02-12 11:40:28 +01:00
|
|
|
#
|
|
|
|
# flex
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-11-10 12:25:26 +01:00
|
|
|
|
2014-04-05 15:21:36 +02:00
|
|
|
FLEX_VERSION = 2.5.37
|
2013-01-25 03:50:39 +01:00
|
|
|
FLEX_SITE = http://download.sourceforge.net/project/flex
|
2011-11-10 12:25:26 +01:00
|
|
|
FLEX_INSTALL_STAGING = YES
|
2013-01-21 12:29:44 +01:00
|
|
|
FLEX_LICENSE = FLEX
|
|
|
|
FLEX_LICENSE_FILES = COPYING
|
2010-07-26 15:04:59 +02:00
|
|
|
FLEX_DEPENDENCIES = \
|
2012-11-01 05:35:44 +01:00
|
|
|
$(if $(BR2_PACKAGE_GETTEXT_IF_LOCALE),gettext) host-m4
|
flex: fix autobuilder failures
Since fe6a9e5e9d (flex: needs M4 at runtime), the autobuilders have
been producing a number of flex related build failures. They have been
hard to track down, because even on the same machine, with the same
Git commit ID and the same configuration, the failure could not be
reproduced.
However, a close inspection of flex's config.log file allowed to find
out what the problem was. In its configure script, flex uses the
host-flex to generate a minimal example, and find out the name of the
output file of flex.
When the M4 environment is passed when building the target flex, it
also affects the *execution* of the host-flex, which tries to use
/usr/bin/m4 (which doesn't exist in the autobuilder machines) instead
of the one built in $(HOST_DIR)/usr/bin/m4. So generating the minimal
example fails. And this is where what I could reproduce and what the
autobuilders script produce differ: in my case, even though host-flex
fails to run, it creates an empty lex.yy.c, which is enough to make
the configure script happy. In the context of the autobuild scripts,
this file is apparently not created at all, for an unknown reason, and
this leads to the configure script to abort.
The fix is to set ac_cv_path_M4. This will affect the default m4 used
by the target flex, but it will not affect the m4 used by the
host-flex. It allows the test made during the configure script to work
properly, and therefore should fix the issue seen in the autobuilders.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-28 03:05:47 +02:00
|
|
|
FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4
|
2012-01-18 11:15:24 +01:00
|
|
|
# we don't have a host-gettext/libintl
|
2013-03-24 06:09:00 +01:00
|
|
|
HOST_FLEX_DEPENDENCIES = host-m4
|
2003-02-12 11:40:28 +01:00
|
|
|
|
2012-11-30 01:46:03 +01:00
|
|
|
define FLEX_DISABLE_PROGRAM
|
|
|
|
$(SED) 's/^bin_PROGRAMS.*//' $(@D)/Makefile.in
|
2009-11-15 11:12:52 +01:00
|
|
|
endef
|
2012-11-30 01:46:03 +01:00
|
|
|
FLEX_POST_PATCH_HOOKS += FLEX_DISABLE_PROGRAM
|
2003-02-12 11:40:28 +01:00
|
|
|
|
2014-07-29 03:35:34 +02:00
|
|
|
# flex++ symlink is broken when flex binary is not installed
|
|
|
|
define FLEX_REMOVE_BROKEN_SYMLINK
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/flex++
|
|
|
|
endef
|
|
|
|
FLEX_POST_INSTALL_TARGET_HOOKS += FLEX_REMOVE_BROKEN_SYMLINK
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-autotools-package))
|