From e23024ccfff661ad5aee7c122a1833a103fbb971 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 10 Oct 2022 10:35:47 +0200 Subject: 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 --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') 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 +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 \ -- cgit v1.2.3