提交 ea79e516 编写于 作者: M Masahiro Yamada

kheaders: optimize header copy for in-tree builds

This script copies headers by the cpio command twice; first from
srctree, and then from objtree. However, when we building in-tree,
we know the srctree and the objtree are the same. That is, all the
headers copied by the first cpio are overwritten by the second one.

Skip the first cpio when we are building in-tree.
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 0e11773e
...@@ -56,14 +56,16 @@ fi ...@@ -56,14 +56,16 @@ fi
rm -rf $cpio_dir rm -rf $cpio_dir
mkdir $cpio_dir mkdir $cpio_dir
pushd $srctree > /dev/null if [ "$building_out_of_srctree" ]; then
for f in $dir_list; pushd $srctree > /dev/null
do find "$f" -name "*.h"; for f in $dir_list
done | cpio --quiet -pd $cpio_dir do find "$f" -name "*.h";
popd > /dev/null done | cpio --quiet -pd $cpio_dir
popd > /dev/null
fi
# The second CPIO can complain if files already exist which can # The second CPIO can complain if files already exist which can happen with out
# happen with out of tree builds. Just silence CPIO for now. # of tree builds having stale headers in srctree. Just silence CPIO for now.
for f in $dir_list; for f in $dir_list;
do find "$f" -name "*.h"; do find "$f" -name "*.h";
done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1 done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册