From 1780ad33269c6d0be2a23eb8428cf7151c6a2cc5 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 3 Apr 2018 13:44:06 -0400 Subject: [PATCH] Makefile.am: add automatic defintion of VERSION_TYPE_(DEV_|RELEASE) CPP type Signed-off-by: Lou Berger --- Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 737b1acf64..e7d20be72a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,8 @@ include common.am AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \ -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib AM_CFLAGS = $(WERROR) -DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE) +VERSION_TYPE := $(shell if echo $(VERSION) | grep -q dev; then echo DEV ; else echo RELEASE ; fi) +DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE) -DVERSION_TYPE_$(VERSION_TYPE) LIBCAP = @LIBCAP@ EXTRA_DIST = -- 2.39.5