From: Mathieu Desnoyers Date: Wed, 1 Oct 2014 16:05:41 +0000 (-0400) Subject: Check for stale version.h files X-Git-Tag: v2.6.0-rc1~11 X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=c340f0713c0e9eb2c7aaae21bf2b03e7e19aca6d Check for stale version.h files Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index 606b5ec8..aa4835d3 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