forked from e16/e16
1
0
Fork 0

Include git stamp in version info (if built from git checkout)

This commit is contained in:
Kim Woelders 2018-03-03 19:25:53 +01:00
parent faf6393a8b
commit 257d8e6117
3 changed files with 15 additions and 2 deletions

View File

@ -5,6 +5,7 @@ ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = aclocal.m4 config.* compile configure depcomp \
install-sh ltmain.sh missing mkinstalldirs \
Makefile.in */Makefile.in */*/Makefile.in \
version.h \
ABOUT-NLS \
po/Makefile.in.in po/Makevars.template po/Rules-quot \
po/*.header po/*.sed po/*.sin po/e16.pot \
@ -12,10 +13,12 @@ MAINTAINERCLEANFILES = aclocal.m4 config.* compile configure depcomp \
CLEANFILES = $(PACKAGE).spec
BUILT_SOURCES = version.h
SUBDIRS = dox eesh epp src lib config themes fonts scripts misc docs icons pix po
EXTRA_DIST = \
$(PACKAGE).spec.in \
$(PACKAGE).spec.in version.h \
sample-scripts/bouncingball.pl \
sample-scripts/lcdmover.sh \
sample-scripts/testroller.pl \
@ -24,8 +27,16 @@ sample-scripts/place-pagers.pl \
AUTHORS COMPLIANCE COPYING ChangeLog
if SRC_IS_GIT
version.h: FORCE
@echo '#define E16_VERSION "'`git describe --dirty`'"' > $@.tmp
@if cmp -s $@.tmp $@; then rm $@.tmp; else mv $@.tmp $@; fi
RPM_RELEASE=`echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
else
version.h:
@echo '#define E16_VERSION "@VERSION@"' > $@.tmp
@if cmp -s $@.tmp $@; then rm $@.tmp; else mv $@.tmp $@; fi
RPM_RELEASE=1
endif

View File

@ -132,6 +132,7 @@ AM_CPPFLAGS = \
e16_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
$(MODULE_CFLAGS) \
$(IMLIB2_CFLAGS) \

View File

@ -44,10 +44,11 @@
#include "session.h"
#include "snaps.h"
#include "user.h"
#include "version.h"
#include "xwin.h"
const char e_wm_name[] = "e16";
const char e_wm_version[] = VERSION;
const char e_wm_version[] = E16_VERSION;
EConf Conf;
EMode Mode;