I finally found out why building one target, running menuconfig to change the target and recompiling fails unless you make clean in between: statictree.c and statictree.h are missing dependencies on .config or its derivatives. Ouch. That's not totally bad for statictree.c because it sits next to the dts, but for statictree.h. So if you configure for qemu, compile, reconfigure for alix1c, compile again, make thinks statictree.h is not stale because it is newer than the alix1c dts. Boom.
Two possible fixes: - move statictree.h to the mainboard dir next to statictree.c. - have statictree.h depend on .config or derivatives.
I like the first option a lot better.
Opinions?
Regards, Carl-Daniel
On 01.03.2008 19:52, Carl-Daniel Hailfinger wrote:
I finally found out why building one target, running menuconfig to change the target and recompiling fails unless you make clean in between: statictree.c and statictree.h are missing dependencies on .config or its derivatives. Ouch. That's not totally bad for statictree.c because it sits next to the dts, but for statictree.h. So if you configure for qemu, compile, reconfigure for alix1c, compile again, make thinks statictree.h is not stale because it is newer than the alix1c dts. Boom.
Two possible fixes:
- move statictree.h to the mainboard dir next to statictree.c.
- have statictree.h depend on .config or derivatives.
I like the first option a lot better.
Actually, we may need both.
There is another related dependency bug in our makefiles: Copying a .config in place is not sufficient to run make. It still needs "make oldconfig" or any other "make *config".
Opinions?
Regards,
Carl-Daniel
On Sat, Mar 1, 2008 at 10:52 AM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
- move statictree.h to the mainboard dir next to statictree.c.
Yes. It makes no sense where it is now.
ron