X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=probes%2FKbuild;fp=probes%2FKbuild;h=e04cb1ba09e931012f525946426438d7b2095401;hb=130fe2c8c9e01664a82dc55f8b9a88659a0825c6;hp=56edebd437a4ff27d2bb30b2788162981e7bfd54;hpb=8561ef82fe6bd2dea81f089543263921075f740e;p=lttng-modules.git diff --git a/probes/Kbuild b/probes/Kbuild index 56edebd4..e04cb1ba 100644 --- a/probes/Kbuild +++ b/probes/Kbuild @@ -254,7 +254,21 @@ ifneq ($(CONFIG_KRETPROBES),) endif # CONFIG_KRETPROBES ifneq ($(CONFIG_DYNAMIC_FTRACE),) - obj-$(CONFIG_LTTNG) += lttng-ftrace.o + ftrace_dep = $(srctree)/kernel/trace/trace.h + ftrace_dep_check = $(wildcard $(ftrace_dep)) + ftrace = $(shell \ + if [ $(VERSION) -ge 5 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 12 \) ] ; then \ + if [ -z "$(ftrace_dep_check)" ] ; then \ + echo "warn" ; \ + exit ; \ + fi; \ + echo "lttng-ftrace.o" ; \ + fi;) + ifeq ($(ftrace),warn) + $(warning Files $(ftrace_dep) not found. Probe "ftrace" is disabled. Use full kernel source tree to enable it.) + ftrace = + endif # $(ftrace),warn + obj-$(CONFIG_LTTNG) += $(ftrace) endif # CONFIG_DYNAMIC_FTRACE # vim:syntax=make