tests: Rename 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.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Id09eafd293a54198aab87281f529749325df8b07
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
Martin Roth 2024-01-18 18:16:12 -07:00 committed by Felix Singer
parent 48169e8036
commit ba3a719668
9 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ TEST_INCLUDES += -I$(src) -I$(src)/include -I$(src)/commonlib/include \
TEST_INCLUDES += -I$(dir $(TEST_KCONFIG_AUTOHEADER)) TEST_INCLUDES += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
# Note: This is intentionally just a subset of the warnings in the toplevel # Note: This is intentionally just a subset of the warnings in the toplevel
# Makefile.inc. We don't need to be as strict with test code, and things like # Makefile.mk. We don't need to be as strict with test code, and things like
# -Wmissing-prototypes just make working with the test framework cumbersome. # -Wmissing-prototypes just make working with the test framework cumbersome.
# Only put conservative warnings here that really detect code that's obviously # Only put conservative warnings here that really detect code that's obviously
# unintentional. # unintentional.
@ -95,7 +95,7 @@ define TEST_CC_template
$(1)-config-file := $(testobj)/$(1)/config.h $(1)-config-file := $(testobj)/$(1)/config.h
$$($(1)-config-file): $(TEST_KCONFIG_AUTOHEADER) $$($(1)-config-file): $(TEST_KCONFIG_AUTOHEADER)
mkdir -p $$(dir $$@) mkdir -p $$(dir $$@)
printf '// File generated by tests/Makefile.inc\n// Do not change\n' > $$@ printf '// File generated by tests/Makefile.mk\n// Do not change\n' > $$@
printf '#include <%s>\n\n' "$(notdir $(TEST_KCONFIG_AUTOHEADER))" >> $$@ printf '#include <%s>\n\n' "$(notdir $(TEST_KCONFIG_AUTOHEADER))" >> $$@
for kv in $$($(1)-config); do \ for kv in $$($(1)-config); do \
key="`echo $$$$kv | cut -d '=' -f -1`"; \ key="`echo $$$$kv | cut -d '=' -f -1`"; \

View file

@ -44,7 +44,7 @@ $(foreach attribute,$(attributes),
$(eval $(1)$(2)-stage := $(if $($(1)$(2)-stage),$($(1)$(2)-stage),ramstage)) $(eval $(1)$(2)-stage := $(if $($(1)$(2)-stage),$($(1)$(2)-stage),ramstage))
$(if $(findstring $($(1)$(2)-stage), $(stages)),, $(if $(findstring $($(1)$(2)-stage), $(stages)),,
$(error Wrong $(1)$(2)-stage value $($(1)$(2)-stage). \ $(error Wrong $(1)$(2)-stage value $($(1)$(2)-stage). \
Check your $(dir $(1)$(2))Makefile.inc)) Check your $(dir $(1)$(2))Makefile.mk))
endef endef
$(call add-special-class, tests) $(call add-special-class, tests)