From 27a050630804d9bb7861b8b927b2abb8f6fd50fc Mon Sep 17 00:00:00 2001 From: Nicholas Chin Date: Wed, 7 Feb 2024 07:59:58 -0700 Subject: [PATCH] Makefile.mk: Include build/dsdt.d at the same time as DEPENDENCIES Instead of including the generated dependency file during the evaluation of asl_template, add it to the DEPENDENCIES variable so that it is included at the same time as the rest of the .d files in the top level Makefile. This makes the handling of .d files cleaner as all of them are processed in the same way. Tracking all of them in a single variable also prevents any from being missed if any post-processing is performed on them, such as running them through the fixdep utility from the Linux kernel project to replace the config.h dependency with only the configs that are used. This should be safe since asl_template is evaluated while calling includemakefiles, which is occurs before the files in DEPENDENCIES are included. TEST: 1. Build dell/e6400 2. Run `touch src/mainboard/dell/e6400/dsdt.asl` (defined as a prerequisite of build/dsdt.aml in build/dsdt.d) 3. Run `make --debug=b` 4. Verify that dsdt.aml was rebuilt due dsdt.asl being newer than target Change-Id: Ie8271d1e172395917f2859c8bbfd2041ddc572ca Signed-off-by: Nicholas Chin Reviewed-on: https://review.coreboot.org/c/coreboot/+/80383 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- Makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.mk b/Makefile.mk index 73fb40b681..c901785081 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -302,7 +302,7 @@ ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA),y) $(CONFIG_CBFS_PREFIX)/$(1).aml-align = 64 endif cbfs-files-$(if $(2),$(2),y) += $(CONFIG_CBFS_PREFIX)/$(1).aml --include $(obj)/$(1).d +$(eval DEPENDENCIES += $(obj)/$(1).d) $(obj)/$(1).aml: $(src)/mainboard/$(MAINBOARDDIR)/$(1).asl $(obj)/config.h @printf " IASL $$(subst $(top)/,,$$(@))\n" $(CC_ramstage) -x assembler-with-cpp -E -MMD -MT $$(@) $$(CPPFLAGS_ramstage) -D__ACPI__ -P -include $(src)/include/kconfig.h -I$(obj) -I$(src) -I$(src)/include -I$(src)/arch/$(ARCHDIR-$(ARCH-ramstage-y))/include -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $(obj)/$(1).asl