base.bbclass : add check from zecke/OM mtn that errors if libname.lai is not
authorGraeme Gregory <dp@xora.org.uk>
Fri, 9 May 2008 15:08:54 +0000 (15:08 +0000)
committerGraeme Gregory <dp@xora.org.uk>
Fri, 9 May 2008 15:08:54 +0000 (15:08 +0000)
unique. Acked by RP

classes/base.bbclass

index b653bec..64a179f 100644 (file)
@@ -287,7 +287,16 @@ oe_libinstall() {
        if [ -z "$dir" ]; then
                dir=`pwd`
        fi
+
        dotlai=$libname.lai
+
+       # Sanity check that the libname.lai is unique
+       number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l`
+       if [ $number_of_files -gt 1 ]; then
+               oefatal "oe_libinstall: $dotlai is not unique in $dir"
+       fi
+
+
        dir=$dir`(cd $dir;find . -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"`
        olddir=`pwd`
        __runcmd cd $dir