compat: fix get-compat-kernels for libc issue again
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 16 Nov 2012 05:06:22 +0000 (21:06 -0800)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 16 Nov 2012 05:06:22 +0000 (21:06 -0800)
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 <mcgrof@do-not-panic.com>
bin/get-compat-kernels

index fa09e6e28c04b8732dcc07e651c8720c10869900..ab9f4669bc044ea07a8c06afa69625b890322873 100755 (executable)
@@ -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
 }