错误:
[ 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"