Skip to contentSkip to conversation

flex: fix native tool problems

PATCH New Ross Burton 1 participant 1 message Dec 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 flex: fix native tool problems

Always depend on bison-native and flex-native, yacc is needed during the build and a host flex is also needed to build flex (apart from for flex-native where it can run itself, but this dependency will be automatically pruned).

Also instead of special-casing class-target builds when telling it where to find a host flex, always pass the path to a sysroot flex apart from when building flex-native. This fixes the build of nativesdk-flex, which can't run the flex it built.

---
 meta/recipes-devtools/flex/flex.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-devtools/flex/flex.inc +4 -3
index e23bb3d..7398b15 100644
@@ -5,19 +5,20 @@ HOMEPAGE = "http://sourceforge.net/projects/flex/"
 
 SECTION = "devel"
 LICENSE = "BSD"
-DEPENDS_class-target += "bison-native flex-native"
+DEPENDS = "bison-native flex-native"
 
 UPSTREAM_CHECK_REGEX = "flex-(?P<pver>\d+(\.\d+)+)\.tar"
 
 inherit autotools gettext texinfo ptest
 
-
 M4 = "${bindir}/m4"
 M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
+FLEX = "${STAGING_BINDIR_NATIVE}/flex"
+FLEX_class-native = ""
 
 EXTRA_OECONF += "ac_cv_path_M4=${M4}"
 EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
-EXTRA_OEMAKE_class-target += "FLEX=`which flex`"
+EXTRA_OEMAKE += "FLEX=${FLEX}"
 
 do_install_append_class-native() {
 	create_wrapper ${D}/${bindir}/flex M4=${M4}
Signature · 1 line
2.6.4