help-make
[Top][All Lists]
Advanced

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

Re: GNU-Make 3.80. Catch-all rule. Strange behavior. Bug?


From: Nick Patavalis
Subject: Re: GNU-Make 3.80. Catch-all rule. Strange behavior. Bug?
Date: Tue, 31 Jan 2006 01:31:31 +0200
User-agent: Mutt/1.5.9i

On Mon, Jan 30, 2006 at 01:57:13PM -0500, address@hidden wrote:
> 
> To understand why make printed "default Makefile", you need to read the
> previous section "How Makefiles are Remade".
> 

Yes, I understand what happens. The problem, though, is that from
reading the "Overriding Makefiles" section one can get kind of
confused: It took several minutes until it came to me that: "Oh!  It's
trying to remake the Makefile, and the catch-all pattern rule matches
the Makefile target!"

> 
> Does the above-mentioned section help your understanding?
>

Yes, this paragraph from the "Remaking Makefiles" node explains
*exactly* what goes on:

  If you know that one or more of your makefiles cannot be remade and
  you want to keep `make' from performing an implicit rule search on
  them, perhaps for efficiency reasons, you can use any normal method of
  preventing implicit rule lookup to do so.  For example, you can write an
  explicit rule with the makefile as the target, and an empty command
  string (*note Using Empty Commands: Empty Commands.).

The problem is that the example given in "Overriding Makefiles" could
be considered a bit misleading, if not flat-out wrong. If I could
suggest something it would be to add the:

  Makefile: ;

rule to the example, as well as an xref pointing to "Remaking
Makefiles" in the explanatory text that justifies this rule.

Thanks
/npat

-- 
Saw `cout' being shifted "Hello world" times to the left and stopped
right there.
  -- Steve Gonedes




reply via email to

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