Commit bd5d7490 authored by Adam Wujek's avatar Adam Wujek 💬

kernel: always use absolute path of fmc-bus

FMC_BUS_ABS is passed to Kbuild, which uses different current directory.
It is not trivial to handle FMC_BUS to be absolute or relative path.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 285f036a
......@@ -5,6 +5,9 @@ REPO_PARENT=$(shell /bin/pwd)/..
FMC_BUS ?= $(shell pwd)/fmc-bus
export FMC_BUS
# FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild
FMC_BUS_ABS ?= $(abspath $(FMC_BUS) )
export FMC_BUS_ABS
RUNME := $(shell test -d $(FMC_BUS) || git submodule update --init)
......
......@@ -7,9 +7,9 @@ endif
# The library includes <sdb.h>, so point -I directtly there
# include our header before to avoid conflicts with the kernel
LINUXINCLUDE := -I$(FMC_BUS)/kernel/include $(LINUXINCLUDE)
LINUXINCLUDE := -I$(FMC_BUS_ABS)/kernel/include $(LINUXINCLUDE)
ccflags-y += -I$(FMC_BUS)/kernel/include
ccflags-y += -I$(FMC_BUS_ABS)/kernel/include
ccflags-y += -DDEBUG
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
......
......@@ -6,7 +6,8 @@ REPO_PARENT=$(shell /bin/pwd)/../..
LINUX ?= /lib/modules/$(shell uname -r)/build
FMC_BUS ?= $(shell pwd)/../fmc-bus
export FMC_BUS
# FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild
FMC_BUS_ABS ?= $(abspath $(FMC_BUS) )
GIT_VERSION = $(shell git describe --dirty --long --tags)
export GIT_VERSION
......@@ -16,7 +17,7 @@ all: modules
.PHONY: all modules clean help install modules_install
modules help install modules_install:
$(MAKE) -C $(LINUX) M=$(shell pwd) GIT_VERSION=$(GIT_VERSION) $@
$(MAKE) -C $(LINUX) M=$(shell pwd) GIT_VERSION=$(GIT_VERSION) FMC_BUS_ABS=$(FMC_BUS_ABS) $@
# be able to run the "clean" rule even if $(LINUX) is not valid
clean:
......
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