summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-04-03 19:44:06 +0200
committerLou Berger <lberger@labn.net>2018-04-03 19:47:20 +0200
commit1780ad33269c6d0be2a23eb8428cf7151c6a2cc5 (patch)
tree179dbefbbab1366e384c6ae1f65936218650e24c
parentMerge pull request #1894 from LabNConsulting/working/master/vtysh-not-enabled (diff)
downloadfrr-1780ad33269c6d0be2a23eb8428cf7151c6a2cc5.tar.xz
frr-1780ad33269c6d0be2a23eb8428cf7151c6a2cc5.zip
Makefile.am: add automatic defintion of VERSION_TYPE_(DEV_|RELEASE) CPP type
Signed-off-by: Lou Berger <lberger@labn.net>
-rw-r--r--Makefile.am3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 737b1acf6..e7d20be72 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 =