Commit f6af8690 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Peter Zijlstra
Browse files

perf build: Fix perf build issues with fixdep



Commit a808a2b3 ("tools build: Fix fixdep dependencies") broke the
perf build ("make -C tools/perf") by introducing two inadvertent
conflicts:

  1) tools/build/Makefile includes tools/build/Makefile.include, which
     defines a phony 'fixdep' target.  This conflicts with the $(FIXDEP)
     file target in tools/build/Makefile when OUTPUT is empty, causing
     make to report duplicate recipes for the same target.

  2) The FIXDEP variable in tools/build/Makefile conflicts with the
     previously existing one in tools/perf/Makefile.perf.

Remove the unnecessary include of tools/build/Makefile.include from
tools/build/Makefile, and rename the FIXDEP variable in
tools/perf/Makefile.perf to FIXDEP_BUILT.

Fixes: a808a2b3 ("tools build: Fix fixdep dependencies")
Reported-by: default avatarThorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarThorsten Leemhuis <linux@leemhuis.info>
Link: https://patch.msgid.link/8881bc3321bd9fa58802e4f36286eefe3667806b.1760992391.git.jpoimboe@kernel.org
parent 9025688b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ ifneq ($(wildcard $(TMP_O)),)
	$(Q)$(MAKE) -C feature OUTPUT=$(TMP_O) clean >/dev/null
endif

include $(srctree)/tools/build/Makefile.include

FIXDEP		:= $(OUTPUT)fixdep
FIXDEP_IN	:= $(OUTPUT)fixdep-in.o

+3 −3
Original line number Diff line number Diff line
@@ -234,12 +234,12 @@ endif
# The fixdep build - we force fixdep tool to be built as
# the first target in the separate make session not to be
# disturbed by any parallel make jobs. Once fixdep is done
# we issue the requested build with FIXDEP=1 variable.
# we issue the requested build with FIXDEP_BUILT=1 variable.
#
# The fixdep build is disabled for $(NON_CONFIG_TARGETS)
# targets, because it's not necessary.

ifdef FIXDEP
ifdef FIXDEP_BUILT
  force_fixdep := 0
else
  force_fixdep := $(config)
@@ -286,7 +286,7 @@ $(goals) all: sub-make

sub-make: fixdep
	@./check-headers.sh
	$(Q)$(MAKE) FIXDEP=1 -f Makefile.perf $(goals)
	$(Q)$(MAKE) FIXDEP_BUILT=1 -f Makefile.perf $(goals)

else # force_fixdep