diff --git a/mk/environ.mk b/mk/environ.mk index 18a9ca9767..bb4cbd6a59 100644 --- a/mk/environ.mk +++ b/mk/environ.mk @@ -4,7 +4,7 @@ # SYSTYPE := $(shell uname) -GIT_VERSION := $(shell git rev-parse HEAD | cut -c1-8) +GIT_VERSION ?= $(shell git rev-parse HEAD | cut -c1-8) EXTRAFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\"" # Add missing parts from libc and libstdc++ for all boards diff --git a/mk/px4_targets.mk b/mk/px4_targets.mk index 112dc92ef6..fe6c270c1a 100644 --- a/mk/px4_targets.mk +++ b/mk/px4_targets.mk @@ -33,8 +33,8 @@ ifneq ($(wildcard $(SKETCHBOOK)/../uavcan),) $(warning *** You have an old uavcan tree - see http://dev.ardupilot.com/wiki/git-submodules/) endif -NUTTX_GIT_VERSION := $(shell cd $(NUTTX_SRC) && git rev-parse HEAD | cut -c1-8) -PX4_GIT_VERSION := $(shell cd $(PX4_ROOT) && git rev-parse HEAD | cut -c1-8) +NUTTX_GIT_VERSION ?= $(shell cd $(NUTTX_SRC) && git rev-parse HEAD | cut -c1-8) +PX4_GIT_VERSION ?= $(shell cd $(PX4_ROOT) && git rev-parse HEAD | cut -c1-8) EXTRAFLAGS += -DNUTTX_GIT_VERSION="\"$(NUTTX_GIT_VERSION)\"" EXTRAFLAGS += -DPX4_GIT_VERSION="\"$(PX4_GIT_VERSION)\""