include ../.config/config.mk
-COMM_TAG := $(shell git rev-list --abbrev-commit --tags --max-count=1)
+COMM_TAG := $(shell git rev-list --abbrev-commit --tags --max-count=1 2>/dev/null || true)
+#COMM_TAG := $(shell git rev-list --abbrev-commit --tags --max-count=1)
# Keep non-fatal behavior without relying on /dev/null permissions.
-TAG := $(shell git describe --abbrev=0 --tags ${COMM_TAG} || true)
+TAG := $(if $(COMM_TAG),$(shell git describe --abbrev=0 --tags $(COMM_TAG) 2>/dev/null || true),)
+#TAG := $(shell git describe --abbrev=0 --tags ${COMM_TAG} || true)
# here we strip the version prefix
TAG_VERS :=$(TAG:v%=%)
# get the latest commit hash in the short form