Skip to content

Commit 4d7285d

Browse files
martinlrothfelixsinger
authored andcommitted
Makefile: Add util/kconfig/Makefile.real to nocompile list
Messages shown with the '$(info ...)' Make command could be shown twice because the entire Makefile stack was evaluated twice at MAKELEVEL 0. The first time was to generate the build/util/kconfig/Makefile.real file. The second time was to do the rest of the build. Adding the kconfig Makefile.real file to the nocompile list prevents all the rest of the coreboot makefiles from being read in during that first step, which prevents the messages from being printed twice. You can see this behavior by running "make clean; make -d" and searching for the text: "Successfully remade target file 'build/util/kconfig/Makefile.real'." This breaks when the build target is 'tools', so add an exception for just that target. Signed-off-by: Martin Roth <[email protected]> Change-Id: If29c3a84c7c82ea099ef9610f4ecaa599f0d8649 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59607 Tested-by: build bot (Jenkins) <[email protected]> Reviewed-by: Felix Singer <[email protected]>
1 parent 55d0f40 commit 4d7285d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Makefile

+11-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ KCONFIG_TRISTATE := $(obj)/tristate.conf
3131
KCONFIG_NEGATIVES := 1
3232
KCONFIG_STRICT := 1
3333
KCONFIG_PACKAGE := CB.Config
34+
KCONFIG_MAKEFILE_REAL ?= $(objk)/Makefile.real
3435

3536
COREBOOT_EXPORTS += KCONFIG_CONFIG KCONFIG_AUTOHEADER KCONFIG_AUTOCONFIG
3637
COREBOOT_EXPORTS += KCONFIG_DEPENDENCIES KCONFIG_SPLITCONFIG KCONFIG_TRISTATE
@@ -44,6 +45,7 @@ CONFIG_SHELL := sh
4445
KBUILD_DEFCONFIG := configs/defconfig
4546
UNAME_RELEASE := $(shell uname -r)
4647
HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG))
48+
HAVE_KCONFIG_MAKEFILE_REAL := $(wildcard $(KCONFIG_MAKEFILE_REAL))
4749
MAKEFLAGS += -rR --no-print-directory
4850

4951
# Make is silent per default, but 'make V=1' will show all compiler calls.
@@ -87,14 +89,20 @@ help_coreboot help::
8789
# Order _does_ matter for pattern rules.
8890
include $(srck)/Makefile.inc
8991

90-
# Three cases where we don't need fully populated $(obj) lists:
92+
# The cases where we don't need fully populated $(obj) lists:
9193
# 1. when no .config exists
92-
# 2. when make config (in any flavour) is run
93-
# 3. when make distclean is run
94+
# 2. When no $(obj)/util/kconfig/Makefile.real exists and we're building tools
95+
# 3. when make config (in any flavour) is run
96+
# 4. when make distclean is run
9497
# Don't waste time on reading all Makefile.incs in these cases
9598
ifeq ($(strip $(HAVE_DOTCONFIG)),)
9699
NOCOMPILE:=1
97100
endif
101+
ifeq ($(strip $(HAVE_KCONFIG_MAKEFILE_REAL)),)
102+
ifneq ($(MAKECMDGOALS),tools)
103+
NOCOMPILE:=1
104+
endif
105+
endif
98106
ifneq ($(MAKECMDGOALS),)
99107
ifneq ($(filter %config %clean cross% clang iasl lint% help% what-jenkins-does,$(MAKECMDGOALS)),)
100108
NOCOMPILE:=1

0 commit comments

Comments
 (0)