From: Koen Kooi Date: Wed, 19 Mar 2008 20:17:40 +0000 (+0000) Subject: native, autotools bbclass: check if bindir exists before trying to access it X-Git-Tag: Release-2010-05/1~7342 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0c07ebd9158c035921040c1641fb7f80427a895;p=openembedded.git native, autotools bbclass: check if bindir exists before trying to access it * hardcoded since native.bbclass redefines ${bindir} and friends :( --- diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index ae9b108279..5ef8814259 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -205,10 +205,21 @@ autotools_stage_all() { cp -fpPR ${STAGE_TEMP}/${datadir}/aclocal/* ${STAGING_DATADIR}/aclocal fi - if [ "${AUTOTOOLS_NATIVE_STAGE_BINARIES}" = "1"] ; then - install -d ${STAGING_BINDIR_NATIVE} - cp -fpPR ${STAGE_TEMP}/*bin/* ${STAGING_BINDIR_NATIVE}/ - cp -fpPR ${STAGE_TEMP}/usr/*bin/* ${STAGING_BINDIR_NATIVE}/ + if [ "${AUTOTOOLS_NATIVE_STAGE_BINARIES}" = "1" ] ; then + if [ -d ${STAGE_TEMP}/bin ]; then + cp -fpPR ${STAGE_TEMP}/bin/*${STAGING_DIR_HOST}/${layout_bindir} + fi + + if [ -d ${STAGE_TEMP}/sbin ]; then + cp -fpPR ${STAGE_TEMP}/sbin/* ${STAGING_DIR_HOST}/${layout_bindir} + fi + + if [ -d ${STAGE_TEMP}/usr/bin ]; then + cp -fpPR ${STAGE_TEMP}/usr/bin/* ${STAGING_DIR_HOST}/${layout_bindir} + fi + if [ -d ${STAGE_TEMP}/usr/sbin ]; then + cp -fpPR ${STAGE_TEMP}/usr/sbin/* ${STAGING_DIR_HOST}/${layout_bindir} + fi fi rm -rf ${STAGE_TEMP} } diff --git a/classes/native.bbclass b/classes/native.bbclass index aa1d4b6510..ec9ca6bef3 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -80,7 +80,7 @@ do_stage () { then oe_runmake install else - AUTOTOOLS_NATIVE_STAGE_BINARIES = "1" + export AUTOTOOLS_NATIVE_STAGE_BINARIES="1" autotools_stage_all fi fi