]> arthur.barton.de Git - netdata.git/commitdiff
Fix location of git dir relative to build source
authorPhilip Whineray <phil@firehol.org>
Wed, 6 Apr 2016 22:36:44 +0000 (23:36 +0100)
committerPhilip Whineray <phil@firehol.org>
Wed, 6 Apr 2016 22:36:44 +0000 (23:36 +0100)
Should resolve issue with out-of-tree builds using git repo

web/Makefile.am

index f0e5bd9c9ab29edc03044b2fdf5df9a68d70f11b..387119598ddefc5a5af8edfdab21c691a3c608ed 100644 (file)
@@ -91,9 +91,9 @@ dist_webimages_DATA = \
         $(NULL)
 
 version.txt:
-       if test -d ../.git; then \
-               if git log -n 1 > v.tmp; then \
-                       grep ^commit\  v.tmp | cut -d " " -f2 > version.txt; \
+       if test -d "$(top_srcdir)/.git"; then \
+               if git --git-dir="$(top_srcdir)/.git" log -n 1 > v.tmp; then \
+                       grep ^commit\  v.tmp | cut -d" " -f2 > version.txt; \
                        rm -f v.tmp; \
                else \
                        rm -f v.tmp; \