X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fprobes%2FKbuild;h=54784477d3e08b2ccc9338417e24b3c87d7860d8;hb=f9208dc00756dfa0a2f191799722030bdf3f793d;hp=8d6ff0f2d99b153e7af170ebe0b5d20f869ec701;hpb=82fbf9d383ff9069808fb0f5f75c660098dbae52;p=lttng-modules.git diff --git a/src/probes/Kbuild b/src/probes/Kbuild index 8d6ff0f2..54784477 100644 --- a/src/probes/Kbuild +++ b/src/probes/Kbuild @@ -167,7 +167,22 @@ ifneq ($(CONFIG_BTRFS_FS),) endif # $(wildcard $(btrfs_dep)) endif # CONFIG_BTRFS_FS -obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o +# A dependency on internal header 'mm/internal.h' was introduced in v5.18 +compaction_dep = $(srctree)/mm/internal.h +compaction_dep_wildcard = $(wildcard $(compaction_dep)) +compaction_dep_check = $(shell \ +if [ \( $(VERSION) -ge 6 \ + -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \ + -z "$(compaction_dep_wildcard)" ] ; then \ + echo "warn" ; \ +else \ + echo "ok" ; \ +fi ;) +ifeq ($(compaction_dep_check),ok) + obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o +else + $(warning Files $(compaction_dep) not found. Probe "compaction" is disabled. Use full kernel source tree to enable it.) +endif # $(wildcard $(compaction_dep)) ifneq ($(CONFIG_EXT4_FS),) ext4_dep = $(srctree)/fs/ext4/*.h