Robert P. J. Day wrote:
"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?

Firstly the section you are quoting refers to "match-anything rules". Those are rules whose LHS is '%:' or '%::".

Secondly the example you give is not for a pattern rule at all, but for a standard non-pattern rule. All you've done is define a double colon rule.

The concept of a terminal rule is specifically related to pattern matching rules to prevent enormous searches.

John.
--
John Graham-Cumming
[EMAIL PROTECTED]

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to