help-make
[Top][All Lists]
Advanced

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

confused about double-colon "terminal" rules


From: Robert P. J. Day
Subject: confused about double-colon "terminal" rules
Date: Thu, 2 Mar 2006 15:20:46 -0500 (EST)

  i'm reading section 10.5.5 of the gnu make manual and i'm confused
about the definition of "terminal" rules that i find there:

"One choice is to mark the match-anything rule as terminal by defining
it with a double colon. When a rule is terminal, it does not apply
unless its prerequisites actually exist. Prerequisites that could be
made with other implicit rules are not good enough. In other words, no
further chaining is allowed beyond a terminal rule."

  so i have this trivial makefile:

t1::    hi
        @echo hi there

and in that directory, i have the source file "hi.c".  now, the
prerequisite of "hi" could clearly be built using the implicit pattern
rule for compiling C files but, according to the above manual excerpt,
a terminal rule should *absolutely* not consider other implicit rules.

so ...

$ make t1
cc      hi.c    -o hi
hi
$

  huh?  why was an implicit rule used to build that dependency?  how
am i misreading this?

rday





reply via email to

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