X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=Makefile;h=581b5a241b0d1810c6f0ed7992ae323d1488c570;hb=refs%2Fheads%2Fstable-2.4;hp=39672afc61b29e506e8ff4fb66eb486f00fd2177;hpb=b4809588d79abb5c9a429f06aaadaf95ec34f449;p=lttng-modules.git diff --git a/Makefile b/Makefile index 39672afc..581b5a24 100644 --- 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