From 4e6f2dc5f7afdecc30a02b3dfcfa3aeecf506e8e Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 18 Sep 2018 13:20:05 -0400 Subject: [PATCH] silence build warnings when no git is present Change-Id: I387f5db9d7174c63af716d082fb5397e685da19d --- kernel-module/Makefile | 4 ++-- lib/lib.Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel-module/Makefile b/kernel-module/Makefile index 8a69d17c0..ef93bc80f 100644 --- a/kernel-module/Makefile +++ b/kernel-module/Makefile @@ -9,12 +9,12 @@ ifeq ($(RTPENGINE_VERSION),) ifneq ($(DPKG_PRSCHNGLG),) DPKG_PRSCHNGLG=$(shell dpkg-parsechangelog -l$(DEB_CHANGELOG) | awk '/^Version: / {print $$2}') endif - GIT_BR_COMMIT=git-$(shell cd $(M) && git rev-parse --abbrev-ref --symbolic-full-name HEAD)-$(shell cd $(M) && git rev-parse --short HEAD) + GIT_BR_COMMIT=git-$(shell cd $(M) && git rev-parse --abbrev-ref --symbolic-full-name HEAD 2> /dev/null)-$(shell cd $(M) && git rev-parse --short HEAD 2> /dev/null) ifneq ($(DPKG_PRSCHNGLG),) RTPENGINE_VERSION+=$(DPKG_PRSCHNGLG) endif - ifneq ($(GIT_BR_COMMIT),) + ifneq ($(GIT_BR_COMMIT),git--) RTPENGINE_VERSION+=$(GIT_BR_COMMIT) endif diff --git a/lib/lib.Makefile b/lib/lib.Makefile index 728a11aeb..2d9b8d883 100644 --- a/lib/lib.Makefile +++ b/lib/lib.Makefile @@ -10,12 +10,12 @@ ifeq ($(RTPENGINE_VERSION),) ifneq ($(DPKG_PRSCHNGLG),) DPKG_PRSCHNGLG=$(shell dpkg-parsechangelog -l$(RTPENGINE_ROOT_DIR)/debian/changelog | awk '/^Version: / {print $$2}') endif - GIT_BR_COMMIT=git-$(shell git rev-parse --abbrev-ref --symbolic-full-name HEAD)-$(shell git rev-parse --short HEAD) + GIT_BR_COMMIT=git-$(shell git rev-parse --abbrev-ref --symbolic-full-name HEAD 2> /dev/null)-$(shell git rev-parse --short HEAD 2> /dev/null) ifneq ($(DPKG_PRSCHNGLG),) RTPENGINE_VERSION+=$(DPKG_PRSCHNGLG) endif - ifneq ($(GIT_BR_COMMIT),) + ifneq ($(GIT_BR_COMMIT),git--) RTPENGINE_VERSION+=$(GIT_BR_COMMIT) endif