kernel.bbclass: prevent self-referential asm links in kernel.bbclass
authorJohn Bowler <jbowler@nslu2-linux.org>
Fri, 30 Dec 2005 22:58:30 +0000 (22:58 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Fri, 30 Dec 2005 22:58:30 +0000 (22:58 +0000)
 - ln -sf asm-<arch> .../include/asm works fine first time, but
 - second time round it creates a link in asm to asm-<arch>
 - called asm-<arch>, this breaks the klibc build

classes/kernel.bbclass

index 8416b8a..ea99ec5 100644 (file)
@@ -83,6 +83,7 @@ kernel_do_stage() {
 
        mkdir -p ${STAGING_KERNEL_DIR}/include/$ASMDIR
        cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
+       rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
        ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
 
        mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic