diff options
author | wsnipex <wsnipex@a1.net> | 2012-12-09 14:37:21 +0100 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2013-02-02 10:46:27 +0100 |
commit | 1704ff69ba704bf53505f7f9ac51ec06f93401ee (patch) | |
tree | e4f742cd8239df9711a065f18c6e811497446d69 /configure.in | |
parent | 12719edc1c6e40595bc8c053b82b427480dc1d8e (diff) |
configure: allow GIT_REV to be read from VERSION file
needed for building outside of a git repo
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.in b/configure.in index d8c7804d98..ac1445c184 100644 --- a/configure.in +++ b/configure.in @@ -2160,7 +2160,12 @@ if test "$HAVE_GIT" = "yes"; then GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}') fi if test "$GIT_REV" = ""; then - GIT_REV="Unknown" + if test -f VERSION ; then + GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION) + if test -z $GIT_REV ; then GIT_REV="Unknown" ; fi + else + GIT_REV="Unknown" + fi fi if test "$host_vendor" = "apple"; then echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h |