fix: 'random' tracepoints removed in stable kernels
[lttng-modules.git] / probes / Kbuild
index 187668553ddc8f558cf0875160aef86ead20c4b0..4db634abbd41143a02d14484f632d31d6b07ef7d 100644 (file)
@@ -187,13 +187,11 @@ ifneq ($(CONFIG_FRAME_WARN),0)
   CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200
 endif
 
-obj-$(CONFIG_LTTNG) +=  $(shell \
-    if [ $(VERSION) -ge 4 \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \
-      echo "lttng-probe-random.o" ; fi;)
+# Introduced in v3.6, remove in v5.18
+random_dep = $(srctree)/include/trace/events/random.h
+ifneq ($(wildcard $(random_dep)),)
+  obj-$(CONFIG_LTTNG) += lttng-probe-random.o
+endif
 
 obj-$(CONFIG_LTTNG) +=  $(shell \
   if [ $(VERSION) -ge 4 \
This page took 0.023751 seconds and 4 git commands to generate.