Patchwork Rename the intermediate file created by iasl

login
register
about
Submitter Zheng Bao
Date 2010-04-25 10:41:38
Message ID <COL112-W39038281C154D3EA8EFA14CD050@phx.gbl>
Download mbox | patch
Permalink /patch/1264/
State Accepted, archived
Headers show

Comments

Zheng Bao - 2010-04-25 10:41:38
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>
Patrick Georgi - 2010-04-25 11:11:46
Am 25.04.2010 12:41, schrieb Zheng Bao:
> 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?).
Or we stop abusing the compiler for data tables, and use objcopy


Patrick

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
 
 # macro to define template macros that are used by use_template macro