Patchwork BUILD: add -MMD to iasl cpp call

login
register
about
Submitter Sven Schnelle
Date 2011-03-20 19:14:18
Message ID <1300648458-21420-1-git-send-email-svens@stackframe.org>
Download mbox | patch
Permalink /patch/2800/
State Accepted
Commit r6456
Headers show

Comments

Sven Schnelle - 2011-03-20 19:14:18
Right now there are no dependency rules for compiling dsdt.asl.
If ACPI code includes asl files, the dsdt isn't recompiled if any
of those file is changed. Add the flags to the preprocessor call
to have it generate the neccessary dependency rule.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 Makefile.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Peter Stuge - 2011-03-20 19:26:58
Sven Schnelle wrote:
> Right now there are no dependency rules for compiling dsdt.asl.
> If ACPI code includes asl files, the dsdt isn't recompiled if any
> of those file is changed. Add the flags to the preprocessor call
> to have it generate the neccessary dependency rule.
> 
> Signed-off-by: Sven Schnelle <svens@stackframe.org>

Acked-by: Peter Stuge <peter@stuge.se>

Patch

diff --git a/Makefile.inc b/Makefile.inc
index 1d2d0dc..791150c 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -59,7 +59,7 @@  driver-S-ccopts:=-DASSEMBLY
 define ramstage-objs_asl_template
 $(obj)/$(1).ramstage.o: src/$(1).asl
 	@printf "    IASL       $$(subst $(top)/,,$$(@))\n"
-	$(CPP) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
+	$(CPP) -MMD -MT $$(@) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
 	iasl -p $$(obj)/$(1) -tc $$(basename $$@).asl
 	mv $$(obj)/$(1).hex $$(basename $$@).c
 	$(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c