[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can make ignore timestamp of prerequisite?
From: |
Paul D. Smith |
Subject: |
Re: Can make ignore timestamp of prerequisite? |
Date: |
25 Feb 2006 20:49:12 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
%% william.knight@gmail.com 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 <psmith@gnu.org> 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