Merge pull request #2628 from nmschulte/fix_build_outside_repo
Fix build outside repo
This commit is contained in:
commit
d4066a6c60
|
@ -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)
|
||||||
],
|
],
|
||||||
|
@ -154,8 +154,9 @@ else
|
||||||
print_BUILD_MANS=no
|
print_BUILD_MANS=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git_dir=`git rev-parse --git-dir 2>/dev/null`
|
in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null`
|
||||||
if test -n "$git_dir"; then
|
if "$in_git_worktree" == "true"; then
|
||||||
|
git_dir=`git rev-parse --git-dir 2>/dev/null`
|
||||||
srcdir=`dirname "$git_dir"`
|
srcdir=`dirname "$git_dir"`
|
||||||
exclude_dir=`pwd | sed "s,^$srcdir,,g"`
|
exclude_dir=`pwd | sed "s,^$srcdir,,g"`
|
||||||
if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then
|
if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then
|
||||||
|
|
Loading…
Reference in New Issue