Version 2.4.4
[lttng-modules.git] / Makefile
index 39672afc61b29e506e8ff4fb66eb486f00fd2177..581b5a241b0d1810c6f0ed7992ae323d1488c570 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,20 @@
 ifneq ($(KERNELRELEASE),)
 ifneq ($(CONFIG_TRACEPOINTS),)
 
+lttng_check_linux_version = $(shell pwd)/include/linux/version.h
+lttng_check_generated_linux_version = $(shell pwd)/include/generated/uapi/linux/version.h
+
+#
+# Check for stale version.h, which can be a leftover from an old Linux
+# kernel tree moved to a newer kernel version, only pruned by make
+# distclean.
+#
+ifneq ($(wildcard $(lttng_check_linux_version)),)
+ifneq ($(wildcard $(lttng_check_generated_linux_version)),)
+$(error Duplicate version.h files found in $(lttng_check_linux_version) and $(lttng_check_generated_linux_version). Consider running make distclean on your kernel, or removing the stale $(lttng_check_linux_version) file)
+endif
+endif
+
 obj-m += lttng-ring-buffer-client-discard.o
 obj-m += lttng-ring-buffer-client-overwrite.o
 obj-m += lttng-ring-buffer-metadata-client.o
@@ -33,7 +47,7 @@ endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
 ifneq ($(CONFIG_PERF_EVENTS),)
 lttng-tracer-objs += $(shell \
        if [ $(VERSION) -ge 3 \
-               -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 34 \) ] ; then \
+               -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \
                echo "lttng-context-perf-counters.o" ; fi;)
 endif # CONFIG_PERF_EVENTS
 
This page took 0.023427 seconds and 4 git commands to generate.