Make sure to include the builddir include directory to find thegenerated vgversion.h. Make include/vgversion.h a .PHONY targetso it always gets regenerated even if the file is already there.Make sure to run svnversion in the srcdir.

if [ -f include/vgversion.h ]then# There is already a vgversion.h.# Update it only if we found a different and real svn version- if grep unknown include/vgversion.h.tmp ||+ if grep -q unknown include/vgversion.h.tmp ||cmp -s include/vgversion.h include/vgversion.h.tmpthenrm include/vgversion.h.tmp