]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf jevents: Suppress circular dependency warnings
authorJames Clark <james.clark@linaro.org>
Mon, 20 Oct 2025 16:08:28 +0000 (17:08 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 21 Oct 2025 04:11:49 +0000 (21:11 -0700)
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>
tools/perf/pmu-events/Build

index c5e2d5f1376687380d86f9d765d0985c86c92818..a46ab7b612dfc2c23c05b4d8d517bed6bf8b00ab 100644 (file)
@@ -29,10 +29,12 @@ $(PMU_EVENTS_C): $(EMPTY_PMU_EVENTS_C)
        $(call rule_mkdir)
        $(Q)$(call echo-cmd,gen)cp $< $@
 else
-# Copy checked-in json for generation.
+# Copy checked-in json to OUTPUT for generation if it's an out of source build
+ifneq ($(OUTPUT),)
 $(OUTPUT)pmu-events/arch/%: pmu-events/arch/%
        $(call rule_mkdir)
        $(Q)$(call echo-cmd,gen)cp $< $@
+endif
 
 $(LEGACY_CACHE_JSON): $(LEGACY_CACHE_PY)
        $(call rule_mkdir)