mk: allow git versions to be defined externally

This commit is contained in:
Francisco Ferreira 2016-04-15 20:13:50 +01:00 committed by Lucas De Marchi
parent 056145df92
commit c2391797d6
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)\""