Skip to contentSkip to conversation

ACPI: tables: Add custom DSDT file as makefile prerequisite

PATCH Applied Richard Fitzgerald 2 participants 2 messages Jun 21, 2021 – Jun 23, 2021 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: tables: Add custom DSDT file as makefile prerequisite

A custom DSDT file is mostly used during development or debugging, and in that case it is quite likely to want to rebuild the kernel after changing ONLY the content of the DSDT.

This patch adds the custom DSDT as a prerequisite to tables.o to ensure a rebuild if the DSDT file is updated. Make will merge the prerequisites from multiple rules for the same target.

---
 drivers/acpi/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
drivers/acpi/Makefile +5 -0
index efb0d1f64019..ceb1aed4b1fc 100644
@@ -8,6 +8,11 @@ ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
 #
 # ACPI Boot-Time Table Parsing
 #
+ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)
+tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ;
+
+endif
+
 obj-$(CONFIG_ACPI)		+= tables.o
 obj-$(CONFIG_X86)		+= blacklist.o
 
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 21 lines · Richard Fitzgerald

A custom DSDT file is mostly used during development or debugging, and in that case it is quite likely to want to rebuild the kernel after changing ONLY the content of the DSDT.

This patch adds the custom DSDT as a prerequisite to tables.o to ensure a rebuild if the DSDT file is updated. Make will merge the prerequisites from multiple rules for the same target.

---
 drivers/acpi/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
drivers/acpi/Makefile +0 -0
index efb0d1f64019..ceb1aed4b1fc 100644
@@ -8,6 +8,11 @@ ccflags-$(CONFIG_ACPI_DEBUG)   += -DACPI_DEBUG_OUTPUT
 #
 # ACPI Boot-Time Table Parsing

drivers/acpi/Makefile ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT

Quoted 10 lines
drivers/acpi/Makefile +5 -1
 #
+ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)
+tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ;
+
+endif
+
 obj-$(CONFIG_ACPI)             += tables.o
 obj-$(CONFIG_X86)              += blacklist.o
 
--

Applied as 5.14 material, thanks!