
Dear Haavard,
in message 20060828162247.6a33963d@cad-250-152.norway.atmel.com you wrote:
This patch fixes the following problem:
make[1]: *** No rule to make target `hello_world.srec', needed by `all'.
The problem has been reported several times before, but so far no patches have been accepted and no one has fixed make. In fact, I can't even find any relevant bug reports against make.
I'm sorry, but you're addressing the rong end of the problem here. Please submit a bug report to the make folks, and try to fix make.
This patch takes a slightly different approach than the other patches I've seen on the mailing list, as it lists the targets explicitly before each of the pattern rules for the elf-, srec- and bin-files. The dependencies for each target are correctly specified, so we don't
Does this mean that you think the current Makefile definition contains any "incorrectly specified" build rules? IF so, I would appreciate if you could point out where you see problems.
As an added bonus, this gets rid of some duplication as each architecture, cpu, board, etc. only needs to add stuff to the ELF variable. The SREC and BIN variables are calculated automatically from the ELF variable.
On the other hand you lose the ability to have different settings for SREC and BIN targets.
I'm not going to check in this patch, as it only hides a serious problem. If "make" is broken on a level where it's operation depends on the order of target names, then this should be noted, so the use of this broken version can be avoided, and eventually "make" be fixed. Even if we fix this place, we've seen a couple of other cases where similar problems happen with this broken version of make. It IMHO makes no sense to add work arounds for a broken tool.
Let's have the tool fixed instead.
Best regards,
Wolfgang Denk