genode/repos/base/src/core/version.inc
Norman Feske 4cfd954e1e Remove dependency from 'which' utility
Debian declared the 'which' utility as deprecated.

Fixes #4319
2021-11-29 15:10:52 +01:00

27 lines
614 B
Makefile

#
# Provide version information to main.cc
#
GENODE_ROOT_DIR = $(BASE_DIR)/../..
GENODE_VERSION := $(shell \
command -v git > /dev/null \
&& git -C $(GENODE_ROOT_DIR) describe --dirty=" <local changes>" 2> /dev/null \
&& exit 0 \
|| \
test -r $(GENODE_ROOT_DIR)/VERSION \
&& cat $(GENODE_ROOT_DIR)/VERSION \
&& exit 0 \
|| \
echo "<unknown version>")
CC_OPT_version += -DGENODE_VERSION="\"$(GENODE_VERSION)\""
SRC_CC += version.cc
vpath version.cc $(dir $(call select_from_repositories,src/core/version.cc))
version.o: force_version_compilation
force_version_compilation:
# vi: set ft=make :