Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf jevents: Suppress circular dependency warnings

When doing an in source build, $(OUTPUT) is empty so the rule has the
same input and output file. Suppress the warning by only adding the rule
when doing an out of source build. The same condition already exists for
the clean rule for json files.

This fixes the following warnings:

make[3]: Circular pmu-events/arch/nds32/mapfile.csv <- pmu-events/arch/nds32/mapfile.csv dependency dropped.
make[3]: Circular pmu-events/arch/powerpc/mapfile.csv <- pmu-events/arch/powerpc/mapfile.csv dependency dropped.
...

Signed-off-by: James Clark <james.clark@linaro.org>
Tested-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

James Clark and committed by
Namhyung Kim
29166bd0 2ef335ea

+3 -1
+3 -1
tools/perf/pmu-events/Build
··· 29 29 $(call rule_mkdir) 30 30 $(Q)$(call echo-cmd,gen)cp $< $@ 31 31 else 32 - # Copy checked-in json for generation. 32 + # Copy checked-in json to OUTPUT for generation if it's an out of source build 33 + ifneq ($(OUTPUT),) 33 34 $(OUTPUT)pmu-events/arch/%: pmu-events/arch/% 34 35 $(call rule_mkdir) 35 36 $(Q)$(call echo-cmd,gen)cp $< $@ 37 + endif 36 38 37 39 $(LEGACY_CACHE_JSON): $(LEGACY_CACHE_PY) 38 40 $(call rule_mkdir)