Fix: build against out-of-tree kernel build
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 16 Mar 2016 15:23:43 +0000 (11:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 16 Mar 2016 15:23:43 +0000 (11:23 -0400)
Fix following system header include modifications.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile
Makefile.ABI.workarounds
lib/Kbuild
probes/Kbuild

index a2299771a103dedf5bff79e258aa12330e93c576..9324f329ef27cd23badb6ebc9e02e1c501b7a860 100644 (file)
--- 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
index f766bc93dc2a70ab8f605169350eff4f2200aebe..d30aeaf2939d1922e076e7d7a9a616301f499966 100644 (file)
@@ -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)
index d0bba746e3565d9410c488a5ce9b06112344be78..9680720545bbfb6ae99bf1a483560eb6661cbeb5 100644 (file)
@@ -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
 
index 265b50a27a9455ce84a83ee554af42670f3c944e..90e9805ce41215f678f706a478b853855e7913d1 100644 (file)
@@ -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
This page took 0.028765 seconds and 4 git commands to generate.