From: Mathieu Desnoyers Date: Wed, 16 Mar 2016 15:23:43 +0000 (-0400) Subject: Fix: build against out-of-tree kernel build X-Git-Tag: v2.8.0-rc1~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b933d85e8282a17474d166fc055c4a215a1e4bf9;p=lttng-modules.git Fix: build against out-of-tree kernel build Fix following system header include modifications. Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index a2299771..9324f329 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ ifneq ($(KERNELRELEASE),) ifneq ($(CONFIG_TRACEPOINTS),) - MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) + TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST))) lttng_check_linux_version = $(shell pwd)/include/linux/version.h lttng_check_generated_linux_version = $(shell pwd)/include/generated/uapi/linux/version.h @@ -25,9 +25,9 @@ ifneq ($(KERNELRELEASE),) endif endif - include $(MAKEFILEDIR)/Makefile.ABI.workarounds + include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds - ccflags-y += -I$(PWD) + ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-discard.o obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-overwrite.o diff --git a/Makefile.ABI.workarounds b/Makefile.ABI.workarounds index f766bc93..d30aeaf2 100644 --- a/Makefile.ABI.workarounds +++ b/Makefile.ABI.workarounds @@ -4,13 +4,13 @@ # the kernel EXTRAVERSION to figure it out. Translate this information # into a define visible from the C preprocessor. -DEB_API_VERSION:=$(shell $(MAKEFILEDIR)/abi-debian-version.sh $(CURDIR)) +DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR)) ifneq ($(DEB_API_VERSION), 0) ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) endif -RT_PATCH_VERSION:=$(shell $(MAKEFILEDIR)/rt-patch-version.sh $(CURDIR)) +RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR)) ifneq ($(RT_PATCH_VERSION), 0) ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) diff --git a/lib/Kbuild b/lib/Kbuild index d0bba746..96807205 100644 --- a/lib/Kbuild +++ b/lib/Kbuild @@ -1,8 +1,8 @@ -MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) +TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. -include $(MAKEFILEDIR)/../Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds -ccflags-y += -I$(PWD) +ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) obj-$(CONFIG_LTTNG) += lttng-lib-ring-buffer.o diff --git a/probes/Kbuild b/probes/Kbuild index 265b50a2..90e9805c 100644 --- a/probes/Kbuild +++ b/probes/Kbuild @@ -1,8 +1,8 @@ -MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) +TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. -include $(MAKEFILEDIR)/../Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds -ccflags-y += -I$(PWD) +ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) obj-$(CONFIG_LTTNG) += lttng-probe-sched.o obj-$(CONFIG_LTTNG) += lttng-probe-irq.o