编译openwrt时经常因为各种因素导致package编译失败,默认编译make V=99会打印所有输出,并且遇到package编译失败会中断整个编译过程,非常令人恼火。。。其实只要加上IGNORE_ERRORS=1 的选项进行编译就不会出现这样的问题了,另外网上找到了一个脚本,可以更直观的发现编译错误,最多编译完成后再手动调整编译package咯,节省很多时间。。。
转载自:
https://lists.openwrt.org/pipermail/openwrt-devel/2009-June/004411.html

//.ichael

------------8<---------------
if [ "$1" != "-f" ] ; then
        IGNORE_ERRORS=1 make 2>&1| tee errors.txt

        rm build_*.txt
fi

for i in $(grep "failed to build" errors.txt | sed 's/^.*ERROR:[[:space:]]*\([^[:space:]].*\) failed to build.*$/\1/' ) ; do
        if [ "$i" != "" ] ; then
                echo Compiling: ${i}
                make ${i}-compile V=99 > build_${i##*/}.txt 2>&1 || echo ${i} : Build failed, see build_${i##*/}.txt
        fi
done