]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools.bbclass: fix cp error for empty dir
authorNitin A Kamble <nitin.a.kamble@intel.com>
Wed, 28 Dec 2011 17:34:00 +0000 (09:34 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Jan 2012 12:10:47 +0000 (12:10 +0000)
the .../usr/share/aclocal is empty for build from scratch. so avoid cp
error if the directory is empty.

Fixes this error, which is thrown before pseudo is built:

| cp: cannot stat
`/builddisk/build/build0/tmp/sysroots/x86_64-linux/usr/share/aclocal/*':
No such file or directory
NOTE: package libtool-native-2.4.2-r0.0: task do_configure: Failed

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
meta/classes/autotools.bbclass

index 7536bac3963421f5825ee93f14deedd57fa3b43e..2f462ff93b5c49b1067a9d5416b7b6fbd6661660 100644 (file)
@@ -122,7 +122,9 @@ autotools_do_configure() {
                        # We avoid this by taking a copy here and then files cannot disappear.
                        if [ -d ${STAGING_DATADIR}/aclocal ]; then
                                mkdir -p ${B}/aclocal-copy/
-                               cp ${STAGING_DATADIR}/aclocal/* ${B}/aclocal-copy/
+                               # for scratch build this directory can be empty
+                               # so avoid cp's no files to copy error
+                               cp -r ${STAGING_DATADIR}/aclocal/. ${B}/aclocal-copy/
                                acpaths="$acpaths -I ${B}/aclocal-copy/"
                        fi
                        # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look