Commit f569932b authored by Pat Riehecky's avatar Pat Riehecky Committed by Alessandro Rubini

Allow override of GIT_VERSION, but preserve existing behavior

parent 1b419aa2
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
REPO_PARENT=$(shell /bin/pwd)/.. REPO_PARENT=$(shell /bin/pwd)/..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
# export git tree for subdirs
GIT_VERSION ?= $(shell git describe --dirty --long --tags)
export GIT_VERSION
# by default use the fmc-bus within the repository # by default use the fmc-bus within the repository
FMC_BUS ?= fmc-bus FMC_BUS ?= fmc-bus
# FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild # FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild
......
...@@ -10,7 +10,7 @@ FMC_BUS ?= ../fmc-bus/ ...@@ -10,7 +10,7 @@ FMC_BUS ?= ../fmc-bus/
# FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild # FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild
FMC_BUS_ABS ?= $(abspath $(FMC_BUS) ) FMC_BUS_ABS ?= $(abspath $(FMC_BUS) )
GIT_VERSION = $(shell git describe --dirty --long --tags) GIT_VERSION ?= $(shell git describe --dirty --long --tags)
export GIT_VERSION export GIT_VERSION
FMC_BUS_VERSION ?= $(shell cd $(FMC_BUS_ABS); git describe --always --dirty --long --tags) FMC_BUS_VERSION ?= $(shell cd $(FMC_BUS_ABS); git describe --always --dirty --long --tags)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
REPO_PARENT=../.. REPO_PARENT=../..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
GIT_VERSION := $(shell git describe --dirty --long --tags) GIT_VERSION ?= $(shell git describe --dirty --long --tags)
CFLAGS += -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS) CFLAGS += -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment