%% [EMAIL PROTECTED] writes:

  wk> To clarify and summarize what I'm asking, I want to somehow define
  wk> a rule where the commands are executed ONLY if the target does not
  wk> exist.  I want to prevent the rule from being applied when the
  wk> prerequisite is simpy newer than the target.

If you want a rule to run only when a target doesn't exist, just don't
define any prerequisites at all.  Then, if the target exists the rule
won't run and if it doesn't exist, it will run.


If you want to declare a build order, then use order-only prerequisites:

    target : | oo-prereq1 oo-prereq2 [...]


Note this won't work with older versions of GNU make.

-- 
-------------------------------------------------------------------------------
 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-gnu-utils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Reply via email to