Makefile: silence errors from git

git commands are run during build of the module by DKMS when there is no
git repository, that error output look confusing.
This commit is contained in:
xaizek
2025-06-18 20:45:44 +03:00
parent e315b9db4a
commit 5ec66315eb

View File

@@ -2,8 +2,8 @@ obj-m += nct6687.o
curpwd := $(shell pwd)
kver ?= $(shell uname -r)
commitcount := $(shell git rev-list --all --count)
commithash := $(shell git rev-parse --short HEAD)
commitcount := $(shell git rev-list --all --count 2>/dev/null)
commithash := $(shell git rev-parse --short HEAD 2>/dev/null)
fedoraver := $(shell sed -n 's/.*Fedora release \([^ ]*\).*/\1/p' /etc/fedora-release 2>/dev/null || echo 0)