diff mbox series

[v2,4/4] Makefile: Set a proper DRIVER_NAME when building from a git tree

Message ID 1532004387-3123-5-git-send-email-thuth@redhat.com
State Accepted
Headers show
Series Clean-ups and fixes for the build_romfs tool | expand

Commit Message

Thomas Huth July 19, 2018, 12:46 p.m. UTC
The DRIVER_NAME environment variable is not set up correctly for the
build_romfs tool in case we build from a git tree, so the field in the
rom header did not contain much useful data. Let's use the revision
string from git as DRIVER_NAME in this case.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 Makefile.gen | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/Makefile.gen b/Makefile.gen
index 2fdf23f..f18c57a 100644
--- a/Makefile.gen
+++ b/Makefile.gen
@@ -23,6 +23,7 @@  export DRIVER_NAME=$(shell cat ../VERSION | sed -e "s/-/./g" | awk -F . '{ print
 else
 ifneq (,$(wildcard ../.git))
 RELEASE=git-$(shell git rev-parse --short=16 HEAD)
+export DRIVER_NAME=git-$(shell git rev-parse --short=12 HEAD)
 else
 ifneq (,$(shell cat ../VERSION))
 RELEASE="$(USER)@$(HOSTNAME) release $(shell cat ../VERSION)"