Patchwork Rename the intermediate file created by iasl

login
register
about
Submitter Bao, Zheng
Date 2010-04-26 02:23:22
Message ID <DD1CC71B621B004FA76856E5129D6B1703A608C0@sbjgexmb1.amd.com>
Download mbox | patch
Permalink /patch/1268/
State Accepted, archived
Headers show

Comments

Bao, Zheng - 2010-04-26 02:23:22
For the mainboard with AMD Family 10, if we make clean and make again,
it will fail. why?

After make clean, .c files created by iasl are still left in the build
folder, it will match the rule of
	$(obj)/%.o: $(obj)/%.c $(obj)/config.h
		@printf "    CC         $(subst $(obj)/,,$(@))\n"
		$(CC) -MMD $(CFLAGS) -c -o $@ $<
it will miss the rule which should be applied.
	define objs_asl_template
	       ....

So we move the .c file back to .hex (or other suffix? or delete?).
This patch will work after make distclean, otherwise nobody will rename
the .c.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>


 
 # macro to define template macros that are used by use_template macro
For the mainboard with AMD Family 10, if we make clean and make again,
it will fail. why?

After make clean, .c files created by iasl are still left in the build
folder, it will match the rule of
	$(obj)/%.o: $(obj)/%.c $(obj)/config.h
		@printf "    CC         $(subst $(obj)/,,$(@))\n"
		$(CC) -MMD $(CFLAGS) -c -o $@ $<
it will miss the rule which should be applied.
	define objs_asl_template
	       ....

So we move the .c file back to .hex (or other suffix? or delete?).
This patch will work after make distclean, otherwise nobody will rename
the .c.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>


Index: Makefile
===================================================================
--- Makefile	(revision 5489)
+++ Makefile	(working copy)
@@ -226,6 +226,7 @@
 	iasl -p $$(basename $$@) -tc $$(basename $$@).asl
 	mv $$(basename $$@).hex $$(basename $$@).c
 	$(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@ $$(basename $$@).c
+	mv $$(basename $$@).c $$(basename $$@).hex
 endef
 
 # macro to define template macros that are used by use_template macro
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Patch

Index: Makefile
===================================================================
--- Makefile	(revision 5489)
+++ Makefile	(working copy)
@@ -226,6 +226,7 @@ 
 	iasl -p $$(basename $$@) -tc $$(basename $$@).asl
 	mv $$(basename $$@).hex $$(basename $$@).c
 	$(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir
$$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@
$$(basename $$@).c
+	mv $$(basename $$@).c $$(basename $$@).hex
 endef