bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: make(1) should say the real missing rule


From: Paul D. Smith
Subject: Re: make(1) should say the real missing rule
Date: 11 Apr 2002 21:12:32 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

%% address@hidden (Dan Jacobson) writes:

  dj> $ make 7-06.jazz_secondaries
  dj> make: *** No rule to make target `7-06.jazz_secondaries'.  Stop.

  dj> Huh? right there in my Makefile I have that rule:

  dj> %.jazz_secondaries: %.zhu %.b5tab %.bian_slash 
  dj>   bla bla $^

  dj> Oh, I think it is saying it has no rule to make a certian one of
  dj> %.zhu, etc.  Well, OK, but don't you think it should say "No rule to
  dj> make target `7-06.zhu' (or which ever one that is bothering it)"
  dj> instead?

No.  Make is behaving correctly.  You are misunderstanding what's
happening.

You've asked make to create 7-06.jazz_secondaries.  There is no explicit
rule to create that file, so make attempt to find an implicit rule.

By definition (see the GNU make manual) an implicit rule only matches if
the patterns match and the prerequisites either exist or can be created.

In your case, one of the prerequisites in this pattern rule did not
match, and there was no way make could discover to create it, so the
pattern rule did not meet the criteria and make rejected it as a
possibility, and continued looking for another way to create that file.

At the end of all the patterns there was no valid rule found to create
the file 7-06.jazz_secondaries, so make reported that fact to you
exactly as it should have.

Do not forget that it is quite likely, indeed even extremely common, to
have multiple targets created from different prerequisites using
different rules.  Reporting how each of these failed would be improper,
except during -d (as you discovered).

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



reply via email to

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