bug-make
[Top][All Lists]
Advanced

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

Re: % vs. "No rule to make target"


From: Paul Smith
Subject: Re: % vs. "No rule to make target"
Date: Mon, 09 Jun 2008 16:54:57 -0400

On Tue, 2008-06-10 at 01:49 +0800, address@hidden wrote:
> Do differentiate error messages from different triggers,

I'm not sure this is fruitful, but to reiterate: there are no different
triggers.  There is one procedure.  It looks something like this (100%
psuedo code):

        rule *r;
        r = find_explicit_rule(target);
        if (r)
            return run_rule(r);
        
        r = find_implicit_rule(target);
        if (r)
            return run_rule(r);
        
        error("No rule found to create %s", target);

I guess what you're suggesting is something like:

        rule *r;
        int possible_rules;
        
        r = find_explicit_rule(target);
        if (r)
            return run_rule(r);
        
        r = find_implicit_rule(target, &possible_rules);
        if (r)
            return run_rule(r);
                
        if (possible_rules == 0)
            error("No explicit rule found to create %s", target);
        else
            error("No implicit or explicit rule found to create %s", target);

I just don't see the point.  Even ignoring the fact that you'd never see
the message from the "then" part of the error statement (because by
default there plenty of rules that match any possible target), what does
this information do for you?





reply via email to

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