u-boot源码怎么样根据编译时候访问的文件来删除无关的源码?
网上看到一个脚本
#!/bin/bash
set -e
set -o pipefail
git ls-tree -r HEAD --name-only |tee mark| xargs touch
touch mark
echo 'echo -00122-g512f9aa; exit 0' > ./tools/setlocalversion
(cd $(lookup-file .repo/..); . build/envsetup.sh; cd boot; BUILD_UBOOT_OBM=true; set -x; . ../.buildenv.sh; cd uboot; time make -j8 ${1:-kunlun_ff_config}; time make -j8 -k) 2>&1 | tee ~/1.txt
find . -type f -anewer mark -print -o -type l -print | perl -npe 's!^\./!!' > newer
file-arg1-arg2 mark newer | pn 1 | xargs git rm -f
应该是稍微修改一下make方式,会根据make时候访问的文件来删除其余多余的源码的,不过我的linux里面touch不支持这种方式,不知道哪位大仙有更好的办法。
脚本是http://baohaojun.github.io/remove-unneeded-files-for-code-reading.html这里看到的,里面还有内核的筛选删除脚本,暂时还没用到,请问哪位大牛有这方面经验的。