From c2391797d634d6e99e3d243de9bf51a2be86f646 Mon Sep 17 00:00:00 2001 From: Francisco Ferreira Date: Fri, 15 Apr 2016 20:13:50 +0100 Subject: [PATCH] mk: allow git versions to be defined externally --- mk/environ.mk | 2 +- mk/px4_targets.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)\""