help-make
[Top][All Lists]
Advanced

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

Re: match-anything rule takes precedence over earlier rule


From: Paul D. Smith
Subject: Re: match-anything rule takes precedence over earlier rule
Date: Wed, 15 Jan 2003 07:46:08 -0500

%% gk <address@hidden> writes:

  g> I do not understand why the following makefile will not build the
  g> second target.

If you check the -d output it's pretty obvious.

Remember that the first thing GNU make tries to do is rebuild the
makefile; if it can then it will re-exec itself.

Well, when it tries to rebuild the makefile it looks for a rule that can
do it, and what rule does it find?  The "% : error" rule.  Then it runs
the error target, and that's all she wrote.

Match anything patterns are very dangerous.  If you want to use one like
this you will need to provide an explicit rule for the makefile, like
this:

  Makefile: ;

or similar.

-- 
-------------------------------------------------------------------------------
 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




reply via email to

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