diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 8385555f9..737e33c21 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -1,24 +1,17 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions -D__STDC_FORMAT_MACROS #AM_CPPFLAGS = -fno-rtti -BUILT_SOURCES = git_version.h -git_version.h: +BUILT_SOURCES = version.h +version.h: + @rm -f $@; \ + echo '#define BUILT_DATE "'`date`'"' > $@ @if test -d $(top_srcdir)/.git ; then \ pushd $(top_srcdir) ; \ - GITDESCRIBE=$$(git describe --always --dirty || echo `date`) ; \ + GITDESCRIBE=$$(git describe --always --dirty || echo 'VCS failed') ; \ popd ; \ - echo "#define GITVERSION \"$${GITDESCRIBE}\" " > git_version.h.tmp ; \ - if diff -q git_version.h git_version.h.tmp >/dev/null 2>&1 ; then \ - rm -f git_version.h.tmp ; \ - else \ - rm -f git_version.h ; \ - mv git_version.h.tmp git_version.h ; \ - fi; \ - else \ - rm -f git_version.h; \ - echo '#define BUILT_DATE "'`date`'"' > git_version.h ; \ + echo '#define VCS "'$${GITDESCRIBE}'"' >> $@ ; \ fi -noinst_HEADERS = git_version.h -.PHONY: git_version.h +noinst_HEADERS = version.h +.PHONY: version.h SUBDIRS = bedit components widget diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index ad33f0d8e..57437c477 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -39,7 +39,7 @@ #include #include -#include "git_version.h" +#include "version.h" #define GIT_DESC "GIT Desc.:" #define GIT_REV "GIT Build:" #define LICENSEDIR DATADIR "/neutrino/license/"