From f19867e784425073f26c6e1a0c205b307e386504 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 3 Mar 2020 21:22:34 +0100 Subject: [PATCH] make config: add package defines for better git sync and build date Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a07209e911949dea4f9c2d1427f64cbe84cc59ef Author: Thilo Graf Date: 2020-03-03 (Tue, 03 Mar 2020) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- configure.ac | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 87a108959..fb1210edf 100644 --- a/configure.ac +++ b/configure.ac @@ -8,16 +8,32 @@ define(ver_micro, m4_esyscmd([ GITREV=$(git rev-list $GITTAG..HEAD --count); printf "$GITREV" ])) + +# sync with current git +define(ver_git, m4_esyscmd([ + GITBRANCH=$(git rev-parse --abbrev-ref HEAD); + GITDESCRIBE=$(git describe --always --tags --dirty); + printf "$GITDESCRIBE $GITBRANCH" +])) + +define(ver_date, m4_esyscmd([ + BUILTDATE=$(date); + printf "$BUILTDATE" +])) + define(rel_cycle, "ver_major.0") AC_INIT([neutrino],[ver_major.ver_minor.ver_micro],[https://www.neutrino-images.de]) AM_INIT_AUTOMAKE([nostdinc foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) +AC_DEFINE(PACKAGE_RELEASE_CYCLE, rel_cycle, [Release cycle information; used in update code; only relevant for flash image releases ]) + AC_DEFINE(PACKAGE_VERSION_MAJOR, ver_major, [Major version number]) AC_DEFINE(PACKAGE_VERSION_MINOR, ver_minor, [Minor version number]) AC_DEFINE(PACKAGE_VERSION_MICRO, ver_micro, [Micro version number]) -AC_DEFINE(PACKAGE_RELEASE_CYCLE, rel_cycle, [Release cycle information; used in update code; only relevant for flash image releases ]) +AC_DEFINE(PACKAGE_VERSION_GIT, "ver_git", [internal vcs version info]) +AC_DEFINE(PACKAGE_VERSION_DATE, "ver_date", [internal built date]) TUXBOX_APPS TUXBOX_APPS_DIRECTORY