summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2024-01-18 10:25:18 -0700
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-01-24 08:31:31 +0000
commite3df18451c518c0019f35b9b4d5d06ff6bd3d5f2 (patch)
tree13a23881f359fc3b7254fec3359805601512effa
parent792ed6353a80fcebbc74f8a34e37c10eaf6ff62b (diff)
downloadcoreboot-e3df18451c518c0019f35b9b4d5d06ff6bd3d5f2.tar.gz
coreboot-e3df18451c518c0019f35b9b4d5d06ff6bd3d5f2.tar.bz2
coreboot-e3df18451c518c0019f35b9b4d5d06ff6bd3d5f2.zip
Makefiles: Rename top-level Makefiles from .inc to .mk
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. The rest of the Makefiles will be renamed in following commits. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Idaf69c6871d0bc1ee5e2e53157b8631c55eb3db9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80063 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--Makefile24
-rw-r--r--Makefile.mk (renamed from Makefile.inc)2
-rw-r--r--payloads/Makefile.mk (renamed from payloads/Makefile.inc)0
-rw-r--r--payloads/coreinfo/Makefile2
-rw-r--r--payloads/libpayload/Makefile4
-rw-r--r--tests/Makefile.mk (renamed from tests/Makefile.inc)0
-rw-r--r--toolchain.mk (renamed from toolchain.inc)0
-rw-r--r--util/kconfig/Makefile.mk (renamed from util/kconfig/Makefile.inc)0
-rwxr-xr-xutil/lint/kconfig_lint2
-rw-r--r--util/testing/Makefile.mk (renamed from util/testing/Makefile.inc)0
10 files changed, 19 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index b521f04cb6fb..4a87d2f54959 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
SYMLINK_LIST = $(call rwildcard,site-local/,symlink.txt)
-# directory containing the toplevel Makefile.inc
+# Directory containing the toplevel Makefile.mk
TOPLEVEL := .
CONFIG_SHELL := sh
@@ -102,7 +102,7 @@ help_coreboot help::
# This include must come _before_ the pattern rules below!
# Order _does_ matter for pattern rules.
-include $(srck)/Makefile.inc
+include $(srck)/Makefile.mk
# The cases where we don't need fully populated $(obj) lists:
# 1. when no .config exists
@@ -153,11 +153,12 @@ ifeq ($(NOCOMPILE),1)
HOSTCC ?= $(if $(shell type gcc 2>/dev/null),gcc,cc)
HOSTCXX ?= g++
-include $(TOPLEVEL)/Makefile.inc
-include $(TOPLEVEL)/payloads/Makefile.inc
-include $(TOPLEVEL)/util/testing/Makefile.inc
+include $(TOPLEVEL)/Makefile.mk
+include $(TOPLEVEL)/payloads/Makefile.mk
+include $(TOPLEVEL)/util/testing/Makefile.mk
+-include $(TOPLEVEL)/site-local/Makefile.mk
-include $(TOPLEVEL)/site-local/Makefile.inc
-include $(TOPLEVEL)/tests/Makefile.inc
+include $(TOPLEVEL)/tests/Makefile.mk
printall real-all:
@echo "Error: Trying to build, but NOCOMPILE is set." >&2
@echo " Please file a bug with the following information:"
@@ -198,7 +199,7 @@ endif
export LANG LC_ALL TZ SOURCE_DATE_EPOCH
ifneq ($(UNIT_TEST),1)
-include toolchain.inc
+include toolchain.mk
endif
strip_quotes = $(strip $(subst ",,$(subst \",,$(1))))
@@ -276,7 +277,7 @@ src-to-ali=\
$(subst .$(1),,\
$(filter %.ads %.adb,$(2)))))))))
-# Clean -y variables, include Makefile.inc
+# Clean -y variables, include Makefile.mk & Makefile.inc
# Add paths to files in X-y to X-srcs
# Add subdirs-y to subdirs
includemakefiles= \
@@ -295,10 +296,13 @@ includemakefiles= \
# For each path in $(subdirs) call includemakefiles
# Repeat until subdirs is empty
+# TODO: Remove Makefile.inc support
evaluate_subdirs= \
$(eval cursubdirs:=$(subdirs)) \
$(eval subdirs:=) \
$(foreach dir,$(cursubdirs), \
+ $(eval $(call includemakefiles,$(dir)/Makefile.mk))) \
+ $(foreach dir,$(cursubdirs), \
$(eval $(call includemakefiles,$(dir)/Makefile.inc))) \
$(if $(subdirs),$(eval $(call evaluate_subdirs)))
@@ -306,11 +310,11 @@ evaluate_subdirs= \
subdirs:=$(TOPLEVEL)
postinclude-hooks :=
-# Don't iterate through Makefile.incs under src/ when building tests
+# Don't iterate through Makefiles under src/ when building tests
ifneq ($(UNIT_TEST),1)
$(eval $(call evaluate_subdirs))
else
-include $(TOPLEVEL)/tests/Makefile.inc
+include $(TOPLEVEL)/tests/Makefile.mk
endif
ifeq ($(FAILBUILD),1)
diff --git a/Makefile.inc b/Makefile.mk
index 23f56a4d7316..87c6bcb247f7 100644
--- a/Makefile.inc
+++ b/Makefile.mk
@@ -1158,7 +1158,7 @@ FMAP_CBFS_SIZE := $(call int-subtract,$(FMAP_BIOS_SIZE) $(FMAP_CBFS_BASE))
endif # ifeq ($(CONFIG_ARCH_X86),y)
-$(obj)/fmap.fmd: $(top)/Makefile.inc $(DEFAULT_FLASHMAP) $(obj)/config.h
+$(obj)/fmap.fmd: $(top)/Makefile.mk $(DEFAULT_FLASHMAP) $(obj)/config.h
sed -e "s,##ROM_BASE##,$(FMAP_ROM_ADDR)," \
-e "s,##ROM_SIZE##,$(FMAP_ROM_SIZE)," \
-e "s,##BIOS_BASE##,$(FMAP_BIOS_BASE)," \
diff --git a/payloads/Makefile.inc b/payloads/Makefile.mk
index a2336aa876a7..a2336aa876a7 100644
--- a/payloads/Makefile.inc
+++ b/payloads/Makefile.mk
diff --git a/payloads/coreinfo/Makefile b/payloads/coreinfo/Makefile
index 096e9c60cf4f..9655e24cc333 100644
--- a/payloads/coreinfo/Makefile
+++ b/payloads/coreinfo/Makefile
@@ -70,7 +70,7 @@ $(obj)/config.h:
$(shell mkdir -p $(objk)/lxdialog $(KCONFIG_SPLITCONFIG))
-include $(srck)/Makefile.inc
+include $(srck)/Makefile.mk
.PHONY: $(PHONY) prepare all real-all defaultbuild
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index 0104a11fbc1c..212e67ea7965 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -103,7 +103,7 @@ endif
# This include must come _before_ the pattern rules below!
# Order _does_ matter for pattern rules.
-include $(srck)/Makefile.inc
+include $(srck)/Makefile.mk
include $(HAVE_DOTCONFIG)
@@ -127,7 +127,7 @@ ARCH-$(CONFIG_LP_ARCH_MOCK) := mock
# 3. when make distclean is run
# 4. when make help% or make clean% is run
# 5. when make %-test or make %-tests or make %coverage-report is run
-# Don't waste time on reading all Makefile.incs in these cases
+# Don't waste time on reading all Makefiles in these cases
ifeq ($(strip $(HAVE_DOTCONFIG)),)
NOCOMPILE := 1
endif
diff --git a/tests/Makefile.inc b/tests/Makefile.mk
index 584b4c0c9dae..584b4c0c9dae 100644
--- a/tests/Makefile.inc
+++ b/tests/Makefile.mk
diff --git a/toolchain.inc b/toolchain.mk
index f985e8843a01..f985e8843a01 100644
--- a/toolchain.inc
+++ b/toolchain.mk
diff --git a/util/kconfig/Makefile.inc b/util/kconfig/Makefile.mk
index 83fad884b71c..83fad884b71c 100644
--- a/util/kconfig/Makefile.inc
+++ b/util/kconfig/Makefile.mk
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index e67aebd2d2b6..e64cf11c84b8 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -36,7 +36,7 @@ my $exclude_dirs_and_files =
'^build/\|^coreboot-builds/\|^configs/\|^util/\|^\.git/\|^payloads\|^Documentation\|^3rdparty'
. '\|' . # directories to exclude when searching for used symbols
'\.config\|\.txt$\|\.tex$\|\.tags\|/kconfig.h\|\.fmd'; #files to exclude when looking for symbols
-my $payload_files_to_check='payloads/Makefile.inc payloads/external/Makefile.inc';
+my $payload_files_to_check='payloads/Makefile.mk payloads/external/Makefile.inc';
my $config_file = ""; # name of config file to load symbol values from.
my @wholeconfig; # document the entire kconfig structure
my %loaded_files; # list of each Kconfig file loaded
diff --git a/util/testing/Makefile.inc b/util/testing/Makefile.mk
index c73502e9bce8..c73502e9bce8 100644
--- a/util/testing/Makefile.inc
+++ b/util/testing/Makefile.mk