[Top][All Lists]

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

Re: .PHONY, FORCE, target execution

From: Paul D. Smith
Subject: Re: .PHONY, FORCE, target execution
Date: Tue, 2 May 2006 07:48:22 -0400

%% "Leeuwesteijn,Joost" <address@hidden> writes:

  l> See the example below. When I run 'make -f' I
  l> expected the banner target to be executed twice, but it
  l> doesn't. Just once, for module1.  I thought .PHONY targets would
  l> always be executed, but 'always' seems to be limited to once; which
  l> is probably the 'make' thing to do.

Correct.  Any given target, .PHONY or not, will be executed at most once
per invocation of make: once make has run a command to build a target
that target is considered "up-to-date" for that invocation of make,
regardless of what the command script actually did, if anything.

  l> Is it possible to force the execution of the banner target?

No; the only way to do it is to re-invoke make recursively to build the

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "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]