[U-Boot-Users] [PATCH] fix for "make doesn't know how to make target in examples/"

Hi,
Make complains that it doesn't know how to make hello_world.srec.
make[1]: *** No rule to make target `hello_world.srec', needed by `all'. Stop.
Introduce $(TARGET) let make to build % before %.srec and %.bin.
CHANGELOG
* Introduce $(TARGET) in Makefile of examples/.

In message 44B20597.4010103@cola.voip.idv.tw you wrote:
Make complains that it doesn't know how to make hello_world.srec.
Is it correct to assume that you are using a (broken) BETA version of the GNU make tool?
I reject your patch. AFAIK, any sane version of make handles the current Makefile correctly.
Please get working tools.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
Make complains that it doesn't know how to make hello_world.srec.
Is it correct to assume that you are using a (broken) BETA version of the GNU make tool?
I reject your patch. AFAIK, any sane version of make handles the current Makefile correctly.
Please get working tools.
Hi,
I'm using make 3.81-2 that is in Debian etch and sid currently.
$ make --version GNU Make 3.81
$ dpkg -l make ii make 3.81-2 The GNU version of the "make" utility.
A test with the attached Makefile: $ touch 1.src $ make make: *** No rule to make target `1.out', needed by `all'. Stop.
I would file a bug against make on Debian BTS if that is believed to be one.

Dear all!
Wen-chien Jesse Sung schrieb:
%.out: % cp $< $@ echo $@
%: %.src cp $< $@ echo $@
all: 1.out echo $@
I have tested the Makefile on a Suse 9.3 Professional system with GNU make 3.80 (RPM package version make-3.80-187) and it fails there, too.
But if I add the line
1.out: 1
everything is working.
With best regards Andreas Schweigstill

Hello,
in message 44B21D7F.5070603@cola.voip.idv.tw you wrote:
I'm using make 3.81-2 that is in Debian etch and sid currently.
This is supposed to be ok.
A test with the attached Makefile: $ touch 1.src $ make make: *** No rule to make target `1.out', needed by `all'. Stop.
This Makefile is not equivlent to what we use in the U-Boot code.
all: 1.out
The "examples/Makefile" is different; it corresponds to:
all: 1.out 1
...and this works fine for me with make 3.81
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
A test with the attached Makefile: $ touch 1.src $ make make: *** No rule to make target `1.out', needed by `all'. Stop.
This Makefile is not equivlent to what we use in the U-Boot code.
all: 1.out
The "examples/Makefile" is different; it corresponds to:
all: 1.out 1
...and this works fine for me with make 3.81
Hi,
I modify the testing Makefile (attached).
$ make make: *** No rule to make target `1.out', needed by `all'. Stop.
And then I replace "all: 1.out 1" with "all: 1 1.out", it works.
The sequence of the prerequisites affect the result for me, and that's what the patch does: place $(TARGET) before $(SREC) and $(BIN). Besides, it removes the duplicated entries, SREC = foo.srec BIN = foo.bin foo now becomes SREC = foo.srec only.
I'm just curious about the difference of make's behavior. :)

In message 44B259F8.8090902@cola.voip.idv.tw you wrote:
$ make make: *** No rule to make target `1.out', needed by `all'. Stop.
And then I replace "all: 1.out 1" with "all: 1 1.out", it works.
Aha! This is exactly what I wanted to know. This is the specific failure mode tha has been reported couple times before. See for example http://sourceforge.net/mailarchive/message.php?msg_id=15318222
The sequence of the prerequisites affect the result for me, and that's
Yes, this is the observation all users of GNU make version 3.81 made, and which I consider a bug in make. Nothing in the 3.80 documentation gives any hint that the order of the file names in the prerequisite list (to be precise, we're talking about `normal' prerequisites here, not about `order-only" prerequisites) might be important for the result of the depemdency checking. Actually I am convinced that there must be no such dependency on the order, as this can lead to circular dependencies that would be impossible to solve.
So as a summary: your version of make is broken.
Best regards,
Wolfgang Denk
participants (3)
-
Andreas Schweigstill
-
Wen-chien Jesse Sung
-
Wolfgang Denk