From: Luis R. Rodriguez Date: Fri, 16 Nov 2012 05:06:22 +0000 (-0800) Subject: compat: fix get-compat-kernels for libc issue again X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d9b6a4c9e9c75e8b64e0de57ddb4bbad5aa230b9;p=openwrt%2Fstaging%2Fblogic.git compat: fix get-compat-kernels for libc issue again It turns out the right approach is to make clean and then to be sure (as in some kernels it fails if run only once) run twice make. Signed-off-by: Luis R. Rodriguez --- diff --git a/bin/get-compat-kernels b/bin/get-compat-kernels index fa09e6e28c04..ab9f4669bc04 100755 --- a/bin/get-compat-kernels +++ b/bin/get-compat-kernels @@ -167,16 +167,15 @@ function rebuild_header_binary_deps() { for kernel in $(ls -d ${KSRC_PREFIX}/lib/modules/*generic | tail -3); do echo $kernel - for i in mod basic genksyms; do - make -C ${kernel}/build/ M=scripts/${i}/ clean > /dev/null 2>&1 - done - - for i in mod basic genksyms; do - make -C ${kernel}/build/ M=scripts/${i}/ > /dev/null 2>&1 - done - - for i in mod basic genksyms; do - make -C ${kernel}/build/ M=scripts/${i}/ > /dev/null 2>&1 + count=0 + while [[ $count -ne 3 ]]; do + for i in basic mod genksyms; do + if [[ $count -eq 0 ]]; then + make -C ${kernel}/build/ M=scripts/${i}/ clean > /dev/null 2>&1 + fi + make -C ${kernel}/build/ M=scripts/${i}/ > /dev/null 2>&1 + done + let count=$count+1 done done }