Rename Makefile.ABI.workarounds to Kbuild.common
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 23 Jun 2017 18:29:43 +0000 (14:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Jun 2017 19:10:47 +0000 (15:10 -0400)
This file is now used for code which is common to all Kbuild files.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Kbuild.common [new file with mode: 0644]
Makefile
Makefile.ABI.workarounds [deleted file]
lib/Kbuild
probes/Kbuild
tests/Kbuild

diff --git a/Kbuild.common b/Kbuild.common
new file mode 100644 (file)
index 0000000..2e6c4aa
--- /dev/null
@@ -0,0 +1,50 @@
+# Work-around for distro-specific public modules ABI breakages.
+# Some distributions break the public module instrumentation ABI
+# compared to upstream stable kernels without providing other mean than
+# the kernel EXTRAVERSION to figure it out. Translate this information
+# into a define visible from the C preprocessor.
+
+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
+
+RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR))
+
+ifneq ($(RHEL_API_VERSION), 0)
+  ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION)
+endif
+
+SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR))
+
+ifneq ($(SLE_API_VERSION), 0)
+  ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION)
+endif
+
+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)
+endif
+
+# Starting with kernel 4.12, the ftrace header was moved to private headers
+# and as such is not available when building against distro headers instead
+# of the full kernel sources. In the situation, define LTTNG_FTRACE_MISSING_HEADER
+# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled.
+ifneq ($(CONFIG_DYNAMIC_FTRACE),)
+  ftrace_dep = $(srctree)/kernel/trace/trace.h
+  ftrace_dep_check = $(wildcard $(ftrace_dep))
+  have_ftrace_header = $(shell \
+    if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ; then \
+      if [ -z "$(ftrace_dep_check)" ] ; then \
+        echo "no" ; \
+        exit ; \
+      fi; \
+    fi; \
+    echo "yes" ; \
+    )
+  ifeq ($(have_ftrace_header), no)
+    ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER
+  endif
+endif
index f65e463291a85e8fe9ad6cb610e9561f58e3c65a..2cd2df09b86b577074f58792d587efaad84be6eb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ ifneq ($(KERNELRELEASE),)
     endif
   endif
 
-  include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds
+  include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common
 
   ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
 
diff --git a/Makefile.ABI.workarounds b/Makefile.ABI.workarounds
deleted file mode 100644 (file)
index 2e6c4aa..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# Work-around for distro-specific public modules ABI breakages.
-# Some distributions break the public module instrumentation ABI
-# compared to upstream stable kernels without providing other mean than
-# the kernel EXTRAVERSION to figure it out. Translate this information
-# into a define visible from the C preprocessor.
-
-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
-
-RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR))
-
-ifneq ($(RHEL_API_VERSION), 0)
-  ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION)
-endif
-
-SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR))
-
-ifneq ($(SLE_API_VERSION), 0)
-  ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION)
-endif
-
-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)
-endif
-
-# Starting with kernel 4.12, the ftrace header was moved to private headers
-# and as such is not available when building against distro headers instead
-# of the full kernel sources. In the situation, define LTTNG_FTRACE_MISSING_HEADER
-# so we can enable the compat code even if CONFIG_DYNAMIC_FTRACE is enabled.
-ifneq ($(CONFIG_DYNAMIC_FTRACE),)
-  ftrace_dep = $(srctree)/kernel/trace/trace.h
-  ftrace_dep_check = $(wildcard $(ftrace_dep))
-  have_ftrace_header = $(shell \
-    if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ; then \
-      if [ -z "$(ftrace_dep_check)" ] ; then \
-        echo "no" ; \
-        exit ; \
-      fi; \
-    fi; \
-    echo "yes" ; \
-    )
-  ifeq ($(have_ftrace_header), no)
-    ccflags-y += -DLTTNG_FTRACE_MISSING_HEADER
-  endif
-endif
index 9680720545bbfb6ae99bf1a483560eb6661cbeb5..5248d3722e7ad003a1d477f1b7599f5d17304fcb 100644 (file)
@@ -1,6 +1,6 @@
 TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
 
-include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds
+include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common
 
 ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
 
index cc1c0656e4ad2a7556aab9fac1fe87c65bc800aa..70a3d8689438793b6f0bb92aa65d03c1c6bd8eda 100644 (file)
@@ -1,6 +1,6 @@
 TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
 
-include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds
+include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common
 
 ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
 
index aabb8e206ed076d4b77d326de0f8c3b51b82eff2..0696c0ab2835d39bccdd8e67221184ed1492ff3e 100644 (file)
@@ -1,6 +1,6 @@
 TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
 
-include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds
+include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common
 
 ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
 
This page took 0.028909 seconds and 4 git commands to generate.