summaryrefslogtreecommitdiff
path: root/classes/insane.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-03-31 12:19:58 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-05-05 15:05:40 +0100
commit12a05b660c12d2be2efd44db7372159ab62bd4fd (patch)
treeb9e5cc9aa7cc90fd86ea22a1c8d82c557208ebf2 /classes/insane.bbclass
parentd1a8b276c0f7c2838816071bca797bb56fcccef7 (diff)
gettext enhancements: Make it easier to use the right gettext
This patch adds a check to insane to ensure that gettext exists in the dependancy list when it is used in the configure.[ac|in] Further we enhance the gettext class to enable easy addition of the required gettext dependancies by inheriting the gettext class. Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'classes/insane.bbclass')
-rw-r--r--classes/insane.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index af6cec3a96..2118a27fbd 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -456,6 +456,7 @@ python do_qa_staging() {
# Check broken config.log files
addtask qa_configure after do_configure before do_compile
python do_qa_configure() {
+ configs = []
bb.debug(1, "Checking sanity of the config.log file")
for root, dirs, files in os.walk(bb.data.getVar('WORKDIR', d, True)):
statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \
@@ -464,4 +465,24 @@ python do_qa_configure() {
if os.system(statement) == 0:
bb.fatal("""This autoconf log indicates errors, it looked at host includes.
Rerun configure task after fixing this. The path was '%s'""" % root)
+
+ if "configure.ac" in files:
+ configs.append(os.path.join(root,"configure.ac"))
+ if "configure.in" in files:
+ configs.append(os.path.join(root, "configure.in"))
+
+ if "gettext" not in bb.data.getVar('P', d, True):
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
+ gt = "gettext-native"
+ elif bb.data.inherits_class('cross-canadian', d):
+ gt = "gettext-nativesdk"
+ else:
+ gt = "gettext"
+ deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "")
+ if gt not in deps:
+ for config in configs:
+ gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
+ if os.system(gnu) == 0:
+ bb.note("""Gettext required but not in DEPENDS for file %s.
+Missing inherit gettext?""" % config)
}