diff options
Diffstat (limited to 'drivers/edgetpu/Kbuild')
-rw-r--r-- | drivers/edgetpu/Kbuild | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/edgetpu/Kbuild b/drivers/edgetpu/Kbuild index 92554c6..1af2389 100644 --- a/drivers/edgetpu/Kbuild +++ b/drivers/edgetpu/Kbuild @@ -3,15 +3,15 @@ # Use the absolute path of this Makefile to get the source directory. CURRENT_DIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) GIT_PATH=$(CURRENT_DIR)/../../ +GIT_BIN=/usr/bin/git +GIT=$(GIT_BIN) -C $(GIT_PATH) ccflags-y += $(EXTRA_CFLAGS) -DCONFIG_EDGETPU_TELEMETRY_TRACE=1 -DCONFIG_GCIP=1 \ -I$(CURRENT_DIR)/include \ -I$(CURRENT_DIR)/gcip-kernel-driver/include -ifeq ($(shell git -C $(GIT_PATH) rev-parse --is-inside-work-tree),true) - GIT_REPO_STATE=$(shell (git -C $(GIT_PATH) status --porcelain | grep -q .) && echo -dirty) - ccflags-y += -DGIT_REPO_TAG=\"$(shell git -C $(GIT_PATH) rev-parse --short HEAD)$(GIT_REPO_STATE)\" -else - ccflags-y += -DGIT_REPO_TAG=\"Not\ a\ git\ repository\" +ifeq ($(shell $(GIT) rev-parse --is-inside-work-tree),true) + GIT_REPO_STATE=$(shell ($(GIT) status --porcelain | grep -q .) && echo -dirty) + ccflags-y += -DGIT_REPO_TAG=\"$(shell $(GIT) rev-parse --short HEAD)$(GIT_REPO_STATE)\" endif obj-$(CONFIG_RIO) += rio.o |