• Daniel Bristot de Oliveira's avatar
    tools/tracing: Use tools/build makefiles on latency-collector · 9d56c88e
    Daniel Bristot de Oliveira authored
    Use tools/build/ makefiles to build latency-collector, inheriting
    the benefits of it. For example: Before this patch, a missing
    tracefs/traceevents headers will result in fail like this:
    
      ~/linux/tools/tracing/latency $ make
      cc -Wall -Wextra -g -O2  -o latency-collector latency-collector.c -lpthread
      latency-collector.c:26:10: fatal error: tracefs.h: No such file or directory
         26 | #include <tracefs.h>
            |          ^~~~~~~~~~~
      compilation terminated.
      make: *** [Makefile:14: latency-collector] Error 1
    
    Which is not that helpful. After this change it reports:
    
      ~/linux/tools/tracing/latency# make
    
      Auto-detecting system features:
      ...                           libtraceevent: [ OFF ]
      ...                              libtracefs: [ OFF ]
    
      libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel
      libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
      Makefile.config:29: *** Please, che...
    9d56c88e
Makefile.config 755 Bytes