From a0eb449b984fdddf6e33a97b1d50b3aa767aa127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Tue, 2 Jun 2015 13:33:40 +0200 Subject: [PATCH] backports: Fix out of tree build --- arch/arm/configs/odroidxu3_defconfig | 2 +- backports/Kconfig | 2 +- backports/Makefile | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/configs/odroidxu3_defconfig b/arch/arm/configs/odroidxu3_defconfig index 77029e03020d3b..fcac9bc65b40d9 100644 --- a/arch/arm/configs/odroidxu3_defconfig +++ b/arch/arm/configs/odroidxu3_defconfig @@ -4243,7 +4243,7 @@ CONFIG_AVERAGE=y CONFIG_OID_REGISTRY=m # CONFIG_VIRTUALIZATION is not set CONFIG_BACKPORT_INTEGRATE=y -CONFIG_BACKPORT_DIR="backports/" +CONFIG_BACKPORT_DIR="backports" CONFIG_BACKPORT_VERSION="backports-20150222-0-g2745ccd" CONFIG_BACKPORT_KERNEL_VERSION="next-20150222-0-g53e418f1" CONFIG_BACKPORT_KERNEL_NAME="Linux" diff --git a/backports/Kconfig b/backports/Kconfig index e38c3209cc1944..c8ff8bded3bae3 100644 --- a/backports/Kconfig +++ b/backports/Kconfig @@ -4,7 +4,7 @@ config BACKPORT_INTEGRATE config BACKPORT_DIR string - default "backports/" + default "backports" config BACKPORT_VERSION string diff --git a/backports/Makefile b/backports/Makefile index 99030eb79b5635..f82ca24e0219e5 100644 --- a/backports/Makefile +++ b/backports/Makefile @@ -19,7 +19,12 @@ NOSTDINC_FLAGS := \ export backport_srctree = $(M) else -export BACKPORT_DIR = backports/ +ifneq ($(KBUILD_SRC),) + ifneq ($(wildcard $(KBUILD_SRC)/$(src)),) + TOP_KBUILD_SRC := $(KBUILD_SRC)/ + endif +endif +export BACKPORT_DIR = $(TOP_KBUILD_SRC)backports export backport_srctree = $(BACKPORT_DIR) NOSTDINC_FLAGS := \ -I$(BACKPORT_DIR)/backport-include/ \