Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

configure: allow GIT_REV to be read from VERSION file

needed for building outside of a git repo
  • Loading branch information...
commit 1704ff69ba704bf53505f7f9ac51ec06f93401ee 1 parent 12719ed
@wsnipex authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 configure.in
View
7 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
Please sign in to comment.
Something went wrong with that request. Please try again.