summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/Makefile
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-09-14 09:25:05 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-09-21 10:37:52 +0200
commit80dfeb5c734cc4d681f467e853a541a8a91fe1cf (patch)
tree881818122e62f24ed58a81ee41dd3d23bd04e981 /VNFs/DPPD-PROX/Makefile
parent9a1e1e9336b39178362c6ccadd4a9716f865047f (diff)
Add git version.
git version is now printed in prox.log file. - git_version.c is always recompiled - If source have been locally changed, the build is shown as dirty - If git is not available on the build system, a message such as 'make: git: Command not found' will be printed, but the build will succeed. Change-Id: If551832c6079f5e3bd04cd4d8ac5f8204e6be8cd Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/Makefile')
-rw-r--r--VNFs/DPPD-PROX/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/Makefile b/VNFs/DPPD-PROX/Makefile
index ff75c178..60cea67f 100644
--- a/VNFs/DPPD-PROX/Makefile
+++ b/VNFs/DPPD-PROX/Makefile
@@ -214,12 +214,15 @@ SRCS-y += stats_latency.c stats_global.c stats_core.c stats_task.c stats_prio.c
SRCS-y += cmd_parser.c input.c prox_shared.c prox_lua_types.c
SRCS-y += genl4_bundle.c heap.c genl4_stream_tcp.c genl4_stream_udp.c cdf.c
SRCS-y += stats.c stats_cons_log.c stats_cons_cli.c stats_parser.c hash_set.c prox_lua.c prox_malloc.c prox_ipv6.c prox_compat.c
+SRCS-y += git_version.c
+
+GIT_VERSION := "$(shell git describe --abbrev=8 --dirty --always)"
ifeq ($(FIRST_PROX_MAKE),)
MAKEFLAGS += --no-print-directory
FIRST_PROX_MAKE = 1
export FIRST_PROX_MAKE
-all: libedit_autoconf.h
+all: libedit_autoconf.h git_version.c
@./helper-scripts/trailing.sh
@$(MAKE) $@
clean:
@@ -246,6 +249,12 @@ libedit_autoconf.h: $(AUTO-CONFIG-SCRIPT)
> /dev/null
# auto-conf adds empty line at the end of the file, considered as error by trailing.sh script
$(Q) sed -i '$$ d' '$@'
+
+git_version.c: force
+ @echo 'const char *git_version=$(GIT_VERSION);' | cmp -s - $@ || echo 'const char *git_version=$(GIT_VERSION);' > $@
+ @echo $@
+force:
+
else
include $(RTE_SDK)/mk/rte.extapp.mk
endif