All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: tables: Add custom DSDT file as makefile prerequisite
@ 2021-06-21 15:24 Richard Fitzgerald
  2021-06-23 17:32 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2021-06-21 15:24 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-acpi, linux-kernel, patches, 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.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/acpi/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index efb0d1f64019..ceb1aed4b1fc 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -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
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: tables: Add custom DSDT file as makefile prerequisite
  2021-06-21 15:24 [PATCH] ACPI: tables: Add custom DSDT file as makefile prerequisite Richard Fitzgerald
@ 2021-06-23 17:32 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-06-23 17:32 UTC (permalink / raw)
  To: Richard Fitzgerald
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List, patches

On Mon, Jun 21, 2021 at 5:24 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> 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.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
>  drivers/acpi/Makefile | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
> index efb0d1f64019..ceb1aed4b1fc 100644
> --- a/drivers/acpi/Makefile
> +++ b/drivers/acpi/Makefile
> @@ -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
>
> --

Applied as 5.14 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-23 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 15:24 [PATCH] ACPI: tables: Add custom DSDT file as makefile prerequisite Richard Fitzgerald
2021-06-23 17:32 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.