mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- version-header: generalize (add built_date and vcs string)
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -39,7 +39,7 @@
|
||||
#include <daemonc/remotecontrol.h>
|
||||
#include <system/flashtool.h>
|
||||
|
||||
#include "git_version.h"
|
||||
#include "version.h"
|
||||
#define GIT_DESC "GIT Desc.:"
|
||||
#define GIT_REV "GIT Build:"
|
||||
#define LICENSEDIR DATADIR "/neutrino/license/"
|
||||
|
Reference in New Issue
Block a user