|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
how can gnu make return 2 and not show any errors?Hello, How can it be – my gnu make is returning 2 but does
not show any errors. I am using –include directive, but I checked and indeed,
if make ignores errors because of –include, then it returns 0, as it
should. So what else could it be? (I can’t send you a short
example, I can’t find the short example that would do that, and the
makefile I am working with is in excess of 10000 lines). Mark _______________________________________________ Help-make mailing list Help-make@... http://lists.gnu.org/mailman/listinfo/help-make |
|
|
Re: how can gnu make return 2 and not show any errors?On Tue, 2009-10-20 at 09:43 -0700, Mark Galeck (CW) wrote:
> How can it be – my gnu make is returning 2 but does not show any > errors. I am using –include directive, but I checked and indeed, if > make ignores errors because of –include, then it returns 0, as it > should. > > So what else could it be? (I can’t send you a short example, I can’t > find the short example that would do that, and the makefile I am > working with is in excess of 10000 lines). Are you sure there wasn't an error further up the build? There are some bugs in 3.81 around error handling and "-include" but I'm not sure if these exact symptoms would be involved. Boris fixed them a week or two ago. I'm working on getting out a release candidate for 3.82, so if you wanted to try the GNU make currently in CVS and see if that worked any better it would be interesting. _______________________________________________ Help-make mailing list Help-make@... http://lists.gnu.org/mailman/listinfo/help-make |
|
|
Re: how can gnu make return 2 and not show any errors?On 10/20/09, Paul Smith <psmith@...> wrote:
> On Tue, 2009-10-20 at 09:43 -0700, Mark Galeck (CW) wrote: > > > How can it be – my gnu make is returning 2 but does not show any > > errors. I am using –include directive, but I checked and indeed, if > > make ignores errors because of –include, then it returns 0, as it > > should. > > > > So what else could it be? (I can’t send you a short example, I can’t > > find the short example that would do that, and the makefile I am > > working with is in excess of 10000 lines). > > > Are you sure there wasn't an error further up the build? > > There are some bugs in 3.81 around error handling and "-include" but I'm > not sure if these exact symptoms would be involved. Boris fixed them a > week or two ago. I'm working on getting out a release candidate for > 3.82, so if you wanted to try the GNU make currently in CVS and see if > that worked any better it would be interesting. > I've seen a similar problem before. I don't know the exact circumstances that cause it, but this small set of files seems to reproduce it. You will want to create ok.d manually - the normal behavior of gcc -MMD doesn't seem to put ok.d in the ok.d file. $ cat Makefile all: ok.o echo all done -include ok.d ok.o: ok.c echo compile ok.c $ cat ok.c $ cat ok.d ok.o ok.d: ok.c ok.h $ make $ echo $? 2 What's weird is if you remove the "ok.d" part from the ok.d file, you get an actual error message: $ make make: *** No rule to make target `ok.h', needed by `ok.o'. Stop. $ echo $? 2 Basically you have to have a dependency file that is dependent on a missing file (here, ok.h). I don't know why the error text only shows up in the one in not the other though. This is make-3.81 In any case, I don't think make will ever handle file deletions correctly. If you remove files (or do an update from revision control that removes files), you are better off rebuilding everything from scratch. -Mike _______________________________________________ Help-make mailing list Help-make@... http://lists.gnu.org/mailman/listinfo/help-make |
|
|
Re: how can gnu make return 2 and not show any errors?On Tue, 2009-10-20 at 13:06 -0400, Mike Shal wrote:
> Basically you have to have a dependency file that is dependent on a > missing file (here, ok.h). I don't know why the error text only shows > up in the one in not the other though. This is make-3.81 I tried your example with 3.81 and did reproduce this behavior, then I tried it with the latest CVS code and this problem no longer exists, so it's been fixed and will be in the next release: xx$ ../make make: *** No rule to make target `ok.h', needed by `ok.o'. Stop. xx$ echo $? 2 Cheers! _______________________________________________ Help-make mailing list Help-make@... http://lists.gnu.org/mailman/listinfo/help-make |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |