本文主要是介绍MTK Android7.1 未编译使用git添加版本控制后external/iw/version.sh报错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
错误:
[ 0% 53/18907] build out/target/product/angler/gen/EXECUTABLES/iw_intermediates/version.c
FAILED: /bin/bash -c "external/iw/version.sh out/target/product/angler/gen/EXECUTABLES/iw_intermediates/version.c"
fatal: 没有发现名称,无法描述任何东西。
[ 0% 53/18907] target C++: libart <= art/runtime/interpreter/interpreter_switch_impl.cc
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] 错误 1
#### make failed to build some targets (29 seconds) ####
解决:
vi external/iw/version.sh
为了让这个脚本不走[ -d .git ]分支改成如下:
#!/bin/sh
VERSION="4.1"
OUT="$1"
#if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null` && [$VERSION != "4.1"]; then
git update-index --refresh --unmerged > /dev/null
descr=$(git describe --match=v*)
# on git builds check that the version number above
# is correct...
[ "${descr%%-*}" = "v$VERSION" ] || exit 2
v="${descr#v}"
if git diff-index --name-only HEAD | read dummy ; then
v="$v"-dirty
fi
else
v="$VERSION"
fi
echo '#include "iw.h"' > "$OUT"
echo "const char iw_version[] = \"$v\";" >> "$OUT"
这篇关于MTK Android7.1 未编译使用git添加版本控制后external/iw/version.sh报错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!