%% Lin George <[EMAIL PROTECTED]> writes:

  >> Another interesting thing is that each instance of the target is
  >> evaluated independently and only those instances which are out of date
  >> are invoked. In the above example presumably a file "install" never
  >> exists so the target is always out of date (or more commonly, it's
  >> declared .PHONY). It's difficult to come up with a situation where this
  >> is useful, but not impossible I suppose.

  lg> Sorry I missed your context, what do you mean "this"?

The thing being discussed in the above paragraph: having the targets
evaluated independently.
   
  lg> If there are multiple "install::" in one Makefile (I think it
  lg> means multiple instances of one target in your mind), why need
  lg> they be evaluated individually? I think they are the same target,
  lg> so they should be treated the same (not necessary to be evaluated
  lg> individually).

It only makes sense to think about this if the targets have different
prerequisites:

    foo:: bar
            echo Update due to bar

    foo:: baz
            echo Update due to baz

etc.  Now, if foo is up-to-date with respect to bar, that rule will not
be run.  If it's out-of-date with respect to baz, that rule will be
run.

  >> It's difficult to come up with a situation where this is useful,
  >> but not impossible I suppose.
   
  lg> Another comment is that, I have not seen any relationship between
  lg> your above point and .PHONY. Could you show me an example please?

Usually, targets like "all", "install", "clean", etc. which are meant to
perform an action, rather than update real files, will be declared .PHONY.

Look up .PHONY in the GNU make manual.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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


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

Reply via email to