From 45fc36a32fb23c513833d7e27fb4b9cd8be68fb5 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Sun, 20 Jun 2010 14:35:05 -0700 Subject: Siteinfo cleanup v2 - Don't supply site files for native. - Split up the site information, so we don't need to add every single combination of os and architecture to the siteinfo.bbclass. - Drop the ${FILE_DIRNAME}/site- stuff, there are other ways to do it. - SITEINFO_ENDIANESS -> SITEINFO_ENDIANNESS. Signed-off-by: Chris Larson --- classes/autotools.bbclass | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 754fb875cb..b2de2b13f7 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -30,9 +30,24 @@ DEPENDS_virtclass-nativesdk_prepend = "${@autotools_deps(d)}" inherit siteinfo +def _autotools_get_sitefiles(d): + def inherits(d, *classes): + if any(bb.data.inherits_class(cls, d) for cls in classes): + return True + + if inherits(d, "native", "nativesdk"): + return + + sitedata = siteinfo_data(d) + for path in d.getVar("BBPATH", True).split(":"): + for element in sitedata: + filename = os.path.join(path, "site", element) + if os.path.exists(filename): + yield filename + # Space separated list of shell scripts with variables defined to supply test # results for autoconf tests we cannot run at build time. -export CONFIG_SITE = "${@siteinfo_get_files(d)}" +export CONFIG_SITE = "${@' '.join(_autotools_get_sitefiles(d))}" acpaths = "default" EXTRA_AUTORECONF = "--exclude=autopoint" -- cgit v1.2.3