properly detect version when building out of tree

This commit is contained in:
Nathan Schulte 2017-01-09 18:47:16 -06:00
parent 46fcb1188f
commit 9cb5df42d2
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ AX_EXTEND_SRCDIR
AS_IF([test -d ${srcdir}/.git], AS_IF([test -d ${srcdir}/.git],
[ [
VERSION="$(git describe --tags --abbrev=0)" VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)"
I3_VERSION="$(git describe --tags --always) ($(git log --pretty=format:%cd --date=short -n1), branch \\\"$(git describe --tags --always --all | sed s:heads/::)\\\")" I3_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} log --pretty=format:%cd --date=short -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")"
# Mirrors what libi3/is_debug_build.c does: # Mirrors what libi3/is_debug_build.c does:
is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no) is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no)
], ],