-## Make sure version.c is always rebuilt with the latest git information
-.PHONY: ${srcdir}/version.c version_git.h
-version_git.h:
- echo >$@
- -(cd $(srcdir) && git describe) && echo '#define GIT_DESCRIPTION "'`(cd $(srcdir) && git describe) | sed 's/release-//'`'"' >$@
+.PHONY: version-stamp
+version-stamp:
+
+version_git.h: version-stamp
+ $(AM_V_GEN)echo >$@
+ @-(cd $(srcdir) && git describe 2>/dev/null >/dev/null) && echo '#define GIT_DESCRIPTION "'`(cd $(srcdir) && git describe) | sed 's/release-//'`'"' >$@ ||: