mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
build: fix JAMI_REVISION, JAMI_DIRTY_REPO
Change-Id: I879224318b47c151db91a12c0260dea25e33553d
This commit is contained in:
@ -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
|
||||
|
@ -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*
|
||||
|
Reference in New Issue
Block a user