aboutgitcodebugslistschat
path: root/Makefile
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-10-10 10:35:47 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-10-15 02:10:28 +0200
commite23024ccfff661ad5aee7c122a1833a103fbb971 (patch)
tree141f6d4bdb54532dc469bab272a2c945e12612c9 /Makefile
parent2074b332f9c6d533c7adb46491b3a4b7461cc110 (diff)
downloadpasst-e23024ccfff661ad5aee7c122a1833a103fbb971.tar
passt-e23024ccfff661ad5aee7c122a1833a103fbb971.tar.gz
passt-e23024ccfff661ad5aee7c122a1833a103fbb971.tar.bz2
passt-e23024ccfff661ad5aee7c122a1833a103fbb971.tar.lz
passt-e23024ccfff661ad5aee7c122a1833a103fbb971.tar.xz
passt-e23024ccfff661ad5aee7c122a1833a103fbb971.tar.zst
passt-e23024ccfff661ad5aee7c122a1833a103fbb971.zip
conf, log, Makefile: Add versioning information
Add a --version option displaying that, and also include this information in the log files. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e4c64fe..6b22408 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,8 @@
# Copyright (c) 2021 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
+VERSION ?= $(shell git describe --tags HEAD 2>/dev/null || echo "unknown\ version")
+
RLIMIT_STACK_VAL := $(shell /bin/sh -c 'ulimit -s')
ifeq ($(RLIMIT_STACK_VAL),unlimited)
RLIMIT_STACK_VAL := 1024
@@ -31,6 +33,7 @@ FLAGS += -DNETNS_RUN_DIR=\"/run/netns\"
FLAGS += -DPASST_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)
FLAGS += -DRLIMIT_STACK_VAL=$(RLIMIT_STACK_VAL)
FLAGS += -DARCH=\"$(TARGET_ARCH)\"
+FLAGS += -DVERSION=\"$(VERSION)\"
PASST_SRCS = arch.c arp.c checksum.c conf.c dhcp.c dhcpv6.c icmp.c igmp.c \
isolation.c lineread.c log.c mld.c ndp.c netlink.c packet.c passt.c \