On 26/11/15 00:04, th...@vmware.com wrote:
Jonny Grant writes: > > > On 25/11/15 13:59, th...@vmware.com wrote: > > Jonny Grant writes: > > > Hello > > > > > > Could line numbers be added to output for the case where it says "No > > > rule to make target" please? > > > > > > Example below. GNU Make 4.1 > > > > > > I'm not on this list, so please include my email address is any > > > replies Regards, Jonny > > > > > > > > > > > makefile.mak > > > > > > %.o : %.d > > > > > > all: test.o > > > echo processing > > > > > > > > > ^Sorry TAB has been lost by my email client > > > > > > $ make > > > make: *** No rule to make target 'test.o', needed by 'all'. Stop. > > > > > > > > > Could line number (4) be added to the message? > > > > > > eg > > > $ make > > > make: *** makefile.mak:4 No rule to make target 'test.o', needed by > > > 'all'. Stop. > > > > What should be output if the following is typed? > > > > make gungla > > > > Perhaps just the regular because its not got a specific line number: > > $ make gungla > make: *** No rule to make target 'gungla'. Stop. > > > What do think? My point was that it's not so simple. If you do it that way, now you've got two different formats for the same message. This can be confusing to users, and certainly complicates factors if there is software sitting on top of Make and operating on the messages (continuous integration / automatic failure triage).
CI uses program return codes in my experience. EXIT_SUCCESS is 0
Consider the following other special cases: o Gnu Make has $(eval), and it's possible to generate rules that don't correspond to actual Makefile lines.
I thought the message only related to targets. Do you mean if targets are generated by $(eval) ?
o What if there are multiple targets that refer to 'test.o'? Should all be reported, or just the one that failed?
Often compilation only reports the first occurrence of the error. Make could behave in a similar way. A more advanced solution would report more.
(Is the recipe that cannot be built important, or is the use of 'test.o' important?)
The line number may be useful clue the investigating Make user. Are the line numbers already available at that point in the code? Regards, Jonny _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make