xref: /linux/tools/perf/scripts/Build (revision 1260ed77798502de9c98020040d2995008de10cc)
1ifeq ($(CONFIG_LIBTRACEEVENT),y)
2  perf-util-$(CONFIG_LIBPERL)   += perl/Perf-Trace-Util/
3endif
4perf-util-$(CONFIG_LIBPYTHON) += python/Perf-Trace-Util/
5
6ifdef MYPY
7  PY_TESTS := $(shell find python -type f -name '*.py')
8  MYPY_TEST_LOGS := $(PY_TESTS:python/%=python/%.mypy_log)
9else
10  MYPY_TEST_LOGS :=
11endif
12
13$(OUTPUT)%.mypy_log: %
14	$(call rule_mkdir)
15	$(Q)$(call echo-cmd,test)mypy "$<" > $@ || (cat $@ && rm $@ && false)
16
17perf-y += $(MYPY_TEST_LOGS)
18
19ifdef PYLINT
20  PY_TESTS := $(shell find python -type f -name '*.py')
21  PYLINT_TEST_LOGS := $(PY_TESTS:python/%=python/%.pylint_log)
22else
23  PYLINT_TEST_LOGS :=
24endif
25
26$(OUTPUT)%.pylint_log: %
27	$(call rule_mkdir)
28	$(Q)$(call echo-cmd,test)pylint "$<" > $@ || (cat $@ && rm $@ && false)
29
30perf-y += $(PYLINT_TEST_LOGS)
31