mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
mk: allow git versions to be defined externally
This commit is contained in:
parent
056145df92
commit
c2391797d6
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
SYSTYPE := $(shell uname)
|
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)\""
|
EXTRAFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
|
||||||
|
|
||||||
# Add missing parts from libc and libstdc++ for all boards
|
# Add missing parts from libc and libstdc++ for all boards
|
||||||
|
@ -33,8 +33,8 @@ ifneq ($(wildcard $(SKETCHBOOK)/../uavcan),)
|
|||||||
$(warning *** You have an old uavcan tree - see http://dev.ardupilot.com/wiki/git-submodules/)
|
$(warning *** You have an old uavcan tree - see http://dev.ardupilot.com/wiki/git-submodules/)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NUTTX_GIT_VERSION := $(shell cd $(NUTTX_SRC) && 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)
|
PX4_GIT_VERSION ?= $(shell cd $(PX4_ROOT) && git rev-parse HEAD | cut -c1-8)
|
||||||
|
|
||||||
EXTRAFLAGS += -DNUTTX_GIT_VERSION="\"$(NUTTX_GIT_VERSION)\""
|
EXTRAFLAGS += -DNUTTX_GIT_VERSION="\"$(NUTTX_GIT_VERSION)\""
|
||||||
EXTRAFLAGS += -DPX4_GIT_VERSION="\"$(PX4_GIT_VERSION)\""
|
EXTRAFLAGS += -DPX4_GIT_VERSION="\"$(PX4_GIT_VERSION)\""
|
||||||
|
Loading…
Reference in New Issue
Block a user