From 91d7e4af9bc3fd71fea62d718bbe82c95f922eba Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 1 Jun 2013 09:44:45 +0200 Subject: [PATCH] version-header: generalize (add built_date and vcs string) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5c0a692f13516ba622414846e93f7ec9f98603cb Author: vanhofen Date: 2013-06-01 (Sat, 01 Jun 2013) Origin message was: ------------------ - version-header: generalize (add built_date and vcs string) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/Makefile.am | 23 ++++++++--------------- src/gui/imageinfo.cpp | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) 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/"