]> arthur.barton.de Git - netdata.git/blobdiff - web/Makefile.am
Fix location of git dir relative to build source
[netdata.git] / 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; \