From 302e85908b537543549462ccdcf964d3dcb41a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Tue, 1 Nov 2022 16:14:39 -0400 Subject: [PATCH] build: fix JAMI_REVISION, JAMI_DIRTY_REPO Change-Id: I879224318b47c151db91a12c0260dea25e33553d --- globals.mk | 8 ++++---- src/buildinfo.cpp | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/globals.mk b/globals.mk index 27156f7348..2ac71f9848 100644 --- a/globals.mk +++ b/globals.mk @@ -2,8 +2,8 @@ src=$(abs_top_srcdir) -RING_DIRTY_REPO ?= $(shell git diff-index --quiet HEAD 2>/dev/null || echo dirty) -RING_REVISION ?= $(shell git log -1 --format="%h" --abbrev=10 2>/dev/null) +JAMI_DIRTY_REPO ?= $(shell git diff-index --quiet HEAD 2>/dev/null || echo dirty) +JAMI_REVISION ?= $(shell git log -1 --format="%h" --abbrev=10 2>/dev/null) JAMI_DATADIR ?= $(datadir)/jami # Preprocessor flags @@ -17,7 +17,7 @@ AM_CPPFLAGS += \ -DPREFIX=\"$(prefix)\" \ -DJAMI_DATADIR=\"$(JAMI_DATADIR)\" \ -DENABLE_TRACE \ - -LIBJAMI_REVISION=\"$(RING_REVISION)\" \ - -LIBJAMI_DIRTY_REPO=\"$(RING_DIRTY_REPO)\" \ + -DJAMI_REVISION=\"$(JAMI_REVISION)\" \ + -DJAMI_DIRTY_REPO=\"$(JAMI_DIRTY_REPO)\" \ -DPJSIP_MAX_PKT_LEN=8000 \ -DPJ_AUTOCONF=1 diff --git a/src/buildinfo.cpp b/src/buildinfo.cpp index f10eb8e1c3..4f4e4a04d9 100644 --- a/src/buildinfo.cpp +++ b/src/buildinfo.cpp @@ -27,12 +27,12 @@ #include <ciso646> // fix windows compiler bug -#ifndef RING_REVISION -#define RING_REVISION "" +#ifndef JAMI_REVISION +#define JAMI_REVISION "" #endif -#ifndef RING_DIRTY_REPO -#define RING_DIRTY_REPO "" +#ifndef JAMI_DIRTY_REPO +#define JAMI_DIRTY_REPO "" #endif #ifndef PACKAGE_VERSION @@ -44,9 +44,9 @@ namespace libjami { const char* version() noexcept { - return RING_REVISION[0] and RING_DIRTY_REPO[0] - ? PACKAGE_VERSION "-" RING_REVISION "-" RING_DIRTY_REPO - : (RING_REVISION[0] ? PACKAGE_VERSION "-" RING_REVISION : PACKAGE_VERSION); + return JAMI_REVISION[0] and JAMI_DIRTY_REPO[0] + ? PACKAGE_VERSION "-" JAMI_REVISION "-" JAMI_DIRTY_REPO + : (JAMI_REVISION[0] ? PACKAGE_VERSION "-" JAMI_REVISION : PACKAGE_VERSION); } const char* -- GitLab