commit ac922e7d7785133d14cae18792433c72e1bab334
Author: Jakub Kaszycki <jakub@kaszycki.net.pl>
Date:   Sat Aug 26 18:18:24 2017 +0200

    .version is now stored in builddir (it is possible to run with read-only srcdir)

diff --git a/Makefile.am b/Makefile.am
index 1e6fd4ead..37ef6955b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,19 +54,19 @@ coverage-report: coverage
 
 all: version.h
 
-version.h: $(top_srcdir)/.version
+version.h: .version
 	echo '#define BUILD_VERSION "'`cat $(top_srcdir)/.version`'"' > $@-t && mv $@-t $@
 
-BUILT_SOURCES = $(top_srcdir)/.version
-$(top_srcdir)/.version: gen-version
+BUILT_SOURCES = .version
+.version: gen-version
 	@true
 .PHONY: gen-version
 gen-version:
 	@V=`cd $(top_srcdir) && ./build-aux/git-version-gen .tarball-version` &&			\
-	if [ -e $(top_srcdir)/.version ] && [ "x`cat $(top_srcdir)/.version`" = "x$$V" ]; then		\
+	if [ -e .version ] && [ "x`cat .version`" = "x$$V" ]; then		\
 	  true;												\
 	else												\
-	  echo "$$V" > $(top_srcdir)/.version;								\
+	  echo "$$V" > .version;								\
 	fi
 dist-hook: gen-ChangeLog
 	echo $(VERSION) > $(distdir)/.tarball-version
