7 GVF=${OUTPUT}PERF-VERSION-FILE
13 # First see if there is a version file (included in release tarballs),
14 # then try git-describe, then default.
17 VN=$(cat version) || VN="$DEF_VER"
18 elif test -d .git -o -f .git &&
19 VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
23 git update-index -q --refresh
24 test -z "$(git diff-index --name-only HEAD --)" ||
28 VN=$(echo "$VN" | sed -e 's/-/./g');
33 VN=$(expr "$VN" : v*'\(.*\)')
37 VC=$(sed -e 's/^PERF_VERSION = //' <$GVF)
41 test "$VN" = "$VC" || {
42 echo >&2 "PERF_VERSION = $VN"
43 echo "PERF_VERSION = $VN" >$GVF