7 GVF
=${OUTPUT}PERF-VERSION-FILE
13 # First check if there is a .git to get the version from git describe
14 # otherwise try to get the version from the kernel Makefile
16 if test -d ..
/..
/.git
-o -f ..
/..
/.git
&&
17 VN
=$
(git tag
2>/dev
/null |
tail -1 |
grep -E "v[0-9].[0-9]*")
19 VN
=$
(echo $VN"-g"$
(git log
-1 --abbrev=4 --pretty=format
:"%h" HEAD
))
20 VN
=$
(echo "$VN" |
sed -e 's/-/./g');
22 VN
=$
(MAKEFLAGS
= make -sC ..
/.. kernelversion
)
25 VN
=$
(expr "$VN" : v
*'\(.*\)')
29 VC
=$
(sed -e 's/^PERF_VERSION = //' <$GVF)
33 test "$VN" = "$VC" ||
{
34 echo >&2 "PERF_VERSION = $VN"
35 echo "PERF_VERSION = $VN" >$GVF