[Top][All Lists]


Re: makefile error output

From: Noel Yap
Subject: Re: makefile error output
Date: Fri, 26 Mar 2004 14:33:02 -0500
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

What version of make are you using?  What does "make --version" output?

Make should've said it couldn't build foo.ReadMe before it said anything about  Are you sure that it didn't?


Mike Maxwell wrote:
I just spent the morning trying to debug my makefile.  The error msg was
    Make: *** Unable to make target  Stop
(The name of the target has been changed to protect the innocent.)  Let me
say for starters that that is not a very helpful error msg: telling me that
it was unable to make the target sounds like a sort of last-ditch error msg,
sort of like "General Error."  I would like to think that it could have told
me more, and that's what this ng msg is about.

The problem turned out to be that I had misspelled one of the
prerequisities: foo.baz   foo.ReadMe

Instead of a file foo.ReadMe, I had foo.Readme.  Simple to fix, hard for me
to find.

I tried turning on various debug options (-d, -q, -r) on make, but even
after I knew what the problem was, and ran make with these options to see
how the debug output could help, I couldn't tell.  My naive idea of how
'make' works is that it is sort of like Prolog: it tries various ways to
prove (or in this case, make) a goal, and when it finds a possible path, it
pursues that.  Eventually it either solves all the goals for the top-level
goal, or else it fails to prove some goal.  If you turn on the Prolog
debugger, you therefore see a series of successes or failures; and if you
know it should have succeeded, but it didn't, you look for the path that is
flagged 'failed', and work down that path to find out why.

Couldn't make do the same thing?  I.e. when it tried to make the foo.ReadMe
file, it could have said something like
    Looking for foo.ReadMe...failed
    Trying implicit prerequisite foo.ReadMe,v ...failed
    Trying implicit prerequisite RCS/foo.ReadMe,v ...failed
In other words, all it needs to do is add the string " ...failed" if a
prereq fails (or " ...succeeded" if it succeeds), to the output produced
with the -d flag.

What puzzles me is that I thought 'make' already did this.  But maybe it's
some other version of 'make'.

    Mike Maxwell
    maxwell at ldc dot upenn dot edu

Help-make mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]