bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting warmer error messages


From: Martin Dorey
Subject: Re: getting warmer error messages
Date: Thu, 28 Dec 2006 06:43:07 -0800

> it fails with a message saying that target cannot 
> be built.

That's close to what it says but the OP's right that, strictly speaking, the 
message make produces isn't actually true.  If it said "no rule whose 
prerequisites can be built to make target" then it would be true but verbose.  
I can see that the intention behind the error message is to be more helpful but 
some correctness has been lost.  "Target %s cannot be built" sounds like an 
excellent suggestion to me - it's short and clear and accurate.

> there are usually many possible pattern rules 
> which it MIGHT match, if it could build the
> prerequisites

An example might help persuade - % is often make-able from %.c - so any list of 
potentially missing prerequisites would have to include %.c.  I'm tempted to 
suggest that I might sometimes find the list of missing prerequisites useful 
when debugging but perhaps it would be so explosively large that it wouldn't be 
useful even as an option.  I do OK with make -p anyway.

----- Original Message -----
From: address@hidden <address@hidden>
To: Dan Jacobson <address@hidden>
Cc: address@hidden <address@hidden>
Sent: Thu Dec 28 00:29:51 2006
Subject: Re: getting warmer error messages

I can only assume you're trying to prove a point by making this bug
report virtually unintelligible, with no concrete suggestions for
improvement.  Well played.  Unfortunately for your point, there's a good
reason for make's behavior.

Pattern rules only match if make can successfully create all the
prerequisites in the rule.  If one or more cannot be created, then the
pattern rule does not match.

If no pattern rule matches for a given target (and no explicit rules
exist for it), then make can't figure out how to build that target and
so it fails with a message saying that target cannot be built.

What else should it do?  For any given target there are usually many
possible pattern rules which it MIGHT match, if it could build the
prerequisites.  The default pattern rules, by themselves, provide a
number of ways of building any file, and a multitude of ways to build
some types of file.

I don't believe it would be useful for make to print a list of potential
targets that, if they could be built, would allow the target you asked
for to be built.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Bug-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-make

reply via email to

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