grab the git hash and inject it into every log file header

This commit is contained in:
tstellanova
2013-09-06 10:18:08 -07:00
parent 3d821b8131
commit 23a355644b
3 changed files with 38 additions and 0 deletions

View File

@@ -39,6 +39,17 @@
export PX4_BASE := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))/
include $(PX4_BASE)makefiles/setup.mk
#
# Get a version string provided by git
# This assumes that git command is available and that
# the directory holding this file also contains .git directory
#
GIT_DESC := $(shell git log -1 --pretty=format:%H)
ifneq ($(words $(GIT_DESC)),1)
GIT_DESC := "unknown_git_version"
endif
export GIT_DESC
#
# Canned firmware configurations that we (know how to) build.
#