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>

Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5503 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Zheng Bao 2010-04-26 12:27:18 +00:00 committed by Stefan Reinauer
parent 607cdf62b6
commit 12fa159451
1 changed files with 2 additions and 0 deletions

View File

@ -226,6 +226,8 @@ $(obj)/$(1)%.o: src/$(1)%.asl
iasl -p $$(basename $$@) -tc $$(basename $$@).asl iasl -p $$(basename $$@) -tc $$(basename $$@).asl
mv $$(basename $$@).hex $$(basename $$@).c mv $$(basename $$@).hex $$(basename $$@).c
$(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@ $$(basename $$@).c $(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@ $$(basename $$@).c
# keep %.o: %.c rule from catching the temporary .c file after a make clean
mv $$(basename $$@).c $$(basename $$@).hex
endef endef
# macro to define template macros that are used by use_template macro # macro to define template macros that are used by use_template macro